Having a problem with Player Comparison

Surferkid993

God surferkid993 = new God(awesome.me);
Reaction score
16
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PlayersTurn Equal to Player 8 (Pink)
Then - Actions
Else - Actions

"Players Turn" is a variable of a player.
------------

For some reason when I use this condition warcraft 3 exits out.

I know it is this condition because I used a different condition on acident. I was testing slot status. I didn't notice until I tested with two computers. When I changed it this started to happen.

Is there another condition I can use to get the same result?
or
Is there another way of using this condition?
 

Syndrome

You can change this now in User CP.
Reaction score
126
You can use transform it into JASS, for some reason, it works O.O
 

SFilip

Gone but not forgotten
Reaction score
634
Geoff.L said:
You can use transform it into JASS, for some reason, it works O.O
lol are you kidding? transforming to jass does nothing to your trigger.
what event are you using?
 

Surferkid993

God surferkid993 = new God(awesome.me);
Reaction score
16
none I am having it run by another trigger
I tried checking conditions instead of skipping them even though there are none and like I thought that didn't help.
 

SFilip

Gone but not forgotten
Reaction score
634
and how often does that other trigger run?
also do you have any then or else actions?
 

Surferkid993

God surferkid993 = new God(awesome.me);
Reaction score
16
Ya I was simplifying it beceause they run fine with other conditions, but here is the whole trigger:

End Turn
Events
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Double Greater than or equal to 1
Then - Actions
Trigger - Run Before Roll <gen> (ignoring conditions)
Skip remaining actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PlayersTurn Equal to Player 8 (Pink)
Then - Actions
Set Double = 0
Set PlayersTurn = (Player(1))
Trigger - Run Before Roll <gen> (ignoring conditions)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player(((Player number of PlayersTurn) + 1))) slot status) Equal to Is playing
Then - Actions
Set PlayersTurn = (Player(((Player number of (Triggering player)) + 1)))
Trigger - Run Before Roll <gen> (ignoring conditions)
Set Double = 0
Else - Actions
Set PlayersTurn = (Player(((Player number of (Triggering player)) + 1)))
Trigger - Run (This trigger) (ignoring conditions)



It runs many times when I am testing it beceause I am player one so it runs it 8 times to get back to me
 

SFilip

Gone but not forgotten
Reaction score
634
Trigger - Run (This trigger) (ignoring conditions)
try disabling this...if both of your conditions are false this will result in an infinite loop and crash (exit) the game.
 

SFilip

Gone but not forgotten
Reaction score
634
oh just noticed...you have no events there. therefore you cant use triggering player.
(Player number of (Triggering player)) will always return 0 and PlayersTurn will always be the same number.
which means it will result in one infinite loop. just disable Trigger - Run (This trigger) (ignoring conditions) and you'll see.
 

Surferkid993

God surferkid993 = new God(awesome.me);
Reaction score
16
Oh you are a GOD I can't beleive I hadn't noticed. I bet that is the problem. Thankyou sooo much.

Yup it worked beautifuly!
 

Sim

Forum Administrator
Staff member
Reaction score
534
My advice on this is to always find a way around Run (This trigger) (ignoring conditions)

Yes sometimes it can be very useful and the trigger may work... But the day the conditions won't fit or something else happens, it could create an endless loop... as above (I think...Dunno if that was THE real problem but it seemed so)

Well, I stopped using these and suddenly my wc3 never crashes when I test my map ^^
 
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