Page 6 of 13

Re: Designer Tips and Tricks

PostPosted: January 21st, 2013, 2:11 pm
by JSlayerXero
The player hit box for trigger detection doesn't touch the ground. As such you could make a 16-high hit box trigger on the ground and the only way to activate it is through crouching. Thus you can make mechanism and/or scripts that only work if the play crouches.

Springboard:
1. Place a button.
2. Add "Move Character"
3. Set "yspeed" to -y. Absolute/Relative only matters some
4. Add "Turn On Trigger"
5. Set "tag" to "this"
6. Jump on button. You can hold the Up arrow key to go higher
Note: Can be combined with the above to make a hidden spring trigger that only works if you crouch.
Note: Adding X momentum doesn't work on a crouch trigger but can on a button and a hit box trigger provided you don't touch the ground and/or move left/right

Button:
Code: Select all
llitem:5;208;1504;0;4;0;movechar,this,0,0,0,-13,0,0:sleep,30:turnon,this


Platform:
Code: Select all
llitem:7;264;1488;;1;2;all;0;0;5;300;0;100;0;90;30;0;3;3;5;5;5;5;30;30;128;128;0;0;0;0;3;10;10;30;0;1;1;-;0;2;16;5;0;90;1000;0;90;1;1;movechar,this,0,0,0,-13,0,0:sleep,30:turnon,this;1


Crouch Activated Hitbox:
Code: Select all
llitem:6;120;1488;64;16;0;1;movechar,this,0,0,0,-13,0,0:sleep,30:turnon,this

Re: Designer Tips and Tricks

PostPosted: January 27th, 2013, 4:39 am
by Timi
Super jump

Super jump: show
Code: Select all
150x50~~~~~0;103;1435;1;0;0~6;66;1391;64;64;0;1;movechar,this,0,0,0,-1.4,0,0:sleep,4:goto,0|7;94;1535;;1;2;all;0;0;5;300;0;100;0;90;30;0;3;3;5;5;5;5;30;30;128;128;0;0;0;0;3;10;10;30;0;1;1;-;0;4;64;5;0;0;1000;3;0;1;1;;1|7;927;1530;;1;2;all;0;0;5;300;0;100;0;90;30;0;3;3;5;5;5;5;30;30;128;128;0;0;0;0;3;10;10;30;0;1;1;-;0;4;64;5;0;0;1000;3;0;1;1;;1|7;1829;1465;;1;2;all;0;0;5;300;0;100;0;90;30;0;3;3;5;5;5;5;30;30;128;128;0;0;0;0;3;10;10;30;0;1;1;-;0;4;64;5;0;0;1000;3;0;1;1;;1|7;2620;1423;;1;2;all;0;0;5;300;0;100;0;90;30;0;3;3;5;5;5;5;30;30;128;128;0;0;0;0;3;10;10;30;0;1;1;-;0;4;64;5;0;0;1000;3;0;1;1;;1|7;3772;1566;;1;2;all;0;0;5;300;0;100;0;90;30;0;3;3;5;5;5;5;30;30;128;128;0;0;0;0;3;10;10;30;0;1;1;-;0;4;64;5;0;0;1000;3;0;1;1;;1|2;3776;1560|x49;3783;1407;1;1;80;|x48;3766;1407;1;1;0;|606;3776;1451;1;1;90;;0~Superjump%21~~1~1;0;0~0~20;0~0;0;3~1359289666~0.3


How to: 1) move character with relative y-speed of -1.4 - -2.5.
2) Sleep: 4-15 frames (depends on your y-speed)
3) Go to: line 1
4) Done

Btw: Lava tiles are still in-game. Tile-Id: bV (but Lava doesn't work anymore (it doesn't move). It's just a background tile...)

Re: Designer Tips and Tricks

PostPosted: February 6th, 2013, 12:00 pm
by JSlayerXero
Victory Jingle
So, I decided to utilize the ability to skip through a song by seconds. Feel free to copy/paste the code into a box trigger, a switch, another enemy, etc. Note: you cannot skip to part of a song that's currently playing, so if the Boss Theme is playing this sequence doesn't work.

Code: Select all
30x30~.285aa3.27abaaac.492aa90~~~5:end;464;867;0;4;1;movechar,this,0,0,0,-14,0,0:turnon,this~0;144;824;1;0;0|2;528;288~71;400;864;0;100,100,100,100,0,0,0,0,0,0,-20,80;1;2;12;setmusic,6,72:sleep,130:setmusic,0,0:sleep,30:setmusic,20,0:turnon,end~Victory%20Jingle%20Demo~JSlayerXero~1~1;0;0~0~9;0~0;1;0~1360180631~0.3

