Need help with Triggers :D

Haxxors

New Member
Reaction score
1
Im making a rise of rome style map and I need help with doing the following triggers -

- Giving beacon ownership to a player that builds by the beacon

- Giving players 125 wood according to the amount of beacons they own when the timer is up


Anyone able to help? :D
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
Hello and welcome to the site, Haxxors!

For the first problem, you have simply group all the beacons after the completion of the building and change their owner.

Events
- Unit - A unit Finishes construction
Conditions
- (Unit-type of (Constructed structure)) Equal to yourBuilding
Actions
- Pick every unit in (Units within range of (Position of (Constructing structure)) matching ((Unit-type of (Matching unit)) Equal to beacon))
- - Unit - Change ownership of (Picked unit) to (Owner of (Constructed structure)) and Change color

For the second question, just group the wanted units in the same fashion, but instead changing the owner, just add 125 gold.
 

Cheesy

some fucker
Reaction score
95
For the second question, just group the wanted units in the same fashion, but instead changing the owner, just add 125 gold.

That would add it as soon as they build it. He wants is after a timer runs out.

A question for Haxxors: Do you want it like (125 wood x Number of beacons) ?
 

Don

Rise with the Fallens!
Reaction score
52
For the second:

E:
- (your timer) expires
C:
A:
- Pick every player matching (number_of_beacons[matching player]) = more than or equal to (your ammount needed) and do actions.
- Add 125 wood to picked player

Variable: number_of_beacons[array] = integer

And to update the variable:

E:
- a unit finish the construction of a building
C:
- triggering unit equals to a building and unit type of triggering unit = to beacon
A:
- Set number_of_beacons [player nbumber of owner of triggering unit] = to number of beacons [player number of owner of triggering unit] + 1
- Display to owner of triggering unit: only (your ammount of beacons needed at the end of the timer - number_of_beacons[player number of owner of triggering unit]) to build until timer ends.

This should do :D
 

Don

Rise with the Fallens!
Reaction score
52
just change my last action in frist trigger adding 125 X number_of_beacons.

Can also remove the condition!
 

Haxxors

New Member
Reaction score
1
Im still really confused lol :p im not very good with triggers. :p

I need a trigger that -

-When a unit builds a structure by a beacon the beacon turns his color and he gets control

-Every 1.5 minutes when the timer runs out every players recieves 150 wood for each beacon they control


Sorry, if i'm a nub at this :p
 

demotry241

Don't Ever Categorize Yourself.
Reaction score
105
Code:
Income
    Events
        Time - Every 130.00 seconds of game time
    Conditions
    Actions
        -------- Lumber --------
        Player - Add ((Number of living Lumber Mill units owned by Player 1 (Red)) x 125) to Player 1 (Red) Current lumber
        Player - Add ((Number of living Lumber Mill units owned by Player 2 (Blue)) x 125) to Player 2 (Blue) Current lumber
        Player - Add ((Number of living Lumber Mill units owned by Player 4 (Purple)) x 125) to Player 4 (Purple) Current lumber
        Player - Add ((Number of living Lumber Mill units owned by Player 5 (Yellow)) x 125) to Player 5 (Yellow) Current lumber
        Player - Add ((Number of living Lumber Mill units owned by Player 7 (Green)) x 125) to Player 7 (Green) Current lumber
        Player - Add ((Number of living Lumber Mill units owned by Player 9 (Gray)) x 2) to Player 9 (Gray) Current lumber
        Player - Add ((Number of living Lumber Mill units owned by Player 10 (Light Blue)) x 125) to Player 10 (Light Blue) Current lumber


change lumber mill to you beacon.. and your income of wood thingy is done., just repeatedly create this triggers for your players.. if there are more than that.

for the first part.. follow Andrewgosu's answer
 

Don

Rise with the Fallens!
Reaction score
52
no, but in actions:

player - add property
----------
click on 1000
click on value
change arithmetic to count of living unit-type in group
change units in region for unit of type owned by player of type
change footman for lumber mill
**select your player**
change the + for a x
change the 1 for 125
----------
selecet the same player as b4
----------
change gold to lumber

Here u go!!
 

Haxxors

New Member
Reaction score
1
I'm having some trouble getting what Andrewgosu said to work.

Here's what I have on mine -

- Events

Unit - A unit owned by Player 1 (Red) Finishes construction

- Conditions

(Unit-type of (Constructed structure)) Equal to Farm

- Actions

