• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Mind boggling trigger condition

Status
Not open for further replies.
Level 1
Joined
Aug 31, 2012
Messages
6
Hello,
I am working on a project and would like to disable singleplayer.
I am not trained in variables and 'JASS' .. scripts?.
I know abit/a little familiar on triggers.

Could a kind experienced trigger user show me step-by-step on how to recreate this:

Conditions
Number of units in (All players matching player slot status is equal to is playing and player controller is equal to 'user') is equal to 1
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
  • Right-click the conditions-tab, create a new condition, open the dropdown box and select "Integer comparison" (as you are comparing integers).
  • Select the first value, open the dropdown box there and select "Player - Count players in player group".
  • You will get a new value to fill in, select this and choose "All Players Matching Condition".
  • Here, you need to select "and" (you will be using 2 conditions).
  • In the left value, choose the "Player Slot Status Comparison".
  • For the player, choose "Matching Player", leave the rest as it is.
  • Hit "OK" and then move on to the right condition. This will be a "Player Controller Comparison".
  • For the player, select "Matching Player", leave the rest as it is.
  • Hit "OK" 4 times.
  • Now select the very last value and fill in "1".
  • Hit "OK" 2 times and you're done.

  • (Number of players in (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User)))) Equal to 1
If that's too hazy, I can do it with images as well (do try to follow this list first though :D).
 
Level 1
Joined
Aug 31, 2012
Messages
6
  • Right-click the conditions-tab, create a new condition, open the dropdown box and select "Integer comparison" (as you are comparing integers).
  • Select the first value, open the dropdown box there and select "Player - Count players in player group".
  • You will get a new value to fill in, select this and choose "All Players Matching Condition".
  • Here, you need to select "and" (you will be using 2 conditions).
  • In the left value, choose the "Player Slot Status Comparison".
  • For the player, choose "Matching Player", leave the rest as it is.
  • Hit "OK" and then move on to the right condition. This will be a "Player Controller Comparison".
  • For the player, select "Matching Player", leave the rest as it is.
  • Hit "OK" 4 times.
  • Now select the very last value and fill in "1".
  • Hit "OK" 2 times and you're done.

If that's too hazy, I can do it with images as well (do try to follow this list first though :D).

I followed your instructions and I got confused right up to here:
[*]Here, you need to select "and" (you will be using 2 conditions).
I figured that select means the only value that's present: All players matching condition and for (you will be using 2 conditions) got me thinking for quite awhile on what it meant then concluded it probably meant there being 2 values to work on in the next box. I then proceeded to click the only value available: "All players matching condition.

The next instruction:
[*]In the left value, choose the "Player Slot Status Comparison".
given got me confused for awhile; I clicked the left value as instructed - the value displayed was: ((Triggering unit) is A Structure) and poked around the options looking for "Player Slot Status Comparison" and after awhile I got frustrated and concluded that it does not exist. After coming back from a break I carefully read the instructions, slower this time but same result then I decided to poke around elsewhere and hours later, found out "Player Slot Status Comparison" is available but not in the left value as instructed, it was in the drop-down box. Relieved, I moved onto the next instruction:
[*]For the player, choose "Matching Player", leave the rest as it is.
"leave the rest as it is" got me puzzled because there is no other values and thought I might've been doing the steps down the road differently.

Nevertheless, after choosing Matching Player:
[*]Hit "OK" and then move on to the right condition. This will be a "Player Controller Comparison". I clicked "OK" but there is no right condition, all it says is (matching player) slot status so I clicked OK again. The value is: ((Matching player) slot status) Equal to is playing. I clicked is playing and looked for "Player Controller Comparison". Does not exist. I convinced myself I am waaaay off course. Nevertheless I returned poked around all the options and concluded that I am simply stuck here.

*sigh*

:ogre_rage:
 
Last edited:
Level 20
Joined
Jul 14, 2011
Messages
3,213
Actually (All Players) only returns human players playing (as far as i'm aware of) So just "If Number of Players in (all Players) is equal to 1 then..." you have 1 player.

When you pick Integer Comparison you'll be prompted to pick two numberst, the first one, and the second to compare (wich should be one). Press the first number and look for "Player Group - Count players in player group" or something like that. That option will promp you to choose a Player Group, and will have by default the "(All Players)".
 
Level 4
Joined
Aug 26, 2012
Messages
123
Well, the problem you have is you just use 1 condition instead of two...
(If you click the condition and search at the bottom of drop-down box, you can see AND and OR conditions. Then a panel will pop-up with text condition 1 + condition 2. then, start from there....)
 
Level 1
Joined
Aug 31, 2012
Messages
6
Actually (All Players) only returns human players playing (as far as i'm aware of) So just "If Number of Players in (all Players) is equal to 1 then..." you have 1 player.

When you pick Integer Comparison you'll be prompted to pick two numberst, the first one, and the second to compare (wich should be one). Press the first number and look for "Player Group - Count players in player group" or something like that. That option will promp you to choose a Player Group, and will have by default the "(All Players)".

I tried following your method even though I had trouble understanding as I read, it didn't work.

Well, the problem you have is you just use 1 condition instead of two...
(If you click the condition and search at the bottom of drop-down box, you can see AND and OR conditions. Then a panel will pop-up with text condition 1 + condition 2. then, start from there....)
ahh, I see! Thanks!

EDIT: It all worked out! Thanks elf and apoc. +rep. Not sure how to close thread or edit.. Maybe mod does that?
 
Last edited:
Level 28
Joined
Jan 26, 2007
Messages
4,789
Okay, so when you start out you should see this image:
attachment.php


Select the value in blue you see there and choose this one:
attachment.php


Click "Condition" and here is it where you select "And", like this (the one that is highlighted is the one you should choose):
attachment.php


As the first of those 2 new conditions, do this:
attachment.php


The second one should be:
attachment.php


So when you hit "OK" it should look like:
attachment.php


Now when you press "OK" a few times, you only need to change the integer at the end of the condition.
The end result will be:
attachment.php


Edit: oops, too late :p
There's no need to call a mod to close the thread: just don't necro the thread.
 

Attachments

  • Condition1.jpg
    Condition1.jpg
    31.5 KB · Views: 161
  • Condition2.jpg
    Condition2.jpg
    38.6 KB · Views: 179
  • Condition3.jpg
    Condition3.jpg
    60.4 KB · Views: 182
  • Condition4.jpg
    Condition4.jpg
    47.2 KB · Views: 174
  • Condition5.jpg
    Condition5.jpg
    42.9 KB · Views: 154
  • Condition6.jpg
    Condition6.jpg
    41.1 KB · Views: 193
  • Condition7.jpg
    Condition7.jpg
    33.9 KB · Views: 173
Status
Not open for further replies.
Top