Forum

> > Stranded II > Scripts > Raptor Queen not working
Forums overviewStranded II overview Scripts overviewLog in to reply

English Raptor Queen not working

7 replies
To the start Previous 1 Next To the start

old Raptor Queen not working

MarteszHU
User Off Offline

Quote
Hi everyone.
I was working on some boss units, but my Raptor Queen isn't working. It is supposed to summon a raptor when it hits me and 3 when dead. Anyone could help me and tell me what is the problem with this script?

1
2
3
4
5
6
7
8
9
10
11
12
13
script=start	
	on:ai_attack {
		create "unit",2,getx("self"),getz("self")
		}
	}	
	
	on:kill {
		event "iskill_hunt","global";
		create "unit",2,getx("self"),getz("self")
		create "unit",2,getx("self"),getz("self")
		create "unit",2,getx("self"),getz("self")
	}
script=end

old Re: Raptor Queen not working

Assassin moder
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
script=start     
     on:ai_attack {
          create "unit",2,getx("self"),getz("self");
     }     
     
     on:kill {
          event "iskill_hunt","global";
          create "unit",2,getx("self"),getz("self");
          create "unit",2,getx("self"),getz("self");
          create "unit",2,getx("self"),getz("self");
     }
script=end


Should be working now.

old Re: Raptor Queen not working

Assassin moder
User Off Offline

Quote
@user Hurri04: Semicolon are the most common issue and it's not needed to add bracket, isn't it ?

1
2
3
4
5
6
7
8
9
script=start     
on:ai_attack {
create "unit",2,getx("self"),getz("self");
}     
on:kill {
event "iskill_hunt","global";
create "unit",2,getx("self"),getz("self"),3;
}
script=end

Above is more compact code ; ) And when Raptor Queen is killed, is coordinates taken correctly for X and Z ?

old Re: Raptor Queen not working

Hurri04
Super User Off Offline

Quote
the brackets are needed because s2 cmd create is a command which returns a value.
in S2 only commands which do not return a value have their parameters without brackets.

further your "compact" code is bad for readability because you removed the shiftings.
also line 7 will not work. the number at the end only works for items.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview