Bruce
Active member
Hello guys,
Sorry if this similiar question has asked before.
I kinda figured out of what I need to do, but I am not sure if I am doing it correctly.
I did read about the transformation topic, but it is not enough information that I need and my situation is more complicated.
Basically, I would like to be able to swap to EX model when there is enough EX points.
Do I need to kill the base model first before swapping to the EX model?
There are SP, SM values that need to be stored and the HP, MP, lives need to be carried over to the EX model.
So that when the EX mode is over, it would resume all these previous values that were stored to the base model along with HP, MP, and lives.
I was thinking to store these values to the localvar Pindex like this:
This seems to be a lot of work just to swap between models...,
Therefore, I am wondering if I am on the right track or if there is a better way to do so.
Please advise, thank you very much
Updated: Sorry, nevermind for now
I just saw another topic saying
Use weapon frame command to swap between them and you won't even need any script
So I will try that and see
Sorry if this similiar question has asked before.
I kinda figured out of what I need to do, but I am not sure if I am doing it correctly.
I did read about the transformation topic, but it is not enough information that I need and my situation is more complicated.
Basically, I would like to be able to swap to EX model when there is enough EX points.
Do I need to kill the base model first before swapping to the EX model?
There are SP, SM values that need to be stored and the HP, MP, lives need to be carried over to the EX model.
So that when the EX mode is over, it would resume all these previous values that were stored to the base model along with HP, MP, and lives.
I was thinking to store these values to the localvar Pindex like this:
Code:
in Base Model:
int PIndex = getentityproperty(self,"playerindex"); // Get player's index
int SP = getentityvar(self,"sp");
int HP = getentityproperty(self,"health");
int MP = = getentityproperty(self,"mp");
int LIVES= getplayerproperty(self, "lives");
setlocalvar("SP" + PIndex, SP); // Store SP value to localvar
setlocalvar("HP" + PIndex, HP); // Store HP value to localvar
setlocalvar("MP" + PIndex, MP); // Store MP value to localvar
setlocalvar("LIVES" + PIndex, LIVES); // Store Lives value to localvar
in EX Model:
int HP = getlocalvar("HP" + PIndex");
int MP = getlocalvar("MP" + PIndex);
int LIVES= getlocalvar("LIVES" + PIndex);
changeentityproperty(self, "health", HP);
changeentityproperty(self, "mp", MP);
changeentityproperty(self, "lives", LIVES);
This seems to be a lot of work just to swap between models...,
Therefore, I am wondering if I am on the right track or if there is a better way to do so.
Please advise, thank you very much
Updated: Sorry, nevermind for now
I just saw another topic saying
Use weapon frame command to swap between them and you won't even need any script
So I will try that and see
Last edited: