O Ilusionista
Captain 100K
I honestly don't know how to make the character switch to a different sprite as soon as it touches the ground.
Use landframe for that. You can set a long delay on the previous frame, like 500.
I honestly don't know how to make the character switch to a different sprite as soon as it touches the ground.
Bloodbane said:Hmmm... sounds like your 1vs1 system is different than what I had in mind. Let me confirm this:
1. Do players start with just one life or not?
2. If player dies and run out of lives, will player be allowed to continue?
3. If player does continue, will the match be restarted (both fighters start from original starting spot and with full health) or just be continued with compensation such as opponent gets health refill?
This is not needed anymore, because we have victory animations now.You spawn an entity called "Victory1" that forces the player 1 to play a specific animation like say, ANIM FOLLOW
GaBoTiCo said:Also, when both Player or Enemy dies I want the music to stop playing and I would like a slowdown effect, not only when the Enemy dies.
anim death
@script
if(frame==1){
changeopenborvariant("slowmotion", 1); // activates slow motion
}
if(frame==5){
changeopenborvariant("slowmotion", 0); // deactivates slow motion
}
@end_script
...
void main()
{
changeopenborvariant("slowmotion", 0);
}
GaBoTiCo said:So, I never figured a way to stop playing the Music however, I found a way to set the music volume to 0 with a line (@cmd setmusicvolume 0 0), I does the trick. And also, as nsw25 suggested, I gave the player a pretty big attack box on its death animation but, it doesn't always work. Sometimes the enemy does NOT react to it.
anim death
@script
void self = getlocalvar("self");
if(frame == 0){
playmusic("data/music/silence.bor", 1);
}
@end_script
sound data/sounds/(tmnt2/death.wav
loop 0
offset 42 111
delay 80
frame data/chars/chrome_dome/pain.png
anim freespecial **special attack
energycost 60 1
mponly 1
loop 0
offset 42 111
jumpframe 0 3 0
landframe 1
quakeframe 1 2 2
delay 400
sound data/sounds/(tmnt2/throw01.wav
frame data/chars/chrome_dome/jump.png
delay 12
@cmd spawnmerso "chrome_quake" 120 0 200
sound data/sounds/(tmnt3/battleship_cannon_shoot.wav
frame data/chars/chrome_dome/idle.png
name chrome_quake
type panel
subtype noskip
setlayer 500
Health 1
nolife 1
lifespan 1
nomove 1 1
alpha 1
speed 10
facing 1
candamage enemy
anim spawn
offset 120 196
delay 6
attack 0 0 320 240 5 1 0 1 0 500
frame data/chars/misc/empty.gif
void spawnmerso(void vName, float fX, float fY, float fZ)
{
//Spawns entity based on left screen edge and z axis
//Auto adjust with camera's position
//vName: Model name of entity to be spawned in.
//fX: X distance relative to left edge
//fY: Y height from ground
//fZ: Z coordinate
void self = getlocalvar("self"); //Get calling entity.
void vSpawn; //Spawn object.
int XPos = openborvariant("xpos"); //Get screen edge's position
int YPos = openborvariant("ypos"); // Get camera position
int Screen = openborvariant("hResolution"); // Get screen width
clearspawnentry(); //Clear current spawn entry.
setspawnentry("name", vName); //Acquire spawn entity by name.
vSpawn = spawn(); //Spawn in entity.
changeentityproperty(vSpawn, "position", fX + XPos, fZ + YPos, fY); //Set spawn location.
return vSpawn; //Return spawn
}