Another Question..

Exide

I am amazingly focused right now!
Reaction score
448
Does this work:

JASS:

function Trig_Crabs_Killed_Conditions takes nothing returns boolean
    return GetUnitTypeId(GetDyingUnit()) == 'n003'
    return Trig_Crabs_Killed_Func006C()
endfunction


Does the trigger run both conditions or just the first one?
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
if i am not mistaken...it is the first 1...and ignoring the 2nd 1
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
Do the action "Skip Remaining Actions" in GUI, convert to Jass, learn something new.

Anyway, yeah, when the code sees the word "return" it will return whatever after it and stop running the function.

What you need is:

JASS:

function Trig_Crabs_Killed_Conditions takes nothing returns boolean
    return GetUnitTypeId(GetDyingUnit()) == 'n003' and Trig_Crabs_Killed_Func006C()
endfunction
 

Exide

I am amazingly focused right now!
Reaction score
448
I just realized why this isn't working. :p

JASS:

function Trig_Crabs_Killed_Func006C takes nothing returns boolean
    local integer id = GetPlayerId(GetOwningPlayer(GetKillingUnit()))
    return id<5
endfunction


Used to say: GetTriggerUnit, when the event was 'Unit - a Unit Dies'.
My bad. It's working now, thanks. :)
 

Exide

I am amazingly focused right now!
Reaction score
448
Yea, but if you read my code you'll see that I replaced TriggerUnit with KillingUnit..
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top