Scrolling Game Development Kit Forum

SGDK Version 2 => Help, Errors, FAQ => Topic started by: tspoon12 on 2010-03-30, 12:04:35 PM

Title: lava, water and spikes help
Post by: tspoon12 on 2010-03-30, 12:04:35 PM
Im unsure of how to make traps. I've made it on graphic sheets and tried different ways of making it send you to the start of the level. Couldn't get it to work but felt it was close. Any ways I can do this.......is anymore information needed, im new to this.
Title: Re: lava, water and spikes help
Post by: SmartBoy16 on 2010-03-30, 02:21:25 PM
could you post the .sgdk2 file? you can save attachments to posts under the advanced options or you can upload it to an online folder such as box.net


there are a few ways of doing this depending on how you set up your game. the common way is:

1. Make a 2 point path at the location of the pit to create a rectangle.
2. Make a 1 point path at the beginning where you want the player to return to.
You can use Shift+T to make the path snap to tile locations

3. Create these rules on the pit path in the rules editor:
     a. If IsSpriteWithin
          Sprite: (whatever the name of your player sprite is)
          RelativePosition: CenterMiddle
     b. Do TransportToPlan
          Sprite: (whatever the name of your player sprite is)
          Path: (whatever the name of your beginning path is)
          Alignment: CenterMiddle
          Make sure "EndIf/EndWhile" is checked

if you need any more help, let us know ;)