I’m trying to create mechanics that will move the item when the player steps on the trigger.
-
This can easily be done by using a synemaic sine qua non. But can it be done through Verse code?
-
The problem is that when you subscribe to an event, it requires an action with the player, not the item. How can this be played around?
Tiles1Move2 := class(creative_device):
@editable
MyProp : creative_prop = creative_prop{}
@editable
Trigger : trigger_device = trigger_device{}
OnBegin<override>()<suspends>:void=
Trigger.TriggeredEvent.Subscribe(TeleportToZeroPos())
TeleportToZeroPos(Agent : agent):void=
Position := vector3{X:=0.0, Y:=0.0, Z:=0.0}
if(MyProp.TeleportTo[Position, IdentityRotation()]):
Print("Teleport to Zero position")