• All, I am currently in the process of migrating domain registrations. During this time there may be some intermittent outages or slowdowns. Please contact staff if you have any questions.

[Tutorial] Custom Spawn/intro for stages

magggas that's enough, you made your point. You've been out of line quite a bit lately, and I'm growing weary of it. You are one of the best and brightest here, but that's no excuse to be abrasive. I saw where you said if others don't like your attitude it's on them. I'll remind you - this is my house, and I am the one who decides what is OK and what is not. Please lay off people before I have to take further action.

Thread locked.
 
I've edited the first topic to clarify what happened. And, again, by no means I wanted to steal work from someone - specially from someone I admire like Bloodbane
I will let this topic open so people can ask for help and make questions.

But we would like to ask the users to keep the topic on track and talk just about the tutorial, ok?
Thanks.
 
Hey, sorry to bother you once again, but in attempting this script something isn't letting the animation be affected.

I had followed Bloodbane's original example and ended up finding yours. Everything works, except the animation change - it still plays the idle animation.
Here's the code I'm using:
Code:
levelscript @script
void main()
{
int P1 = getplayerproperty(0, "entity");
int P2 = getplayerproperty(1, "entity");

if(P1){
changeentityproperty(P1, "position", 100,153,226);
changeentityproperty(P1, "direction", 1); //Face right
changeentityproperty(P1, "animation", openborconstant("ANI_FOLLOW1"));
}
if(P2){
changeentityproperty(P2, "position", -490,189, 0);
changeentityproperty(P2, "direction", 1); //Face right
changeentityproperty(P2, "animation", openborconstant("ANI_FOLLOW1"));
}
}
@end_script
As everything "changeentityproperty" did change that following entity's property, I'm not quite sure what's the issue with the animation - I set follow1 as the animation, and made follow 1 a replica of her jump animation. Trying to use the other values like "ANI_JUMP" also still only render the idle animation. Seeing how everything works properly, I'm puzzled at what could be the issue. Here's a video to show how it's going.
Thanks in advance!
 
Gotcha - I thought the "spawn" merely referred to placing something else to work as the spawn animation and not all caps Spawn which refers to an animation type. It is fixed now.

Thank you!
 
I've edited the first topic to clarify what happened. And, again, by no means I wanted to steal work from someone - specially from someone I admire like Bloodbane
I will let this topic open so people can ask for help and make questions.

But we would like to ask the users to keep the topic on track and talk just about the tutorial, ok?
Thanks.
I see you've been helping out others alot on the site, especially newbie like me. We are greatly appreciated for time and your hard work.
I don't know what "Custom Spawn/intro for stages" is for.
Do you have any sample that I can see if this is something I may need before I start working on this tutorial method?
Thank you so much
 
These intros work pretty well, but how to make these custom animations to be at the end of a stage or in between a stage transition?
 
I see you've been helping out others alot on the site, especially newbie like me. We are greatly appreciated for time and your hard work.
Oh thanks for the nice words :) Means a lot.

"Custom intros", as the name says, it's a technique we use to make characters enter a level by doing a different animation than Spawn.

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)


There is an example in the topic itself, read the "Entity based method" part :)

These intros work pretty well, but how to make these custom animations to be at the end of a stage or in between a stage transition?
Thanks. About your question, depends of what you want to do.
Basically you can use the same entity based method (since its easier to do) to mimic things like victory screens (the native VICTORY animation is bugged).
But you would need to add an extra line, to prevent players to break the animation:

C-like:
changeentityproperty(P1,"noaicontrol",1);
 
Oh thanks for the nice words :) Means a lot.

"Custom intros", as the name says, it's a technique we use to make characters enter a level by doing a different animation than Spawn.

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)


There is an example in the topic itself, read the "Entity based method" part :)


Thanks. About your question, depends of what you want to do.
Basically you can use the same entity based method (since its easier to do) to mimic things like victory screens (the native VICTORY animation is bugged).
But you would need to add an extra line, to prevent players to break the animation:

C-like:
changeentityproperty(P1,"noaicontrol",1);
ahh I see, that's pretty cool! Thanks
 
