Forum

> > Stranded II > Scripts > Raptor Queen not working
ForenübersichtStranded II-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Raptor Queen not working

7 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Raptor Queen not working

MarteszHU
User Off Offline

Zitieren
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

alt Re: Raptor Queen not working

Assassin moder
User Off Offline

Zitieren
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.

alt Re: Raptor Queen not working

Assassin moder
User Off Offline

Zitieren
@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 ?

alt Re: Raptor Queen not working

Hurri04
Super User Off Offline

Zitieren
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.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht