i want to make a trigger device disapear as soon as it collides with a player. i thought of implementing the disapearing by just teleporting the trigger away for example multiplying the vectors with a constant.
is that your full code?? your missing a lot of the bulk
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
GameManager_Disapearing := class(creative_device):
#change to whatever device you want to disappear
@editable
whatverdeviceyouwanttohide: device_device = device_device{}
HideTrigger:trigger_device = trigger_device{}
OnBegin<override>()<suspends>:void=
HideTrigger.TriggeredEvent.Subscribe(HideDevice)
HideDevice():void=
spawn:
HideOnTrigger() #we need to spawn <suspends> functions
HideOnTrigger()<suspends>:void=
whatverdeviceyouwanttohide.Hide<public>():void = external {}
Sleep(4.0)
whatverdeviceyouwanttohide.Show<public>():void = external {}
this wont work but definitely gets you a whole lot closer then whatever AI gave you in that last string. this essentially is just a make device disappear button, as its not set up to make whatever you touch disappear, but whenever that bound trigger gets triggered it would make the disappear. Im sure the logic for sending signals on player collosion is there I just dont know it - if you get stuck you can always set the device to have no colloision and put a volume in it that sends a signal to your game manager that then in turn either disables or make it go somewhere You also cant hide devices using Hide():void = external {} so setting it to teleport might be the move however I found it quite difficult to move things with verse so good luck
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath}
error message:
for line “device.TriggeredEvent.Subscribe(OnTriggered)” the “OnTriggered” is marked with the message:
“This function parameter expects a value of type ?agent->void, but this argument is an incompatible value of type type{_(:trigger_device):void}.(3509)” do you know how to fix it?
what i thought of in this code is if the trigger is triggered (so it basically collided with a player) then i want it to teleport to somewhere it cant be seen and after 10 seconds it teleports back to its original position