Re: Designer Tips and Tricks

PostPosted: February 17th, 2013, 7:26 pm
by JSlayerXero
Null Gravity and/or Friction Field
You know how in space the supposed lack of friction theoretically causes you to keep going in whatever direction endlessly? Yeah, I was testing stuff and... Well... See for yourself is all I can say. Experiment with this if you want.
Edit: There's one particular trigger I added in to replicate a famous glitch from SM63. You can remove it if you so desire.
Code: Select all
25x20~.425aa73aeaa~.180ae10.15ae10.15ae10.15ae10.15ae10.15ae10.15ae10.15ae10.15ae10.15ae10~~4;160;224;10;10;100,0~0;112;536;1;0;0~6;160;224;320;320;1;1;movechar,this,0,0,0,-0.5,0,0|6;160;288;320;64;1;1;sleep,1:movechar,this,0,0,0,0,1,0:invis_wait~My%20Level~~1~1;0;0~0~14;0~0;1;3~1361157987~0.3

Re: Designer Tips and Tricks

PostPosted: February 23rd, 2013, 9:04 pm
by AwesomeJRFD
Water!

It's kinda hard to explain how I did this. What I did was put triggers around the player that move the player at various speeds if the player enters them, as long as the player is in the water. Animating the water is pretty straightforward. The splashes are upside-down icicles which follow the player around and move to the player when you enter the water. The air counter is a timer that is only active when you're in the water, and resets when you leave.

Control the player in the water with the left and right arrow keys. Move left and right to move up. Don't move horizontally to sink. It's pretty easy to swim once you get the hang of it. You can even simulate diving by eagle kicking into the water!

Code: Select all
150x50~.4860ad4.110ad2aa2.32aa4ac.108abaa4.32aa5ac.106abaa5.32aa6ac.104abaa6.32aa7ac.102abaa7.32aa8ac.100abaa8.32aa9ac.98abaa9.32aa10ac.96abaa10.32aa11ac.94abaa11.32aa12ac.92abaa12.32aa13ac.90abaa13.32aa14ac.88abaa14.32aa15ac.86abaa15.32aa16ac.83ad2aa16.32aa17ad2.71aa28.32aa118.32aa116ae36aa88~.6029ah4.3ah4.3ah4.2ah4.2ah3.119ae34.116ae34.116ae34.116ae34.116ae34.116ae34.116ae34.116ae34.116ae34~415:splash;144;920;1.5;1;-180;100,100,100,100,0,0,0,0,-25;0|415:splash;144;912;1;1;-180;100,100,100,100,0,0,0,0,-25;0~~0;144;1464;1;0;0|9:water;1392;1392;0,25,100,75,0,0,0,0,25;34,20;ai680;all;0;0;5;300;0;100;0;90;30;0;3;3;5;5;5;5;30;30;128;128;0;0;0;0;3;10;10;30;0;1;1;-;0;1;64;5;0;0;1000;3;0;0;;1;1;1;0;1~6;864;1072;1088;512;0;1;set,g_swimming,1:move,splash,0,512,0,0:sleep,2:move,splash,0,-512,0,0:activate,breath:invis_wait:movechar,this,0,0,0,2,0,0:set,g_swimming,0:stoptrigger,breath:turnon,this|6:player;-112;1168;512;256;1;1;move,player,0,-32,0,0:move,splash,0,-32,0,0:branch,5,4,g_swimming,1:exit:movechar,this,0,0,0,0,0,0|6:player;-112;1456;512;256;1;1;move,player,0,32,0,0:move,splash,0,32,0,0:branch,5,4,g_swimming,1:exit:movechar,this,0,0,0,-2,0,0|6:player;-128;1184;256;512;1;1;move,player,-32,0,0,0:move,splash,-32,0,0,0:branch,5,4,g_swimming,1:exit:movechar,this,0,0,0,-3,0,0|6:player;160;1184;256;512;1;1;move,player,32,0,0,0:move,splash,32,0,0,0:branch,5,4,g_swimming,1:exit:movechar,this,0,0,0,-3,0,0|6;856;1088;64;512;0;1;movechar,this,0,0,0,-1,0,0:sleep,1:turnon,this|6;1896;1088;64;512;0;1;movechar,this,0,0,0,-1,0,0:sleep,1:turnon,this|6;112;1408;64;64;0;1;activate,animateLiquid|6;896;1008;1024;64;0;1;movechar,this,0,0,0,1,0,0|6:breath;864;1600;16;16;0;1;set,g_BREATH,10:subtitle,1,%3Cfont%20size%3D%2215%22%20color%3D%22%23FFFFFF%22%3EAir%0D%7B%24g_BREATH%7D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%3C/font%3E,0:sleep,30:sub,g_BREATH,g_BREATH,1:subtitle_off:branch,3,1,g_BREATH,0:movechar,this,0,2048,0,0,0,1|6:animateLiquid;-16;1600;16;16;0;1;set,a,0:move,water,1,0,0,0:sleep,1:add,a,a,1:branch,2,1,a,32:move,water,-32,0,0,0:goto,0~My%20Level~~2~0;0;0~0~10;0~0;0;3~1365055175~0.3


