O Ilusionista
Captain 80K
Custom Spawn/intro for stages tutorial
By Bloodbane, modified by O Ilusionista*
* Explaining this tutorial:
I have no intention in stealing other people credits, at all. The version I did is a tad different from the Bloobane version but yes, he should be credited - when I found this code, I forgot who made it (back when I was just copy and past codes on my notepad without knowing who did them - now I simply forward the topic to me). It was a honest mistake, by no means I intended to steal something from Bloodbane , someone that inspires me.
I just had modified the code to fits my need - adding an specific animation to the spawn - and made the tutorial. The original code was made by Bloodbane.
Now the original text bellow:
Imade modified this code years ago and saw that someone asked about something similar at my FB group. Basically, this code allows you to do a custom spawn for each stage - and that's how I do the intros in my game. The original was made by Bloodbane - ChronoCrash
Credits fixed
You will need an entity to trigger this (it can be any entity, I use a wildcard entity called "empty") or use this as levelscript.
ah, just an extra tip I forgot to say - Your character NEEDS TO HAVE A SPAWN ANIMATION, or it won't work.
In the code below, I position the players (my game only has 2) where I want (-490,189, 0 - yeah, I spawn the player outside the screen), facing the side I want (direction) and the animation I want (FOLLOW60).
Tips
1- Do not use this code in updatescript, because it is triggered all the time. Levelscript is fired once when the scene is loaded
2- You can block another player from entering the game (as in my game),
but you need to enable it back, or if you die ... nor either you can return to the game.
3- Remember to increase the number of MAXFOLLOWS.
4- This code fires just one time, when the players spawns on the level. It won't affect any respawn animation.
######## Entity based method (spawnscript)
######## Levelscript method
Just paste this in your level .txt
Those intros adds some cool effect so give it a try
In this video you can see her in action - this is how I make Deadpool/Captain appear on screen.
Another example is the animation that Kitty Pryde performs when entering the screen (she comes running from off-screen, instead of using the normal Spawn animation)
By Bloodbane, modified by O Ilusionista*
* Explaining this tutorial:
I have no intention in stealing other people credits, at all. The version I did is a tad different from the Bloobane version but yes, he should be credited - when I found this code, I forgot who made it (back when I was just copy and past codes on my notepad without knowing who did them - now I simply forward the topic to me). It was a honest mistake, by no means I intended to steal something from Bloodbane , someone that inspires me.
I just had modified the code to fits my need - adding an specific animation to the spawn - and made the tutorial. The original code was made by Bloodbane.
Now the original text bellow:
I
Credits fixed
You will need an entity to trigger this (it can be any entity, I use a wildcard entity called "empty") or use this as levelscript.
ah, just an extra tip I forgot to say - Your character NEEDS TO HAVE A SPAWN ANIMATION, or it won't work.
In the code below, I position the players (my game only has 2) where I want (-490,189, 0 - yeah, I spawn the player outside the screen), facing the side I want (direction) and the animation I want (FOLLOW60).
Tips
1- Do not use this code in updatescript, because it is triggered all the time. Levelscript is fired once when the scene is loaded
2- You can block another player from entering the game (as in my game),
Code:
changeopenborvariant("nojoin", 1);
3- Remember to increase the number of MAXFOLLOWS.
4- This code fires just one time, when the players spawns on the level. It won't affect any respawn animation.
######## Entity based method (spawnscript)
spawn empty
@script
void main()
{
int P1 = getplayerproperty(0, "entity");
int P2 = getplayerproperty(1, "entity");
if(P1){
changeentityproperty(P1, "position", -490,189, 0); // Set position
changeentityproperty(P1, "direction", 1); //Face right
changeentityproperty(P1, "animation", openborconstant("ANI_FOLLOW60"));
}
if(P2){
changeentityproperty(P2, "position", -490,189, 0);
changeentityproperty(P2, "direction", 1); //Face right
changeentityproperty(P2, "animation", openborconstant("ANI_FOLLOW60"));
}
}
@end_script
coords 180 189
at 0
######## Levelscript method
Just paste this in your level .txt
Code:
levelscript @script
void main()
{
int P1 = getplayerproperty(0, "entity");
int P2 = getplayerproperty(1, "entity");
if(P1){
changeentityproperty(P1, "position", -490,189, 0);
changeentityproperty(P1, "direction", 1); //Face right
changeentityproperty(P1, "animation", openborconstant("ANI_FOLLOW60"));
}
if(P2){
changeentityproperty(P2, "position", -490,189, 0);
changeentityproperty(P2, "direction", 1); //Face right
changeentityproperty(P2, "animation", openborconstant("ANI_FOLLOW60"));
}
}
@end_script
Those intros adds some cool effect so give it a try
In this video you can see her in action - this is how I make Deadpool/Captain appear on screen.
Another example is the animation that Kitty Pryde performs when entering the screen (she comes running from off-screen, instead of using the normal Spawn animation)
Last edited: