bindentity issue

O Ilusionista

Captain 100K
hi there.

I have a char which jumps with a bind entity (a satelite) and and I want to make it unbind and throw the entity.
gKuySWH.png


I am using:
Code:
@cmd	spawnbind "hwave" 0 79 0

Which works, but I want to unbind that entity on another frame, so I can make it go foward

I tried this:

@script
if(frame==6)
{
bindentity("hwave", NULL());
}
@end_script

But openbor closes itself, with no trace at the debug.

How can I unbind it?
 
bindentity must refer to entity not entity's name, that's why you got the crash. Technically, referring to name could cause the script to unbind other entity with same name.

If you want to unbind something in different frame, why don't you store the bound entity in local variable first then when you unbind it, get it from that variable.
 
hum, there is no trace in the manual poiting that we can't refer to the entity name. In fact, bindentity have almost no information on the manual.

By the way, check your pm please.

edit: hum...If I get it right, the satelity must unbind itself from the parent, and not the opposite, right?
 
that was exaclty what I read :)

I made it work by setting satelity to unbind itself. I just need to figure how to make satelity treats itself like a projectile (IOW, it will change the animation when land on the groun or hits)

Can you do a projectile using self?
 
O Ilusionista said:
hi there.

I have a char which jumps with a bind entity (a satelite) and and I want to make it unbind and throw the entity.
gKuySWH.png


I am using:
Code:
@cmd	spawnbind "hwave" 0 79 0

Which works, but I want to unbind that entity on another frame, so I can make it go foward

I tried this:

@script
if(frame==6)
{
bindentity("hwave", NULL());
}
@end_script

But openbor closes itself, with no trace at the debug.

How can I unbind it?


Hello!

Sorry for my question...
How make to see that menu of the picture in game?

Thanks.
 
I want to know how see that menu in game pause

Video Options
Sound Options
Control Options
System Options

I see this menu one time in World Heroes SJE,  but i dont know how make it.


Thanks.
 
@Bloodbane:

I got the bindentity well finally, but there is something which bothers me:

bindentity(entity, target, int x, int z, int a, int direction, int bindanimation)
~Bind entity to target, so the target moves, the entity moves.
~x, z, a: relative to target.
~direction: 0 no change 1 same direction as target -1 opposite direction as target 2 always right -2 always left
~bindanimation: 0 No effect. 1 Keep same animation as the target. 2 Also keep same frame as the target. 4 Kill the entity if the animation doesn't match.
~To unbind a entity, use bindentity(entity, NULL());
~Notice: You can combine those values for bindanimation, so it can be 6 which means 2 and 4.

The option 4 is great, but it just works if the spawned entity have is in the SAME animation of the caller (or root, as we call in mugen).

My question is: bindentity could have an option, like 8, so it checks "if the root in on any hit animation (pain, fall, burn, etc), destroy yourself". Or "if the root animation has changed, kill youself".

I know that this could be archieved through script, but it could be hardcoded on the engine.
 
That's redundant IMO cause if your bound entity doesn't have PAIN, FALL nor DEATH, setting last parameter to 4 will simply remove that entity.

I have this function:

Code:
void spawnGun(void Name, float dx, float dy, float dz, int Num)
{ // Spawn gun, store it and bind it
   void self = getlocalvar("self");
   void Spawn;

   Spawn = spawn01(Name, dx, dy, 0);
   setentityvar(self, Num, Spawn); // Stores spawned gun to be killed later
   bindentity(Spawn, self, dx, dz, dy, 0, 0); // Bind spawned gun
}

I use this to spawn entities to be bound to main entity.
I don't have function to unbind and throw the former yet though
 
That's redundant IMO cause if your bound entity doesn't have PAIN, FALL nor DEATH, setting last parameter to 4 will simply remove that entity.
No, its not. For example, I spawn the laser at freespecial2 and use 4 at the bindentity. If my laser doesn't have the freepsecial2 anim it automatically kills itself. This is not smart.

I want to make it kill itself it he detects any anim change on its root.
 
Back
Top Bottom