Stage with specific character

Hello.
Is posible make that? I explain: i want certain character for stage 1 and 3 but she/he can not be selected or is banned for stage 2,4 and 10.

Ps: i understood the long part of scripts are put inside the .c file found in scripts folder, right?

Thank you by read.
 
Yes, on Art of Fighting: Trouble in Southtown there is a script so that regardless of the character you choose, a specific one is selected for a stage, and then in the next one you return to the usual character. The original script killed characters 2, 3 and 4, and I fixed it so that depending on the stage, characters 2 to 4 are the same character, hidden invisibly, or just not changed, depending on your needs. If any of these work for you, I can send the scripts to you.
 
EDIT: I have realized that all of these scripts are for 3 players, but if you understand the code, it will be easy for you to add the fourth (or remove the third, if your game is for two players) /EDIT

This is for one player only. At stage start put this, where is "nameofcharacter" put the name of the character you want to change to the first player available. The rest of the players remain as they are:

Code:
spawn   1pchosse
alias   nameofcharacter
coords  X Y
at      0

1pchosse.txt

Code:
name	1pchosse
type	none
nolife	1
antigravity 100
shadow  0
offscreenkill	80000


script @script
void main()
{
    void self = getlocalvar("self");
    char Name = getentityproperty(self,"name");
    int P1 = getplayerproperty(0, "entity");
    int P2 = getplayerproperty(1, "entity");
    int P3 = getplayerproperty(2, "entity");

	if (P1 != NULL())
	{
	changeentityproperty(P1, "model", Name, 1);
	changeentityproperty(P1, "defaultname", Name);
	}
	else if (P2 != NULL())
	{
	changeentityproperty(P2, "model", Name, 1);
	changeentityproperty(P2, "defaultname", Name);
	}
	else if (P3 != NULL())
	{
	changeentityproperty(P3, "model", Name, 1);
	changeentityproperty(P3, "defaultname", Name);
	}
}
@end_script



anim 	idle
	loop	1
	delay	3
	offset	1 1
	frame	data/chars/misc/empty.gif
	frame	data/chars/misc/empty.gif
	frame	data/chars/misc/empty.gif
 
This is for one player only. But unlike the previous one, the rest of the players become invisible and inactive until the next stage. That is, only the first available player plays. At stage start put this, where is "nameofcharacter" put the name of the character you want to change to the first player available.

You need to create a invisible entity named "mrzero"

Code:
spawn   1ponly
alias   nameofcharacter
coords  X Y
at      0

1ponly.txt

Code:
name	1ponly
type	none
nolife	1
antigravity 100
shadow  0
offscreenkill	80000



script @script
void main()
{
    void self = getlocalvar("self");
    char Name = getentityproperty(self,"name");
    int HP = getentityproperty(self,"health");
    int MP = getentityproperty(self,"aggression");
    int P1 = getplayerproperty(0, "entity");
    int P2 = getplayerproperty(1, "entity");
    int P3 = getplayerproperty(2, "entity");

	void anim1 = getentityproperty(P1,"animationID");
	void anim2 = getentityproperty(P2,"animationID");
	void anim3 = getentityproperty(P3,"animationID");

	changeopenborvariant("nojoin", 1);

	if (P1 != NULL() && P2 != NULL() && P3 != NULL())
	{
	changeentityproperty(P1, "model", Name, 1);
	changeentityproperty(P1, "defaultname", Name);
	changeentityproperty(P2, "stealth", 8);
	changeentityproperty(P2, "model", "mrzero", 1);
	changeentityproperty(P3, "stealth", 8);
	changeentityproperty(P3, "model", "mrzero", 1);
    bindentity(P2, P1, 0, 0, 0, 0, 0);
    bindentity(P3, P1, 0, 0, 0, 0, 0);
	}
	else if (P1 != NULL() && P2 != NULL() && P3 == NULL())
	{
	changeentityproperty(P1, "model", Name, 1);
	changeentityproperty(P1, "defaultname", Name);
	changeentityproperty(P2, "stealth", 8);
	changeentityproperty(P2, "model", "mrzero", 1);
    bindentity(P2, P1, 0, 0, 0, 0, 0);
	}
	else if (P1 != NULL() && P2 == NULL() && P3 == NULL())
	{
	changeentityproperty(P1, "model", Name, 1);
	changeentityproperty(P1, "defaultname", Name);
	}
	else if (P1 != NULL() && P2 == NULL() && P3 != NULL())
	{
	changeentityproperty(P1, "model", Name, 1);
	changeentityproperty(P1, "defaultname", Name);
	changeentityproperty(P3, "stealth", 8);
	changeentityproperty(P3, "model", "mrzero", 1);
    bindentity(P3, P1, 0, 0, 0, 0, 0);
	}
	else if (P1 == NULL() && P2 != NULL() && P3 != NULL())
	{
	changeentityproperty(P2, "model", Name, 1);
	changeentityproperty(P2, "defaultname", Name);
	changeentityproperty(P3, "stealth", 8);
	changeentityproperty(P3, "model", "mrzero", 1);
    bindentity(P3, P2, 0, 0, 0, 0, 0);
	}
	else if (P1 == NULL() && P2 != NULL() && P3 == NULL())
	{
	changeentityproperty(P2, "model", Name, 1);
	changeentityproperty(P2, "defaultname", Name);
	}
	else if (P1 == NULL() && P2 == NULL() && P3 != NULL())
	{
	changeentityproperty(P3, "model", Name, 1);
	changeentityproperty(P3, "defaultname", Name);
	}

	if (anim1 == openborconstant("ANI_SPAWN"))
	{
	changeentityproperty(P1, "health", HP);
	changeentityproperty(P1, "mp", MP);
	}
	else if (anim2 == openborconstant("ANI_SPAWN"))
	{
	changeentityproperty(P2, "health", HP);
	changeentityproperty(P2, "mp", MP);
	}
	else if (anim3 == openborconstant("ANI_SPAWN"))
	{
	changeentityproperty(P3, "health", HP);
	changeentityproperty(P3, "mp", MP);
	}
}
@end_script



