Grokmoo / sulis

Turn based tactical RPG with several campaigns, written in Rust
https://www.sulisgame.com
471 stars 29 forks source link

squares that cause teleportation #168

Open picobyte opened 4 years ago

picobyte commented 4 years ago

Allow for squares, the player can step on, that cause teleportation. Two kinds: a teleportation that is unrecognizable by the square used, and another kind that is recognizable.

Grokmoo commented 4 years ago

I like this idea, and it could make for some fun puzzle or maze like areas. I pushed a change to allow triggers to fire repeatedly to support this.

This is pretty straightforward to do right now. Just create an OnPlayerEnter trigger at the desired location and hook it up with an on_activate with fire_script. In the script, use the teleport_to on the parent who triggered the script. You can put whatever prop / tile in the trigger's space (or not) if you want to show it.

We do something quite similar right now in a number of places in the campaign:

Example: