Join scripts in spawn level

dantedevil

Well-known member
I try to join this scripts in the spawn entry of characters:
Script 1
Code:
spawn  chainman
map  6
@script 
void main() {
	performattack(getlocalvar("self"), openborconstant("ANI_follow12"));
} @end_script
coords  576 260
at  1096

Script 2
Code:
spawn  bd3
alias   black_death_gang
map  7
coords  530 200
@script
void main()
{
    void self = getlocalvar("self");
    int Kill = getindexedvar("Dead");
    
    if(Kill == 1){
      killentity(self);
    }
}
@end_script
at    1791


Here my try, but not work:
Code:
spawn  chainman
@script 
void main() {
	performattack(getlocalvar("self"), openborconstant("ANI_follow18"));
{
     void self = getlocalvar("self");
    int Kill = getindexedvar("Dead");
    
    if(Kill == 1){
      killentity(self);
    }
}
coords  576 260
at  1096
 
Here's how you should do it:
spawn  chainman
@script
void main()
{
    void self = getlocalvar("self");
    int Kill = getindexedvar("Dead");
 
    if(Kill == 1){
      killentity(self);
    } else {
      performattack(self, openborconstant("ANI_FOLLOW18"));
    }
}
coords  576 260
at  1096
 
Back
Top Bottom