Why does this not work?

gofd.pwn_u

New Member
Reaction score
0
Events
Map initialization
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked player) slot status) Equal to Is playing
((Picked player) controller) Equal to User
Then - Actions
Unit - Create 1 Wisp for (Picked player) at ((Picked player) start location) facing Default building facing degrees
Else - Actions
Do nothing

Why does this not make a wisp for me on single player?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,497
The "if" should be inside the loop...

The "slot status" test is not needed.
It works just fine, but, "all players" already only has players that are playing...
 

cleeezzz

The Undead Ranger.
Reaction score
268
the if wasn't inside the loop? i was assuming x_x. gofd use code tags around your trigger, they show the indents that are crucial to show what is under what.

they look like # in the forum tools
 

cleeezzz

The Undead Ranger.
Reaction score
268
nvm fix your If/then/else, it has to be under the loop, (drag it so its in the loop, right now, its outside of the loop, you can tell by the indent, IF you used code tags XD) but we can see the indents if we click quote. haha


Code:
Events
    Map initialization
Conditions
Actions
    Player Group - Pick every player in (All players) and do (Actions)
        Loop - Actions
              If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                     ((Picked player) slot status) Equal to Is playing
                     ((Picked player) controller) Equal to User
              Then - Actions
                     Unit - Create 1 Wisp for (Picked player) at ((Picked player) start location) facing Default building facing degrees
              Else - Actions
                     Do nothing

make your trigger look like that.

why are you using jass?
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
Code:
Events
    Map initialization
Conditions
Actions
    Player Group - Pick every player in (All players) and do (Actions)
        Loop - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            ((Picked player) slot status) Equal to Is playing
            ((Picked player) controller) Equal to User
        Then - Actions
            Unit - Create 1 Wisp for (Picked player) at ((Picked player) start location) facing Default building facing degrees
        Else - Actions
            Do nothing
They Mean do this:

Code:
Events
    Map initialization
Conditions
Actions
    Player Group - Pick every player in (All players) and do (Actions)
        Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    ((Picked player) slot status) Equal to Is playing
                    ((Picked player) controller) Equal to User
                Then - Actions
                    Unit - Create 1 Wisp for (Picked player) at ((Picked player) start location) facing Default building facing degrees
                Else - Actions
                    Do nothing

See the difference in the indentation?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top