Solved Please help seniors to see, thank you

Question that is answered or resolved.

xyz555

Member
I want this when the target leaves the ground (fall) or (jump) or (tossentity)

(self) kill



script @script
void main()
{
void self = getlocalvar("self");
void target = getentityproperty(self, "parent");
void a = getentityproperty(target,"a");

if(target,"a>0&&a<10"){
{

killentity(self);
}
}
}
@end_script



but it doesn't seem to work

I hope you can give me some pointers
Sincerely wish you health and happiness
thank you all
 
This will kill the target if they are off the ground in any way! Don't like to use @scripts but this might be a rare case when it is the better option.

C-like:
@script
void self = getlocalvar("self");
void target = getentityproperty(self, "parent");
float y = getentityproperty(target,"y");
float base = getentityproperty(target,"base");
If(y>base) { killentity(self); }
@end_script
 
This will kill the target if they are off the ground in any way! Don't like to use @scripts but this might be a rare case when it is the better option.

C-like:
@script
void self = getlocalvar("self");
void target = getentityproperty(self, "parent");
float y = getentityproperty(target,"y");
float base = getentityproperty(target,"base");
If(y>base) { killentity(self); }
@end_script
First of all thank you very much for your help
I sincerely thank
but you gave me this script
Still can't seem to achieve this effect

simply put

I want the protagonist to be in (jump) or (fall)
In the case of , let this (bindentity) protagonist
prop
disappear (kill)

thank you for your help

2.gif
 
Make sure your spawnbind script sets the player as the parent. Try this updated script.

C-like:
@script
if(frame>=0)
{
void self = getlocalvar("self");
void target = getentityproperty(self, "parent");
float y = getentityproperty(target,"y");
float base = getentityproperty(target,"base");
If(y>base) { killentity(self); }
}
@end_script
 
Make sure your spawnbind script sets the player as the parent. Try this updated script.

C-like:
@script
if(frame>=0)
{
void self = getlocalvar("self");
void target = getentityproperty(self, "parent");
float y = getentityproperty(target,"y");
float base = getentityproperty(target,"base");
If(y>base) { killentity(self); }
}
@end_script
The problem has been solved!
I really appreciate your help!
I wish you good health and a smooth life, thank you!!!
 
No problem.
Hi I thank you.
I would like to ask, if I want to achieve (self) to be able to detect that whenever the animation of (target) changes, for example, the target is converted from the idle animation at that time to freespecial (this also includes target all animation changes ) (self is executed suicide,killentity(self);)

Is there such a script?

I appreciate your attention and help
 
Back
Top Bottom