English Raptor Queen not working

7 replies
Goto Page
To the start Previous 1 Next To the start
17.08.14 10:10:26 pm
Up
MarteszHU
User
Offline Off
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?

Code:
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
"True trolls never fail"
18.08.14 01:49:56 am
Up
Hurri04
Super User
Offline Off
× create [PARAMETERS]
√ create ( [PARAMETERS] ) ;
18.08.14 01:24:00 pm
Up
Assassin moder
User
Offline Off
Code:
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.
18.08.14 02:16:32 pm
Up
Hurri04
Super User
Offline Off
you still forgot the brackets
18.08.14 04:07:55 pm
Up
Assassin moder
User
Offline Off
@user Hurri04: Semicolon are the most common issue and it's not needed to add bracket, isn't it ?

Code:
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 ?
18.08.14 06:31:53 pm
Up
Hurri04
Super User
Offline Off
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.
18.08.14 06:37:46 pm
Up
Assassin moder
User
Offline Off
I forgot, I wasn't be in SII for months..
18.08.14 08:33:49 pm
Up
MarteszHU
User
Offline Off
Thanks for the help! It is working fine
"True trolls never fail"
To the start Previous 1 Next To the start