• 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.

How can i triger stable income from a building??

Status
Not open for further replies.
Level 5
Joined
Feb 19, 2008
Messages
110
or you could "pick every unit of type marketplace and do 100+ gold to owner of picked unit." (works for one of my maps)
 
Level 12
Joined
Mar 16, 2006
Messages
992
Every X seconds
Pick all units in the map of Unit Type - "Building"
Add X gold to player (Owner of Picked Unit)
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
Here is trigger that allows usage of marketplaces for all players and having cummulative effects:
  • Income
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set TempGroup = (Units owned by (Player((Integer A))) of type Marketplace)
          • Player - Add (10 x (Number of units in TempGroup)) to (Player((Integer A))) Current gold
          • Custom script: call DestroyGroup (udg_TempGroup)
I hope this helps.

To limit nuber of marketplaces place this function in your initialization:
  • For each (Integer A) from 1 to 12, do (Actions)
    • Loop - Actions
      • Player - Limit training of Marketplace to 10 for (Player((Integer A)))
 
Last edited:
Level 9
Joined
Apr 3, 2008
Messages
700
1. Units can leak with their locations.
So you have to create a point variable and to set variable = their position.
And then delete the point.
This leaks can be in trigger, when you create smth in the position of unit, or issue order targeting a position of unit and etc.

2. It will do the same thing but it isn't the same. Loop scripts will take more space.
 
Level 17
Joined
Jun 12, 2007
Messages
1,261
1. Units can leak with their locations.
So you have to create a point variable and to set variable = their position.
And then delete the point.
This leaks can be in trigger, when you create smth in the position of unit, or issue order targeting a position of unit and etc.

2. It will do the same thing but it isn't the same. Loop scripts will take more space.

The group does leak lol, as soon as something is stored it can become a leak if not removed.
And here you store a group for a one time use only, because it changes the number of marketplaces.

So yeh.
 
Level 9
Joined
Apr 3, 2008
Messages
700
  • Trigger
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Add (10 x (Number of units in (Units owned by (Picked player) matching ((Unit-type of (Matching unit)) Equal to Marketplace)))) to (Picked player) Current gold
          • Unit Group - Destroy unit group (Last created unit group)
 
Level 3
Joined
Jan 18, 2009
Messages
11
H

Hey, i was wondering,

How do i create:

A building which needs to be protected,( LIke in the Minas Thirith ( The White Tree) from being destroyed.?:sad:
And if that building becomes destroyed, the enemies win.:cry:
There are Two teams :
1Team must protect the building.
2Team will try to destroy the building:cry:
 
Status
Not open for further replies.
Top