How to activate a trigger inside Verse code?

I am trying to get the script to make a trigger trigger. Whenever the trigger triggers, it causes enemies to spawn. This is what I have so far, but does not seem to be doing anything.

@editable
TestTrigger : trigger_device = trigger_device{}

OnBegin():void=
TestTrigger.Trigger()

1 Like

onbegin probably isn’t the best place to use your trigger. the map will be initialising alot of stuff and your trigger might be activating before other parts of your map are ready

maybe try a later event such as player spawn event to activate your trigger

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.