anim 	idle
	loop	1
	delay	3
	offset	1 1
	frame	data/chars/misc/empty.gif
	frame	data/chars/misc/empty.gif

mrzero.txt

Code:
name		mrzero
type		none
health		200
mp		100
cantgrab	1
jumpheight	0
mprate          3
nomove		1 1
modelflag	3
weaploss	3
noquake         1

subject_to_gravity      0
subject_to_platform 	0
subject_to_obstacle 	0

subject_to_screen 	0
diesound        data/sounds/empty.wav
icon		data/chars/0null/icon.gif
parrow          data/chars/0null/empty.gif
parrow2         data/chars/0null/empty.gif
parrow3         data/chars/0null/empty.gif




palette	none

anim	attack1
	loop	0
	delay	500
	offset	5 5
	bbox	0 0 0 0
	frame	data/chars/0null/empty.gif
		
anim	fall
	loop	0
	delay	10
	offset	5 5
	bbox	0 0 0 0
	sound	data/sounds/empty.wav
	frame	data/chars/0null/empty.gif
		
anim	grabbed
	loop	0
	delay	100
	offset	5 5
	bbox	0 0 0 0
	frame	data/chars/0null/empty.gif
		
anim	idle
	loop	1
	delay	55
	offset	5 5
	bbox	0 0 0 0
	frame	data/chars/0null/empty.gif
	frame	data/chars/0null/empty.gif
	frame	data/chars/0null/empty.gif
		
anim	jump
		
anim	pain
	loop	0
	delay	7
	offset	5 5
	bbox	0 0 0 0
	frame	data/chars/0null/empty.gif
		
anim	rise
	loop	0
	delay	15
	offset	5 5
	bbox	0 0 0 0
	frame	data/chars/0null/empty.gif
		
anim	spawn
	loop	0
	delay	20
	offset	5 5
	bbox	0 0 0 0
	frame	data/chars/0null/empty.gif
	frame	data/chars/0null/empty.gif
	frame	data/chars/0null/empty.gif
		
anim	special
		
anim	walk
	loop	1
	delay	14
	offset	5 5
	bbox	0 0 0 0
	frame	data/chars/0null/empty.gif
		
#|edited by openBor Stats v 0.53
 
This is for all players. All characters change to the same character. Change "nameofcharacter" for the name of character you desire.

Code:
spawn   1pnameofcharacter
coords  X Y
at      0

1pnameofcharacter.txt

Code:
name	1pnameofcharacter
type	none
shadow  0
offscreenkill	50000


script @script
void main()
{
    void self = getlocalvar("self");
    int P1 = getplayerproperty(0, "entity");
    int P2 = getplayerproperty(1, "entity");
    int P3 = getplayerproperty(2, "entity");
    char nm = getentityproperty(P1,"defaultmodel");
    char nm2 = getentityproperty(P2,"defaultmodel");
    char nm3 = getentityproperty(P3,"defaultmodel");


	if (P1 != NULL() && nm != "nameofcharacter")
	{
	changeentityproperty(P1, "model", "nameofcharacter", 1);
	changeentityproperty(P1, "defaultname", "nameofcharacter");
	}
	else if (P2 != NULL() && nm2 != "nameofcharacter")
	{
	changeentityproperty(P2, "model", "nameofcharacter", 1);
	changeentityproperty(P2, "defaultname", "nameofcharacter");
	}
	else if (P3 != NULL() && nm3 != "nameofcharacter")
	{
	changeentityproperty(P3, "model", "nameofcharacter", 1);
	changeentityproperty(P3, "defaultname", "nameofcharacter");
	}
}
@end_script


anim 	idle
	loop	0
	delay	5
	offset	1 1
	frame	data/chars/misc/empty.gif
	frame	data/chars/misc/empty.gif
	frame	data/chars/misc/empty.gif
 
Back
Top Bottom