How do you setup "If THAT player owns THAT unit then create THAT unit"

IHMJack

New Member
Reaction score
1
How do you setup "If THAT player owns THAT unit then create THAT unit every second for THAT player at THAT unit"

I have found that most of the time the software allows only "triggering unit" or "specific unit", but only rare cases it allows "unit-type owned by that player"

Here is my map

http://epicwar.com/maps/10135/

Im trying to simplify the "free warping units" trigger system in the triggers settings, cuz I want to add up to level 30-40 creeps, but I dont want to manually set the setting for all 12 players one by one. I want a trigger system that you can just do it for "all players"

Help would be appreiated, thanks!!!
 
I would've done it something like this:

Code:
Untitled Trigger 001
    Events
        Unit - A unit owned by Player 1 (Red) Finishes training a unit
    Conditions
        (Unit-type of (Trained unit)) Equal to Footman
    Actions
        Set Check_Red_Special_Unit = 1

Check_Red_Special_Unit is an Integer Variable. You can, of course, name it to whatever you wish. The Footman in Conditions is your special Unit. And the Event is based of if you train the Unit or not (can be changed to whatever you like.)

Code:
Untitled Trigger 002
    Events
        Time - Every 1.00 seconds of game time
    Conditions
        Check_Red_Special_Unit Equal to 1
    Actions
        Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees

Something like that. The second trigger has memory leaks, but it's nothing bad. :p


If a player leaves a game:

Code:
Untitled Trigger 003
    Events
        Player - Player 2 (Blue) leaves the game
    Conditions
    Actions
        Unit Group - Pick every unit in (Units owned by Player 2 (Blue)) and do (Unit - Remove (Picked unit) from the game)

But that only works if the Player actually leaves the game.
So if you have any pre-placed units belonging to Player 2 (Blue) and that player slot isn't taken nothing will happen. (For example, if you start the game without anyone playing as Player 2 (Blue)/ leaving in countdown, or whatever.)
I suggest you use the above trigger and this one:

Code:
Untitled Trigger 004
    Events
        Time - Elapsed game time is 10.00 seconds
    Conditions
        (Player 2 (Blue) slot status) Equal to Is unused
    Actions
        Unit Group - Pick every unit in (Units owned by Player 2 (Blue)) and do (Unit - Remove (Picked unit) from the game)
        Trigger - Turn off (This trigger)

Something like that.
Also remember to have one trigger for each player.
Hope that helps. :)
 
thanks for the "unit - remove" triggers, I got that to work

But that "unit - create" trigger system still doesnt allow me to save time programing up to level 30-40 units.
 
hm... dont get your intention completely... what you want the triggers to do? can you give an exact example? f.e.: if player1 has trained 1 footman then create 1 footman for all other players??

if the problem that you want to have the trigger above for all players you can do it that way:

make check_red_special_unit as an array with size of your max amount of players. then:

Code:
Untitled Trigger 001
    Events
        Unit - A unit Finishes training a unit (generic)
    Conditions
        (Unit-type of (Trained unit)) Equal to Footman
    Actions
        Set Check_Red_Special_Unit[Player number of (owner of (trained unit))]= 1
 
here is my map, open it with world editor, go to trigger settings, and look at "free warping units"

http://epicwar.com/maps/10167/

I dont like the current system it takes to long to add creeps up to level 30

I want a "if THAT unit has THAT condition, make a unit for owner of THAT unit"
 
i think i got a time-saving solution. check the attached map for details and read the trigger comment.

plz have a backup as well, i dont want to be the reason for corrupting your map... i think i didnt make a mistake but you never know... ^^

basically its the idea to load the portals into array-variables to have an easy access to them! ;) for time reasons i didnt check your other triggers, mb you can use that way of creating triggers for them as well... hope i could have helped :)

map attached.
 
LOL, the trigger setup looking hella confusing, but I have to say, damn you are good, I will continue making more levels and hope there is no bugs.

thanks alot for your help
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • 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 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