EDIT: Included Flowing Liquid Animation

EDIT2: Here's a version that doesn't move you upwards so much:

Spoiler: show
Code: Select all
150x50~.4860ad4.110ad2aa2.32aa4ac.108abaa4.32aa5ac.106abaa5.32aa6ac.104abaa6.32aa7ac.102abaa7.32aa8ac.100abaa8.32aa9ac.98abaa9.32aa10ac.96abaa10.32aa11ac.94abaa11.32aa12ac.92abaa12.32aa13ac.90abaa13.32aa14ac.88abaa14.32aa15ac.86abaa15.32aa16ac.83ad2aa16.32aa17ad2.71aa28.32aa118.32aa116ae36aa88~.6029ah4.3ah4.3ah4.2ah4.2ah3.119ae34.116ae34.116ae34.116ae34.116ae34.116ae34.116ae34.116ae34.116ae34~415:splash;144;920;1.5;1;-180;100,100,100,100,0,0,0,0,-25;0|415:splash;144;912;1;1;-180;100,100,100,100,0,0,0,0,-25;0~9;1424;1280;;7,6;.2aa3.4aa3.2aa14.2aa3.4aa3;all;0;0;5;300;0;100;0;90;30;0;3;3;5;5;5;5;30;30;128;128;0;0;0;0;3;10;10;30;0;1;1;-;0;1;64;5;0;0;1000;3;0;1;;1;1;0;0;1~0;144;1464;1;0;0|9:water;1392;1392;0,25,100,75,0,0,0,0,25;34,20;ai680;all;0;0;5;300;0;100;0;90;30;0;3;3;5;5;5;5;30;30;128;128;0;0;0;0;3;10;10;30;0;1;1;-;0;1;64;5;0;0;1000;3;0;0;;1;1;1;0;1~6;864;1072;1088;512;0;1;set,g_swimming,1:move,splash,0,512,0,0:sleep,2:move,splash,0,-512,0,0:activate,breath:invis_wait:movechar,this,0,0,0,2,0,0:set,g_swimming,0:stoptrigger,breath:turnon,this|6:player;-112;1168;512;256;1;1;move,player,0,-32,0,0:move,splash,0,-32,0,0:branch,5,4,g_swimming,1:exit:movechar,this,0,0,0,0,0,0|6:player;-112;1456;512;256;1;1;move,player,0,32,0,0:move,splash,0,32,0,0:branch,5,4,g_swimming,1:exit:movechar,this,0,0,0,-2,0,0|6:player;-128;1184;256;512;1;1;move,player,-32,0,0,0:move,splash,-32,0,0,0:branch,5,4,g_swimming,1:exit:movechar,this,0,0,0,-2.75,0,0|6:player;160;1184;256;512;1;1;move,player,32,0,0,0:move,splash,32,0,0,0:branch,5,4,g_swimming,1:exit:movechar,this,0,0,0,-2.75,0,0|6;856;1088;64;512;0;1;movechar,this,0,0,0,-1,0,0:sleep,1:turnon,this|6;1896;1088;64;512;0;1;movechar,this,0,0,0,-1,0,0:sleep,1:turnon,this|6;112;1408;64;64;0;1;activate,animateLiquid|6;896;1008;1024;64;0;1;movechar,this,0,0,0,1,0,0|6:breath;864;1600;16;16;0;1;set,g_BREATH,10:subtitle,1,%3Cfont%20size%3D%2215%22%20color%3D%22%23FFFFFF%22%3EAir%0D%7B%24g_BREATH%7D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%0D%3C/font%3E,0:sleep,30:sub,g_BREATH,g_BREATH,1:subtitle_off:branch,3,1,g_BREATH,0:movechar,this,0,2048,0,0,0,1|6:animateLiquid;-16;1600;16;16;0;1;set,a,0:move,water,1,0,0,0:sleep,1:add,a,a,1:branch,2,1,a,32:move,water,-32,0,0,0:goto,0|6;1352;1192;64;64;0;1;movechar,this,0,0,0,-1,0,0:sleep,1:turnon,this|6;1352;1304;64;64;0;1;movechar,this,0,0,0,-1,0,0:sleep,1:turnon,this|6;1432;1304;64;64;0;1;movechar,this,0,0,0,-1,0,0:sleep,1:turnon,this|6;1432;1192;64;64;0;1;movechar,this,0,0,0,-1,0,0:sleep,1:turnon,this|6;1496;1248;64;64;0;1;movechar,this,0,0,0,-1,0,0:sleep,1:turnon,this|6;1288;1248;64;64;0;1;movechar,this,0,0,0,-1,0,0:sleep,1:turnon,this~Water%20Test~AwesomeJRFD~2~0;0;0~0~10;0~0;0;3~1365893045~0.3

