-
Notifications
You must be signed in to change notification settings - Fork 39
Interactable Objects summary
This tutorial will cover some key points of available interactable objects in the engine and how to config them.
Please read Adding Interactable Objects to the map tutorial before reading this one.
Pushable interactable objects are the ones that can be pushed by the hero or targeted by Move psynergy.
In order to make an interactable object pushable, you need to set the property "pushable"
to true
in the interactable_objects_db.json
file.
When adding a pushable interactable object to the map, you need to delimit the area where it can be pushed. You can do this by setting the "allowed_tiles"
property that accepts a list of tile positions and/or a list of rectangular ranges, please check this link to see how to use this property.
Pushables can also be docked when reaching certain position at a given collision layer. You can set this key position on "dock_tile_position"
property, please check this link to see how to use this property.
Pushables can also be dropped to a lower collision layer or even into the water. For this, you need to set the "object_drop_tiles"
property. On this property, you need to specify a list of positions that when this interactable object reaches this position, it will fall on a given y
destination position and collision layer. Please check this link to see how to use this property. You may want to also spread some dust when the pillar hits the ground by enabling its animation.
You can always fire Game Events after the hero pushes a pushable interactable object, for this, you need to set a list of events on "after_push_events"
property, please check this link to see how to use this property.
Breakable interactable objects are the ones that when the hero jumps over them, they crack. If the hero jumps another time, they completely break.
When the interactable object completely breaks, the hero will fall to its base_collision_layer
collision layer.
In order to make an interactable object breakable, you need to set the property "breakable"
to true
in the interactable_objects_db.json
file.
Rollable interactable objects are the ones that will roll to a specific position when pushed by the hero. They can stop on some object hit (defined by a specific position) or they can fall on the water surface if desired.
In order to make an interactable object rollable, you need to set the property "rollable"
to true
in the interactable_objects_db.json
file.
When instantiating a rollable, you need to set its direction, if it's horizontal
or vertical
, use "pillar_direction"
property for this.
Also, you need to set the list of contact points that this rollable interactable object can hit. You just need to pass the list of positions, the engine will try to guess the best option when rolling. Use the "contact_points"
property to set these positions.
Please notice that rollables can hit other IOs that cross the rolling line:
Rollables can also fall on the water surface. In order for this to happen, you just need to set the position that when reached by this IO, it will fall into the water based on rolling direction. Use "falling_pos"
property to set this position.
If you only set "falling_pos"
property, the IO will immediately fall on water surface when passing by "falling_pos"
position. If you need this IO to keep falling before reaching the final position, use "dest_pos_after_fall"
to set this position.
Please check detailed explanation for each rollable setting on this link.
Whirlwind Source interactable objects are the ones that keep emitting whirlwinds on a regular basis. You can set the emission direction and the target destination where these whirlwinds will be dismantled. If the hero touches these whirlwinds, he will be carried by them till the target destination.
In order to make an interactable object Whirlwind Source, you need to set the property "whirlwind_source"
to true
in the interactable_objects_db.json
file.
Use "dest_point"
property to define the target position where the whirlwind will be dismantled.
You can control emission frequency and whirlwind moving speed by setting the "emission_interval"
and "speed_factor"
properties respectively.
If you want to change the map collision layer when the hero is dropped from the whirlwind that's carrying him, you can use the "drop_collision_layer"
property to define it.
If you want to define a lower y destination for the hero to fall when he is dropped from the whirlwind that's carrying him, you can use the "drop_dest_y"
property to define it.
Please check detailed explanation for each Whirlwind Source setting on this link.
- Home
- Introduction for developers
- Tutorials
- Game initialization settings
- Map settings
-
Game Events
- Add item to party event
- Audio play event
- Battle event
- Branch event
- Camera fade event
- Camera follow event
- Camera move event
- Camera shake event
- Casting aura event
- Change collision layer event
- Char animation play event
- Char blend mode event
- Char exp event
- Char fall event
- Char hue event
- Char item manipulation event
- Char level change event
- Char rotation event
- Char shadow visibility event
- Char tween position event
- Chest event
- Colorize char event
- Colorize map event
- Control bgm event
- Create storage var event
- Custom collision body event
- Destroyer event
- Dialog event
- Djinn get event
- Djinn set status event
- Emoticon event
- Event activation event
- Event caller event
- Event holder event
- Event loop event
- Exit Sand mode event
- Face direction event
- Flame char event
- Generic sprite event
- Grant ability event
- IO anim play event
- IO tween position event
- Item checks event
- Jump event
- Layer tween event
- Layer visibility event
- Look event
- Main chars join split event
- Map blend mode event
- Map opacity event
- Move event
- Outline char event
- Particles event
- Party join event
- Permanent status event
- Psynergy stone event
- Set char activation event
- Set char collision event
- Set char visibility event
- Set IO activation event
- Set IO collision event
- Set IO visibility event
- Set NPC collision event
- Set party coins event
- Set value event
- Storage change event
- Summon event
- Teleport event
- Tile event manage event
- Timer event
- Tint char event
- Databases
- Code reference