In Progress Ranma ½

The project is currently under development.
I need some assistance. I've been trying to get the player to replenish the enemy's health when chosen to "continue". I was thinking that I could use "anim respawn" on the player's .txt file but I have no clue what to do.  Thanks in advance  :) !
 
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?
 
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?

1. Yes, players start with 1 life. I did that because I didn't want the player to start another life with full health while the enemy has the same amount of health he/she had when the player lost a life.

2.Yeah, I wanted the player to be allowed to continue as long as the enemy's life is replenished.

3. I wanted the match to be restarted (both fighters start from original starting spot and with full health) but I didn't think it was possible "until" I found out about "jumptobranch".

Well,  I didn't think it was possible to "restart" the level so I wanted the enemy's health to be refilled IF the player decided to continue however, I was reading some of the Tutorials in the "Help & Resources" section  and there is a thread called "Restart Level After Player's Death" or something like that (started by BeasTie I think) where you use a function called "jumptobranch" but I need to set up branches first. I believe that's a better idea than I wanted to do. Also I found out about a "Victory Pose" that MersoX used for his Power Rangers MOD which I believe he got from you. You spawn an entity called "Victory1" that forces the player 1 to play a specific animation like say, ANIM FOLLOW 1. I added that to my MOD and got it to work. I just have to give the characters winning animations. Thanks once again, Bloodbane  :)
 
Yes, that is true. When I found out about that feature I was dying to try it and I downloaded a recent version of OpenBOR where "anim victory" was already implemented but, as soon as I opened OpenBOR.exe, it closed. I checked the Logs folder and there was nothing so I decided to use Bloodbane's method. I still have NO clue what the reason behind it is.
 
I just wanna say THANK YOU to everyone in Chrono Crash. I know this is pretty random but, I was finally able to figure how to do somethings I've been wanting to do for a while by going through the "Help & Resources" section.  I found a couple of extremely useful scripts. I can now go to a specific branch based on the character you're playing as. I also have a "Continue" screen and I'm able to restart a level after the player's death. So, I'm feeling pretty grateful. I'm hoping to have a DEMO soon. Thanks once again to the OpenBOR Community  :) .
 
Well, I was just working on this MOD and there are things I wanna do like, for example, I want to force the Enemy to play a specific animation when the Player dies. 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.
 
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.

You'd need to declare slowdown effect script in both player's and enemy's DEATH animation or at least in ondeathscript .
For script in DEATH animation you can use this:
Code:
anim	death
@script
    if(frame==1){
      changeopenborvariant("slowmotion", 1); // activates slow motion
    }
    if(frame==5){
      changeopenborvariant("slowmotion", 0); // deactivates slow motion
    }
@end_script
...

However, slowdown FX isn't deactivated on its own so you'll have to deactivate it yourself with the second line in above example. For stability, you'd need to create endlevel.c with this line:
Code:
void main()
{
  changeopenborvariant("slowmotion", 0);
}

HTH
 
Thank you so much, Bloodbane! I will try it as soon as I have a chance.

UPDATE: I just tried it! Works GREAT!  However, I never created an "endlevel.c" file and so far I haven't had any issues.
 
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.
 
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.

Sorry if it's too late to chime in.

This is what I use to stop music (basically it plays a silent file)

Code:
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

Instead of setting a huge attack box, I summon an invisible entity that damages all entities on screen:
Code:
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

This is the attacking entity:

Code:
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

This is spawnmerso:
Code:
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
}

It's a modified spawn06 script by DC.
 
No need to apologize mersox. Your help is much appreciated! I already tried this and it works GREAT! Thank you so much.
 
I just wanted to share this video that I just uploaded to YouTube. 

It might not seem like much but, I now have a CONTINUE screen and both Player and Enemy have a "Victory" animation. I lost on purpose on all 3 matches to show the Enemy playing its Victory animation and to show that if you choose to continue you will go straight to whoever was your last opponent. I also have  a "VS" screen, which is a nice touch, and you will fight different opponents based on who you choose to play as, to avoid fighting yourself. Also, I keep fighting the same character over  and over again because, well, I only have 2 characters so far.

I wanna thank Bloodbane and MersoX for the VERY useful scripts.

https://www.youtube.com/watch?v=9RWDTb7rBe8&feature=youtu.be
 
Back
Top Bottom