1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  4. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Mind boggling trigger condition

Discussion in 'World Editor Help Zone' started by alpha172, Sep 5, 2012.

  1. alpha172

    alpha172

    Joined:
    Aug 31, 2012
    Messages:
    6
    Resources:
    0
    Resources:
    0
    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
     
  2. ap0calypse

    ap0calypse

    Joined:
    Jan 26, 2007
    Messages:
    4,777
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    • 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).
     
  3. alpha172

    alpha172

    Joined:
    Aug 31, 2012
    Messages:
    6
    Resources:
    0
    Resources:
    0
    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: Sep 6, 2012
  4. Spartipilo

    Spartipilo

    Joined:
    Jul 14, 2011
    Messages:
    3,190
    Resources:
    0
    Resources:
    0
    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)".
     
  5. Elfansoer

    Elfansoer

    Joined:
    Aug 26, 2012
    Messages:
    122
    Resources:
    0
    Resources:
    0
    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....)
     
  6. alpha172

    alpha172

    Joined:
    Aug 31, 2012
    Messages:
    6
    Resources:
    0
    Resources:
    0
    I tried following your method even though I had trouble understanding as I read, it didn't work.

    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: Sep 6, 2012
  7. ap0calypse

    ap0calypse

    Joined:
    Jan 26, 2007
    Messages:
    4,777
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    Okay, so when you start out you should see this image:
    Image 1
    [​IMG]


    Select the value in blue you see there and choose this one:
    Image 2
    [​IMG]


    Click "Condition" and here is it where you select "And", like this (the one that is highlighted is the one you should choose):
    Image 3
    [​IMG]


    As the first of those 2 new conditions, do this:
    Image 4
    [​IMG]


    The second one should be:
    Image 5
    [​IMG]


    So when you hit "OK" it should look like:
    Image 6
    [​IMG]


    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:
    Image 7
    [​IMG]


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

    Attached Files: