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.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      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