Made a trigger--what's next?

So I am inexperienced in game development in general.

There is a game object with code as a component and a trigger collision as a component

I want to make this an event that automatically moves the hero X amount of steps (where X would be a property set in the trigger’s code).

I have the hero detect a collision response with the trigger. Now how would I handle the event?

Specifically, how would I store a value to this event that can vary among instances? (say I want to move hero 5 steps and then 4 steps a different time).

Would the game object with the trigger handle the movement, or would the hero handle it?

And since this is more general than Defold-specific, can you recommend a place that might have the more info on general game development basics?

You can set your own properties on game objects,
and then set those properties when creating the game object: http://www.defold.com/manuals/script-properties/#_factory_created_objects

And when message passing, you can send data too: http://www.defold.com/manuals/message-passing/#_message_data

I hope this helps a bit :slight_smile:

1 Like