I’d like to make the player spawn from offscreen running into screen, similar to Kitty in your video, so I’m thinking on doing the script to put on the leveltext.
My question, pretty basic question sorry, is how did you do the kitty’s anim follow for that custom spawn: using the running sprites with jump frame? Move command? (If possible can you share the code of that ahimation?)
 
Sure thing. The important things will be colored.

First, we need to put the code in the stage, to force the character to use that animation and not the regular spawn animation ( you can put this in any entity you want, but needs to be spawned at 0 pos):

spawn empty
@script
void main()
{
int P1 = getplayerproperty(0, "entity");
int P2 = getplayerproperty(1, "entity");

if(P1){
changeopenborvariant("nojoin", 1);
changeentityproperty(P1, "position", -290,160, 0);
changeentityproperty(P1, "direction", 1); //Face right
changeentityproperty(P1, "animation", openborconstant("ANI_FOLLOW59"));
}
if(P2){
changeentityproperty(P2, "position", -290,170, 0);
changeentityproperty(P2, "direction", 1); //Face right
changeentityproperty(P2, "animation", openborconstant("ANI_FOLLOW59"));
}
}
@end_script

coords 180 189
at 0
Pay attentiont that I am locking the other players to join (using nojoin), so we will need to disable this later.
I do this to prevent the second player to break the custom spawn animation.
Also, the code takes care only for 2 players, but its easy to add more.

Then I use two animations for that

- Follow59
- CANT

The Follow59 anim:
anim follow59
loop 1 2 7
offset 40 69
delay 30
unsummonframe 0
subentity Lockheed
summonframe 1 -200 1 0 0
@script
void self = getlocalvar("self");
int x = getentityproperty(self, "x");
if(x>=100)
{
changeentityproperty(self,"subject_to_screen",1);
changeentityproperty(self,"subject_to_wall",1);
performattack(getlocalvar("self"), openborconstant("ANI_CANT"));
}
@end_script
@cmd subjectScreen 0

drawmethod alpha 6
drawmethod channel 0.55
frame data/sprites/0empty.gif
delay 6
@cmd velo001 2.75 0 0
frame data/chars/shadowcat/sc_058.gif
frame data/chars/shadowcat/sc_059.gif
sound data/sounds/step.wav
frame data/chars/shadowcat/sc_060.gif
frame data/chars/shadowcat/sc_061.gif
frame data/chars/shadowcat/sc_062.gif
sound data/sounds/step.wav
frame data/chars/shadowcat/sc_063.gif
As we spawn the entity at -290px offscreen, we need to turn off "subject_to_screen".
After you reached the x position 100, the entity will go to the animation CANT.

I use the CANT animation as a wildcard for a lot of things, like a reset:

anim cant
loop 0
offset 40 69
bbox 34 26 16 43
delay 4
@cmd clearL
@cmd subjectScreen 1
@cmd noplayerJoin 0

frame data/chars/shadowcat/sc_000.gif

Those are the functions I use as animation script (put them on your animation script file):

C-like:
void clearL()
{// Clears all local variables
     clearlocalvar();
}

void subjectScreen (int iG)
{
// controls the subject to screen
// Douglas Baldan/O Ilusionista
void self = getlocalvar("self");
changeentityproperty(self,"subject_to_screen",iG);
}

void noplayerJoin (int iG)
{
// controls if other players can join the game or not
// 1 - players CAN NOT join, 0 play CAN join
// remember to set it 0 when you are done, or you will have a 1P only game.
// Douglas Baldan/O Ilusionista - 20/09/14
changeopenborvariant("nojoin", iG);

If you have any questions, feel free to post them.

Note: I am following a standard here, so any follow bigger than 50 is a custom animation, so all the characters uses the same animation for the same thing.
For my charactgers attacks, I use the FOLLOW1-FOLLOW39 if I need. FOLLOW40 is my wall bounce animation, and so on.

I strongly suggest you to do the same, as things gets more organized
 
@O Ilusionista
To get this custom spwan script working more than once (when on the same stage) you need to exit openbor and re-open the .exe? not only exit game and load game?
 
Back
Top Bottom