Re: Designer Tips and Tricks

PostPosted: February 23rd, 2013, 9:15 pm
by Zunar
Nice, although I'm sure Runouw is going to implement real water in a future update.

Re: Designer Tips and Tricks

PostPosted: March 23rd, 2013, 6:12 pm
by Raz
Image
Image

Re: Designer Tips and Tricks

PostPosted: March 24th, 2013, 1:11 pm
by AwesomeJRFD
Random number generator

Code: Select all
llitem:6:randomizer;-16;1600;16;16;0;1;set,g_rand,1:sleep,1:add,g_rand,g_rand,1:branch,4,1,g_rand,g_maxrand:goto,0

Paste this into your level, and every time you use g_rand, it will be a random integer between 1 and g_maxrand.

Make sure to activate randomizer first



Example level:

Code: Select all
150x50~.7050aa450~~~30;240;1512;1;1;0;;text,1,Press%20this%20button%20to%20display%20a%20random%20number%20between%201%20and%204.~0;144;1504;1;0;0~6:randomizer;-16;1600;16;16;0;1;set,g_rand,1:sleep,1:add,g_rand,g_rand,1:branch,4,1,g_rand,g_maxrand:goto,0|6;112;1448;64;64;0;1;set,g_maxrand,4:activate,randomizer|5;304;1504;0;1;0;subtitle,0,%7B%24g_rand%7D,50:sleep,108000:subtitle_off~Random%20test~AwesomeJRFD~0~0;0;0~0~0;0~0;0;3~1364159892~0.3

Re: Designer Tips and Tricks

PostPosted: April 3rd, 2013, 1:57 pm
by AwesomeJRFD
Player Coordinates

Code: Select all
llitem:0;144;1504;1;0;0|6:player;-112;1504;512;256;1;1;move,player,0,32,0,0:add,g_playerY,g_playerY,32|6;112;1448;64;64;0;1;set,g_playerX,144:set,g_playerY,1504|6:player;-128;1232;256;512;1;1;move,player,-32,0,0,0:sub,g_playerX,g_playerX,32:set,g_F,0|6:player;-112;1216;512;256;1;1;move,player,0,-32,0,0:sub,g_playerY,g_playerY,32|6:player;160;1232;256;512;1;1;move,player,32,0,0,0:add,g_playerX,g_playerX,32:set,g_F,1


Paste this into your level so that the center trigger is right on the Player Start Position. Make sure g_playerX and g_playerY in the center trigger are set to the Player Start Position's coordinates.

Also, g_F is roughly the direction the player is facing.

Re: Designer Tips and Tricks

PostPosted: April 3rd, 2013, 9:48 pm
by AwesomeJRFD
Flowing Liquid Animation

Code: Select all
llitem:6:animateLiquid;-16;1664;16;16;0;1;set,a,0:move,liquid,1,0,0,0:sleep,1:add,a,a,1:branch,2,1,a,32:move,liquid,-32,0,0,0:goto,0


Paste this into your level. Make sure to activate "animateLiquid". Any item tagged "liquid", and placed like this will be animated:
Image

Make sure the liquid extends 1½ tiles to the left of the edge of the pool, and ½ tile to the right of the pool.

Remember: triggers do not work through level transitions, so you must have an "animateLiquid" and activate it in every section of the level which you want animated liquids and that is separated by level transitions.

You can use my water level above as an example.