Bruce
Active member
I am having the issues with the didhitscript and the native function "ENTITY_PROPERTY_BOSS".
didhitscript seems to trigger twice with the return result of 0 two times when the boss's health is < 1.
I don't know if it it has to do with OpenBor 4.0.
DidhitScript:
I hit this boss only 4 times, but somehow the log shows up 5 times. Not only that, the int boss returns 0 two times when it dies.
Which means function "ENTITY_PROPERTY_BOSS" returns 0 two times when the boss's health is < 1 for some reasons.
Log:
SCRIPT EVENT : LEVEL.CLOG: Boss1
LOG: Boss1
LOG: Boss1
LOG: Boss0
LOG: Boss0
Can someone take a look at this or give me a advice on this?
Thank you
didhitscript seems to trigger twice with the return result of 0 two times when the boss's health is < 1.
I don't know if it it has to do with OpenBor 4.0.
DidhitScript:
Code:
void target = getlocalvar("damagetaker"); // Enemy
int TYPE = getentityproperty(target,"type");
if(TYPE == openborconstant("TYPE_enemy")) {
int boss = get_entity_property(target, openborconstant("ENTITY_PROPERTY_BOSS"));
log("LOG: Boss" + boss + "\n");
}
I hit this boss only 4 times, but somehow the log shows up 5 times. Not only that, the int boss returns 0 two times when it dies.
Which means function "ENTITY_PROPERTY_BOSS" returns 0 two times when the boss's health is < 1 for some reasons.
Log:
SCRIPT EVENT : LEVEL.CLOG: Boss1
LOG: Boss1
LOG: Boss1
LOG: Boss0
LOG: Boss0
Can someone take a look at this or give me a advice on this?
Thank you