O Ilusionista
Captain 100K
I need some help to get the variables set on a char. I understand how they works in Mugen and other languages, but something is still missing on my BOR understanding.
Explanation:
Captain America, on his hyper, throws a shield which bounces on the screen edges couple of times until gets back to Captain, then it gets destroyed.
What do I need?
Since Shield is a different entity, I want to make Captain aware of if there is no shield (IOW, the shield had returned to him), he will switch for another anim (grabbing the shield back, for example).
What I have:
at Shield code:
When the shield stops to bounce, it goes to a Follow1 anim:
At Captain:
But it doesn't works, Captain doesn't detects the shield. If you use the move more times, then it start to automatically go to attack4 anim.
What am I missing?
Some images of the debug
Explanation:
Captain America, on his hyper, throws a shield which bounces on the screen edges couple of times until gets back to Captain, then it gets destroyed.
What do I need?
Since Shield is a different entity, I want to make Captain aware of if there is no shield (IOW, the shield had returned to him), he will switch for another anim (grabbing the shield back, for example).
What I have:
at Shield code:
(do I need the last part?)int ShieldC= getglobalvar("ShieldC");// shield control
if(ShieldC==NULL()){
setglobalvar("ShieldC", 1);
ShieldC = 1;
}
When the shield stops to bounce, it goes to a Follow1 anim:
void self = getlocalvar("self"); // Get calling entity.
void Owner = getentityproperty(self, "owner"); // Get owner
int x = getentityproperty(self, "x"); // Get current x coordinate
int Ox = getentityproperty(Owner, "x"); // Get Owner's x coordinate
if(x <= Ox + 10 && x >= Ox - 10){ // Close to owner's x?
setglobalvar("ShieldC",0);
killentity(self); //Suicide!
}
At Captain:
int ShieldC= getglobalvar("ShieldC");// shield control
void vSelf = getlocalvar("self");
ShieldC=1;
if(ShieldC==0){
changeentityproperty(vSelf, "animation", openborconstant("ANI_ATTACK4"));
}
But it doesn't works, Captain doesn't detects the shield. If you use the move more times, then it start to automatically go to attack4 anim.
What am I missing?
Some images of the debug