Unit Group - Pick every unit in (Units within 300.00 of (Position of (Constructed structure)) matching ((Unit-type of (Matching unit)) Equal to Circle of Power (medium))) and do (Unit - Change ownership of (Matching unit) to (Owner of (Constructed structure)) and Change color)


Is there anything here that im doing wrong?
 

Don

Rise with the Fallens!
Reaction score
52
Use generic unit event instead of specific unit event, in that case, it will only do the action if red build close to ''your buiding'' and if you use generic, it'll do it for every player that plays the map!
 

Haxxors

New Member
Reaction score
1
I dont see an option for Generic unit event.

Also, im not using a specific unit event, im using a player owned unit event.

The problem is that even when i build by a beacon with red it doesn't work :/


Thanks your all of your help by the way Don :D
 

demotry241

Don't Ever Categorize Yourself.
Reaction score
105
I dont see an option for Generic unit event.

Also, im not using a specific unit event, im using a player owned unit event.

The problem is that even when i build by a beacon with red it doesn't work :/


Thanks your all of your help by the way Don :D


hmmm.... what warcraft are you using?.. RoC, TFT.

if you are using player owned event.


create multiple events with the same thing only different player.
 

Artificial

Without Intelligence
Reaction score
326
Code:
(Unit - Change ownership of ([i]Matching unit[/i]) to (Owner of (Constructed structure)) and Change color)
You should change that Matching unit to Picked unit.
 

Haxxors

New Member
Reaction score
1
I'm using RoC.


and i was planning on doing that once I got everything to work.


However, I still cant get beacons to change ownership when a player builds by them :/

Ultimatley, this is what I want.

1. I want players to build a building by a beacon
2. When the players finish building by the beacon the beacon comes under their control
3. Players then get 125 wood for every beacon that they control on the map at the end of a timer (which i believe i have already set in the triggers)

Thanks to everyone who has tried to help so far :D
 

Haxxors

New Member
Reaction score
1
I changed it to pick unit, and it worked.


Thank you so much :D


Now how do i get it so that players get 125 wood for every beacon they control?
 

Don

Rise with the Fallens!
Reaction score
52
Code:
Income
    Events
        Time - Every 130.00 seconds of game time
    Conditions
    Actions
        -------- Lumber --------
        Player - Add ((Number of living Lumber Mill units owned by Player 1 (Red)) x 125) to Player 1 (Red) Current lumber
        Player - Add ((Number of living Lumber Mill units owned by Player 2 (Blue)) x 125) to Player 2 (Blue) Current lumber
        Player - Add ((Number of living Lumber Mill units owned by Player 4 (Purple)) x 125) to Player 4 (Purple) Current lumber
        Player - Add ((Number of living Lumber Mill units owned by Player 5 (Yellow)) x 125) to Player 5 (Yellow) Current lumber
        Player - Add ((Number of living Lumber Mill units owned by Player 7 (Green)) x 125) to Player 7 (Green) Current lumber
        Player - Add ((Number of living Lumber Mill units owned by Player 9 (Gray)) x 2) to Player 9 (Gray) Current lumber
        Player - Add ((Number of living Lumber Mill units owned by Player 10 (Light Blue)) x 125) to Player 10 (Light Blue) Current lumber


change lumber mill to you beacon.. and your income of wood thingy is done., just repeatedly create this triggers for your players.. if there are more than that.

for the first part.. follow Andrewgosu's answer

Isn't this trigger working, also, i listed you how to get the actions, doesnt RoC have those?

no, but in actions:

player - add property
----------
click on 1000
click on value
change arithmetic to count of living unit-type in group
change units in region for unit of type owned by player of type
change footman for lumber mill
**select your player**
change the + for a x
change the 1 for 125
----------
selecet the same player as b4
----------
change gold to lumber

Here u go!!
 

Haxxors

New Member
Reaction score
1
I'm having trouble finding this part in the trigger thing

change arithmetic to count of living unit-type in group
change units in region for unit of type owned by player of type


Right now this is what I have the trigger as -

Player - Add ((Point-value of Circle of Power (medium)) x 125) to Player 1 (Red) Current lumber


I tested it in game and it gave me about 12500 wood, i think though that this is because it did it for EVERY beacon in the game, not just the beacon that i had under my control. I need to make it so it only gives 125 wood for each beacon they have. I.E. if a player has 2 beacons, then they recieve (125x2) = 250 wood at the end of a turn.

Any ideas?
 
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