DD Tokki
Well-known member
Here the code to implement the backpains:
-takedamagescript event-
call this script funcs with: takedamagescript data/scripts/ontakedamage.c
ontakedamage.c:
Support Functions (in script event):
Add these funcs in main script of your chara:
call these funcs with: script data/scripts/backpain.c
backpain.c
-takedamagescript event-
call this script funcs with: takedamagescript data/scripts/ontakedamage.c
ontakedamage.c:
Code:
void main() {
void self = getlocalvar("self");
void attacker = getlocalvar("attacker");
setoppx_ondmg(self,attacker); // backpains
}
int setoppx_ondmg(void player, void attacker) {
setentityvar(player, 6, getentityproperty(attacker, "x") );
}
Support Functions (in script event):
Add these funcs in main script of your chara:
call these funcs with: script data/scripts/backpain.c
backpain.c
Code:
void main() {
...
- White Dragon
- Replies: 2
- Forum: Scripting
Here's what's in the link.
I'm trying to apply the backpain script to my game, but when I try to learn how to do it and apply it, I get this error message.
Script error: data/scripts/backpain.c, line 24: Unknown error '.' (in production 'log_and_expr')
if ( anim_id == openborconstant("ANI_DIE") || .. ... .. ) {
^
I wonder if I applied it wrong, and I want to fix the error.