Is there a way to turn visible on/off in verse for an item/prop? I am wanting to use the prop manipulator, but it seems to have issues.
Hello Johnn, Welcome to the Forums.
This is a Snippet that I have:
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
hideaprop := class(creative_device):
@editable
MyHidableProp : creative_prop = creative_prop{}
@editable
MyButtonRef : button_device = button_device{}
OnBegin<override>()<suspends>:void=
MyButtonRef.InteractedWithEvent.Subscribe(ButtonExecuteFunction)
ButtonExecuteFunction(Agent:agent):void=
MyHidableProp.Hide()
Let us know if you have any questions about it.
Thanks so much. This works perfectly with a âstandardâ button. And I have already used it in my island.
Can it be edited to also include conditional buttonsâŚand with character devices.
I guess to clarify, I was looking for a conditional button to make a character device (NPC) disappear once the conditional button was activated.
Iâm new to UEFN and Unreal Engine.
I have worked in Unity and some C#. Verse is a little different.
Again, thanks so much for the code you providedâŚgreatly appreciated.
For the Character_device itâs as simple as calling .Hide()
on the device
As for the ânpc_spawnerâ you would need to store the agent of that npc somewhere from the âspawned eventâ
Then assuming the agent variable is âMYNPCâ you can modify the function provided above by astrotronic to something like this
ButtonExecuteFunction(Agent:agent):void=
if(FortCharacter:=MYNPC.GetFortCharacter[]):
FortCharacter.Hide()
I havenât used npc spawners for this in the past but I assume they work similarly to players and have a fort_character
Thanks for the suggestions, I will have to give them a try.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.