variables

hio77

New Member
Reaction score
1
is there a way to set a variable at the start of the game that has all the in game non computer players
i need it for a trigger
example
Code:
spawn Copy 12
    Events
        Unit - A unit enters healer <gen>
    Conditions
        (((Triggering unit) is selected by variable)) Equal to True) and (((Triggering unit) is A ground unit) Equal to True)
    Actions
        Unit - Create 1 Mountain King for ([B]a gess[/B] (player triggering) at (Center of Heros enter here <gen>) facing Default building facing degrees
        Unit - Kill (Triggering unit)

thanks all
 
That should do it. (test it though, i didnt have time, or any idea how to =P )

EDIT: I forgot, make the "CompPlayers" a player group variable.

Code:
Player Variable
    Events
        Time - Elapsed game time is 1.00 seconds
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Set CompPlayers = (All players matching ((((Picked player) controller) Equal to User) and (((Picked player) slot status) Equal to Is playing)))
 
EDIT: added varables image

my trigger cant see the varible

trigger
Code:
spawn Copy 12
    Events
        Unit - A unit enters healer <gen>
    Conditions
        (((Triggering unit) is selected by Player 1 (Red)) Equal to True) and (((Triggering unit) is A ground unit) Equal to True)
    Actions
        Unit - Create 1 healer for Player 1 (Red) at (Center of Heros enter here <gen>) facing Default building facing degrees
        Unit - Kill (Triggering unit)


and the variable setting
Code:
Events
    Map initialization
Conditions

Actions
  [B][U]Triggers removed but arnt part of the setting[/U][/B]
    Player Group - Pick every player in (All players) and do (Actions)
        Loop - Actions
            Set CompPlayers = (All players matching ((((Picked player) controller) Equal to User) and (((Picked player) slot status) Equal to Is playing)))

and the variable i made
compplayer.jpg
 
Event:
- Map init
Conditions:
Actions:
- Set CompPlayers = (All players matching ((((Matching player) controller) Equal to Computer) and (((Matching player) slot status) Equal to Is playing)))
 
Code:
spawn Copy 12
    Events
        Unit - A unit enters healer <gen>
    Conditions
        (((Triggering unit) is selected by Player 1 (Red)) Equal to True) and (((Triggering unit) is A ground unit) Equal to True)
    Actions
        Unit - Create 1 healer for Player 1 (Red) at (Center of Heros enter here <gen>) facing Default building facing degrees
        Unit - Kill (Triggering unit)
That uses a "player" variable not a playergroup.

Code:
spawn Copy 12
    Events
        Unit - A unit enters healer <gen>
    Conditions
        (((Triggering unit) is selected by Player 1 (Red)) Equal to True) and (((Triggering unit) is A ground unit) Equal to True)
    Actions
         PlayerGroup - Pick every player in CompPlayers and do actions:
               Loop Actions:
               Unit - Create 1 healer for (Picked Player) at (Center of Heros enter here <gen>) facing Default building facing degrees
         Unit - Kill (Triggering unit)

Use that instead, I edited it without WE, but it should be right anyway.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      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