Suyo's Totally Terrific Trigger Tutorial
Posted: January 1st, 2011, 5:33 am
Have you noticed these guys?
They are triggers. With them you can make blocks move and do other neat stuff. Let me show you.
GETTING A BLOCK OUT OF THE WAY
Puzzles, Locks, othe crap? You decide.
1 First, create the block. Type in anything at 'Link', like "block". Tell it to use 'touch and go' but tick the 'switch-activated' box.
2 Now we need a switch. You don't need to type in something at link.
3 Switch to the events tab. Hit the + and you will get a list of possible events - we need 'Activate'.
4 In the 'Activate' Event, set linkage to the block's name, like 'block'.
5 And that's it!
Here's the code, in case you want to check. (Yes I know that's a planet not a block shaddup)
Imagine what is possible with this. You could make a door closing if you hit the wrong switch, just turn this around.
TRAPDOOR OF DOOM
Our nameless hero targets the exit, triumphant, thinking he will return and be celebratOH SNAP TRAPDOOR
1 A block which is the trap door. you can make ti rotate and quickly get out so the player has no chance. yay.
2 This time we use the eye trigger. It's basically a switch which is invisible and triggered on going into the area. Place it on the beginning of the trap door.
3 Set a link for the trap door block, then repeat 3 to 5 from the one above.
Now play the level. Go on the trap door. Hilarity ensues.
SIR, I THINK THE GRAVITY IS EFFED UP
1 Create a Trigger
2 In the Events Tab, add the 'gravity' Event and choose which way "Up" should be
3 That's it!
YOU ARE THE CAMERA.
Finally our hero has found the lost treasure of the old, Indian faskjasfiosdfho Tribe... but the entrace is blocked off. There is a switch far out there, but how should he know it opened the shaft?
1 Block, Switch.
2 Now we're getting serious with events. Before, it was pretty uninteresting in which order the events where. Not anymore. Nuke all events first.
3 We start off with the Activate event. Activate your block.
4 Below this one, we put the Camera event. Tick the Linkage box and type in the block's name. You may also adjust the zoom - the higher, the closer.
5 At the bottom we add a wait event. 60 frames are one second, so if we want to wait 2 seconds type in 120. Untick both boxes if they are ticked.
6 Now we add the Camera Off Event so the cam returns.
7 Last but not least, a Turn On event, and put 'this' into the linkage box.
MOVING ITEMS
A coin that runs away from you. A bridge materializing below your feet. Faking a storm. Everything is possible with the Move Item Event.
It will move around any items - including the goal! Just keep in mind:
- 1 tile = 1 pixel
- Absolute means that it will be placed right there and won't change position when using the trigger again
- Relative adds the x and y values to the current position and will change position when using the trigger again
- Bigger X = farther to the right, Bigger Y = farther down
Check this level for some examples:
(first one to get into the goal gets cookie) Kirbeh8 sez: I got into the goal. Nobody else said so. Does that mean I gets cookie?
COMING SOON: editing the level in-game
They are triggers. With them you can make blocks move and do other neat stuff. Let me show you.
GETTING A BLOCK OUT OF THE WAY
Puzzles, Locks, othe crap? You decide.
1 First, create the block. Type in anything at 'Link', like "block". Tell it to use 'touch and go' but tick the 'switch-activated' box.
2 Now we need a switch. You don't need to type in something at link.
3 Switch to the events tab. Hit the + and you will get a list of possible events - we need 'Activate'.
4 In the 'Activate' Event, set linkage to the block's name, like 'block'.
5 And that's it!
Here's the code, in case you want to check. (Yes I know that's a planet not a block shaddup)
- Code: Select all
150x50~0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*2J*47*2K*3*2J*47*2K*3*2J*47*2K*3*2J*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*~1,112,1432,0,0,r|2:block,368,1381,4,4,101.105.105.105.101.105.105.105.101.105.105.105.101.105.105.105,2,64,0,0,0,45,0,-,1,1,64,64,0,0,0,u,0.2,0.2,c,1,1,0.2|5,198,1473,wait:0;32:turnon:this:activate:block,1,1~0*7500*~~My%20Level~1~1,1~0~
Imagine what is possible with this. You could make a door closing if you hit the wrong switch, just turn this around.
TRAPDOOR OF DOOM
Our nameless hero targets the exit, triumphant, thinking he will return and be celebratOH SNAP TRAPDOOR
1 A block which is the trap door. you can make ti rotate and quickly get out so the player has no chance. yay.
2 This time we use the eye trigger. It's basically a switch which is invisible and triggered on going into the area. Place it on the beginning of the trap door.
3 Set a link for the trap door block, then repeat 3 to 5 from the one above.
Now play the level. Go on the trap door. Hilarity ensues.
- Code: Select all
20x20~0*15*2K2O*4*0*15*2K2O*4*0*15*2K2O*4*0*15*2K2O*4*0*15*2K2O*4*0*15*2K2O*4*2J*15*2M2O*4*0*195*2L2O*4*0*15*2K2O*4*0*15*2K2O*4*0*15*2K2O*4*0*47*2K*3*~1,112,408,0,0,Right|6,193,386,wait:2;0;this:turnon:this:activate:jail,0,1,64,64|3:jail,334,464,7,1,113.113.113.113.113.113.113,2,64,16,0,-5,0,0,-,10,10,64,64,0,0,r,d,10,10,c,1,1,0.2|14,589,451,r,0~0*450*~~My%20Level~1~1,1~0~
SIR, I THINK THE GRAVITY IS EFFED UP
1 Create a Trigger
2 In the Events Tab, add the 'gravity' Event and choose which way "Up" should be
3 That's it!
- Code: Select all
150x50~0*31*2O*4*0*12*2K*3*0*31*2O*4*0*12*2K*3*0*31*2O*4*0*12*2K*3*0*31*2O*4*0*12*2K*3*0*31*2O*4*0*12*2K*3*0*31*2O*4*0*12*2K*3*0*31*2O*4*0*12*2K*3*0*31*2O*4*0*12*2K*3*0*31*2O*4*0*12*2K*3*0*31*2O*4*0*12*2K*3*0*31*2O*4*0*12*2K*3*0*31*2O*4*0*12*2K*3*0*31*2O*4*0*12*2K*3*0*31*2O*4*0*12*2K*3*0*31*2O*4*0*12*2K*3*0*31*2O*4*0*12*2K*3*0*31*2O*4*0*12*2K*3*0*31*2O*4*0*12*2K*3*0*31*2O*4*0*12*2K*3*0*31*2O*4*0*12*2K*3*0*34*2O0*12*2K*3*0*34*2O0*12*2K*3*0*34*2O0*12*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*~1,112,1432,0,0,Right|5,189,1168,wait:0;32:turnon:this:gravity:0,1,1|5,359,1476,wait:0;32:turnon:this:gravity:180,1,1~0*7500*~~My%20Level~1~1,1~0~
YOU ARE THE CAMERA.
Finally our hero has found the lost treasure of the old, Indian faskjasfiosdfho Tribe... but the entrace is blocked off. There is a switch far out there, but how should he know it opened the shaft?
1 Block, Switch.
2 Now we're getting serious with events. Before, it was pretty uninteresting in which order the events where. Not anymore. Nuke all events first.
3 We start off with the Activate event. Activate your block.
4 Below this one, we put the Camera event. Tick the Linkage box and type in the block's name. You may also adjust the zoom - the higher, the closer.
5 At the bottom we add a wait event. 60 frames are one second, so if we want to wait 2 seconds type in 120. Untick both boxes if they are ticked.
6 Now we add the Camera Off Event so the cam returns.
7 Last but not least, a Turn On event, and put 'this' into the linkage box.
- Code: Select all
150x50~0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*46*2L2K*3*0*45*2L2O2K*3*0*44*2L2O*2*2K*3*0*43*2L2O*3*2K*3*0*42*2L2O*4*2K*3*0*41*2L2O*5*2K*3*0*40*2L2O*6*2K*3*0*39*2L2O*7*2K*3*0*39*2K2O*7*2K*3*0*47*2K*3*0*47*2K*3*0*39*2M2O*5*0*2*2K*3*0*40*2M2O*4*0*2*2K*3*0*41*2M2O*3*0*2*2K*3*0*42*2M2O*2*0*2*2K*3*0*43*2M2O*3*2K*3*0*44*2M2O*2*2K*3*0*45*2M2O2K*3*0*46*2M2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*~1,112,1432,0,0,Right|3:block,512,1232,2,1,113.113,2,64,16,0,0,0,0,-,1,1,64,64,0,0,l,0,0.2,0.2,c,1,1,0.2|8,644,1458,r,0|8,653,1448,r,0|8,639,1439,r,0|8,634,1439,r,0|8,635,1448,r,0|8,616,1460,r,0|8,620,1447,r,0|8,644,1436,r,0|8,642,1420,r,0|8,631,1425,r,0|8,613,1434,r,0|8,605,1452,r,0|8,625,1463,r,0|8,653,1457,r,0|8,666,1454,r,0|8,657,1428,r,0|8,660,1418,r,0|8,660,1419,r,0|12,575,1475,lol.%20coin%20spam.,0|13,160,1152,20,15,0|5:switch,1868,1478,camera:1;0;0;0;block;200;1;10:activate:block:wait:0;120;:cameraoff::turnon:this,1,1~0*7500*~~My%20Level~1~1,1~0~
MOVING ITEMS
A coin that runs away from you. A bridge materializing below your feet. Faking a storm. Everything is possible with the Move Item Event.
It will move around any items - including the goal! Just keep in mind:
- 1 tile = 1 pixel
- Absolute means that it will be placed right there and won't change position when using the trigger again
- Relative adds the x and y values to the current position and will change position when using the trigger again
- Bigger X = farther to the right, Bigger Y = farther down
Check this level for some examples:
- Code: Select all
150x50~0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2M2K*2*0*647*2L2K*2*0*47*2K*3*0*47*2M2K*2*0*1347*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*0*47*2K*3*~1,112,1432,0,0,Right|7:plat1,336,1320,7,4,0,64,16,0,3,48,4,0,-,3,3,64,64,0,0,0,0,0.5,0.5,c,1,3,0.5|7:plat2,432,1320,7,4,0,64,16,0,3,48,4,0,-,3,3,64,64,0,0,0,0,0.5,0.5,c,1,3,0.5|7:plat3,528,1320,7,4,0,64,16,0,3,48,4,0,-,3,3,64,64,0,0,0,0,0.5,0.5,c,1,3,0.5|7:plat4,624,1320,7,4,0,64,16,0,3,48,4,0,-,3,3,64,64,0,0,0,0,0.5,0.5,c,1,3,0.5|6,192,1440,wait:2;0;this:turnon:this:moveitem:plat1;0;336;1504;1;0;0;0,0,1,64,64|6,288,1440,wait:2;0;this:turnon:this:moveitem:plat2;0;432;1504;1;0;0;0,0,1,64,64|6,384,1440,wait:2;0;this:turnon:this:moveitem:plat3;0;528;1504;1;0;0;0,0,1,64,64|6,480,1440,wait:2;0;this:turnon:this:moveitem:plat4;0;624;1504;1;0;0;0,0,1,64,64|7:plat5,864,1478,4,4,0,64,16,1,1,48,1,0,-,3,3,64,64,0,0,0,0,0.5,0.5,c,1,3,0.5|6,705,1375,turnon:this:moveitem:plat5;1;2;0;1;0;0;0,1,1,1280,160|14:goal,2223,1476,r,0|6:trig,2142,1352,turnon:this:moveitem:trig;1;10;0;1;0;0;0:moveitem:goal;1;10;0;1;0;0;0,1,1,160,160~0*7500*~~My%20Level~1~1,1~0~
(first one to get into the goal gets cookie) Kirbeh8 sez: I got into the goal. Nobody else said so. Does that mean I gets cookie?
COMING SOON: editing the level in-game