How to create a sort of "income"

Sivert

New Member
Reaction score
0
Hey, I'm new and I didnt find anything by search, so i decided to make a new thread.

I'm making a new sort of "World War", though with a twist. It's called "Island Control". I'v made tons of custom units and stuff, but I dont know how to create
a sort of income. See, I want 1 gold to be generated once every 2 seconds or so.. Anyone know anything?

And I'm sorry if I somehow posted wrong or anything :)

Regards

Sivert
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
Here:

Code:
Gold
    Events
        Time - Every 2.00 seconds of game time
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Player - Add 1 to (Picked player) Current gold
 

Sivert

New Member
Reaction score
0
How did you get the Loop Actions thing? I went on Player group - pick every player in player group and do action and clicked on action, what next? I couldnt find any loop thing.. :(
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
The one I have is do (Actions), not do Action.
 

Sivert

New Member
Reaction score
0
Nvm, i think i got it, so when it says Add 1 to (picke players) current gold it means to all?
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
>Pick every player in (All players)

Since you picked all players (Player 1 Red - Player 12 Brown), Add 1 to (picked players) then yes, it works for all players.
 

Sivert

New Member
Reaction score
0
Ehm, I feel kinda stupid. How do I make one player lose when all his buildings are
destroyed?
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
Something like this maybe:

Code:
Defeat
    Events
        Unit - A unit Dies
    Conditions
        (Number of units in (Units owned by Player 1 (Red) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to True)))) Equal to 0
    Actions
        Game - Defeat Player 1 (Red) with the message: Defeat!
 

Omni

Ultra Cool Member
Reaction score
37
Triggers

Code:
Event - A unit dies
Condition - Number of units owned by (owner of (Dying unit)) matching (unit is a structre) is equal to 0 [integer comparision]
Action - DEFEAT PLAYER!

Edit: =/ ghan was half a second faster, im such a noob T.T

Edit Again : Ha! ghans condition does not count structures, but mine also counts dead units T.T
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
That counts dead structures, though.
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
Code:
Untitled Trigger 003
    Events
        Unit - A unit Dies
    Conditions
    Actions
        Set TempInteger = (Number of units in (Units in (Playable map area) matching (((Matching unit) is A structure) Equal to True)))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                TempInteger Equal to 0
            Then - Actions
                Game - Defeat (Owner of (Dying unit)) with the message: Defeat!
            Else - Actions

Lol (too many replies)

Anyways Ghan, your trigger marks Player 1 Red, shouldn't it be Owner of Dying Unit? And your's checks if the Units is equal to 0 too, but i think he wants buildings only.

You can also add to the Matching Condition AND matching unit is alive
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
> Anyways Ghan, your trigger marks Player 1 Red, shouldn't it be Owner of Dying Unit?

It could be.

> You can also add to the Matching Condition AND matching unit is alive

I have both Alive and Structure.

> I cant get Unit - a unit dies..

Generic Unit Event
 

Sivert

New Member
Reaction score
0
I'm such a trigger noob :D

Everything I ask about seems to be simple afterwards !

Event - A unit dies
Condition - Number of units owned by (owner of (Dying unit)) matching (unit is a structre) is equal to 0 [integer comparision]
Action - DEFEAT PLAYER!

..

I didnt get how to get : Number of units owned by (owner of dying unit) matching is equal to 0..
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
Yeah, Ghan's Trigger is more efficient :D

And to answer your question, it's under Integer Comparison
(Number of units in (Units in (Playable map area))) Equal to 0


Just replace to your needs
 

Sivert

New Member
Reaction score
0
And when I scale a building.. For example Barracks to 0.50, it still uses the same space as when 1.00.... How do I fix this?
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
Do you mean the selection circle? There's a scaling value for that, too. If you mean collision, that is also editable down toward the bottom.
 

Omni

Ultra Cool Member
Reaction score
37
look under ' pathing map '
thats the size it takes
(you can see pathing in the WE by pressing ' p ')
 

Sivert

New Member
Reaction score
0
say if I scale something from 1.00 to 0.50, it takes up just as much space.. is there something I can do about it?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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