[SCRIPT] Identifying a stage

Kratus said:
PS VITA said:
Kratus said:
PS VITA

Yes, you can apply it in multiple levels. The correct way is:
Code:
if(branch == "st2c" || branch == "st2d")

Awesome - I almost had it !

ah, and one more question if anyone knows - why after I pick up a weapon player one resets as if the branch == st2c does not matter anymore? anything I can do to prevent this?

PS VITA
In this case you will need a script in the "onmodelcopy" event. Using this, you can copy all "candamage" properties when the model is changed to a weapon model.

STEP 1
First you need to call this event in the character header. For safe, I'm calling it in all my games in both original model and weapon model, like this:

Code:
onmodelcopyscript	data/scripts/your_file_name.c

STEP 2
Now you need to create the script inside your file:

Code:
void main()
{//Maintain default header config for alternative models (WEAPON MODELS)

	void self	= getlocalvar("self");
	void old	= getlocalvar("old");
	void vAlias	= getentityproperty(old,"name"); //GET OLD ALIAS.
	int  iMHealth	= getentityproperty(old,"maxhealth"); //GET OLD MAX HEALTH.
	int  iHealth	= getentityproperty(old,"health"); //GET OLD HEALTH.
	int  iMaxMP	= getentityproperty(old,"maxmp"); //GET OLD MAX MP.
	int  iMp	= getentityproperty(old,"mp"); //GET OLD MP.
	int  hostile	= getentityproperty(old,"hostile"); //GET OLD HOSTILE.
	int  candamage	= getentityproperty(old,"candamage"); //GET OLD CANDAMAGE.
	
	changeentityproperty(self, "name", vAlias); //SET ALIAS.
	changeentityproperty(self, "maxhealth", iMHealth); //SET MAX HEALTH.
	changeentityproperty(self, "health", iHealth); //SET HEALTH.
	changeentityproperty(self, "maxmp", iMaxMP); //SET MAX MP.
	changeentityproperty(self, "mp", iMp); //SET MP.
	changeentityproperty(self, "hostile", hostile); //SET HOSTILE'S FLAG.
	changeentityproperty(self, "candamage", candamage); //SET CANDAMAGE'S FLAG.
}

This is an example only, some games can have less or more properties depending on the developer's way.

Oh okay - I get it now!
This is great! thank you!
 
Back
Top Bottom