Trigger problems

The-Maimer

New Member
Reaction score
0
Ok, now I know that I'm not supposed to name things like that but I'm not very good with words.

Ok, my map is nearly finished, but I can't figure out how to change the starting recourses to what I want them to be. Wouldn't they be in game constants? But they aren't there. How do I change them?

The other is that I want to have an income trigger, how do I get it to give everyplayer setamount of gold every minute of gameplay?
 

darkreapers

New Member
Reaction score
6
for income, its a very simple trigger xD

Trigger:
  • Untitled Trigger 002
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Player - Add 100 to Player 1 (Red) Current gold
 

naughty

New Member
Reaction score
12
Trigger:
  • Starting Gold
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Set (Picked player) Current gold to 500(or how much u want)
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Yeah, use Map Initialization ;)

And to make every player get income, use this:
Trigger:
  • Player Income
    • Events
      • Time - Elapsed game time is 60.00 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Add 150 to (Picked player) Current gold
 

The-Maimer

New Member
Reaction score
0
tyvm, thats works perfectly. Now I have one last problem. How do I get it so I can control everyone of my units with a button? say like, Mass Attack the enemy, how do I get it so I can do that?
 

Angel_Island

Much long, many time, wow
Reaction score
56
Use this action:
Trigger:
  • Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 1 (Red)) and do (Actions)
    • Loop - Actions
 

The-Maimer

New Member
Reaction score
0
Thank you for posting, and not to sound ungracious, but could you be a little more specific plz? :D
 

Tyrulan

Ultra Cool Member
Reaction score
37
Trigger:
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -select as An exact match
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 1 (Red)) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Center of (Playable map area))
 

The-Maimer

New Member
Reaction score
0
ok, I did exactly what you said but it doesn't work, It wants me to select a premade unit, there are none. The units spawn during the game, I want it to send them. I would also prefer if it wasen't a chat command, I'd prefer it it were an ability from a building.
 

Scary Nachos

Castro flashing Gang Signs!
Reaction score
45
Trigger:
  • Untitled Trigger 002
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Repair (R)
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Center of (Playable map area))


Like that?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
For the first, use the event:
Trigger:
  • Unit - A unit Starts the effect of an ability


second, it leaks, use this:
Trigger:
  • Select and Order
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Select and Order
    • Actions
      • Set Temp_Group = (Units owned by (Owner of (Triggering unit)) matching ((Matching unit) Not equal to (Triggering unit)))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Target point of ability being cast)
      • Custom script: call DestroyGroup(udg_Temp_Group)


This means that you have a point target ability, and it will order all units, beside the caster, owned by the owner of the caster to attack-move to the ability target point ;)
 

The-Maimer

New Member
Reaction score
0
Set Temp_Group = (Units owned by (Owner of (Triggering unit)) matching ((Matching unit) Not equal to (Triggering unit)))

i cant find the command for Set Temp_Group. i have used the search function and it told me it didnt match any commands.

call DestroyGroup(udg_Temp_Group)

the editor also errored when i tried to save the rest of the trigger without the set temp group. that is probably because there is no group but im not sure.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Yeah, Temp_Group is a Unit Group variable which has to be created. in the trigger editor just press ctrl+b and then click the green "X" ("New Variable...") and type in Variable Name:
Temp_Group (Case sensitive)
and then Variable type:
go down to Unit Group ;)

Then use the action "Set Variable" and use your variable (Temp_Group) and it should work ;) Use "Units in Range matching Conditions"
 

Emu.Man00

New Member
Reaction score
41
You need to add the variables in the variable editor (little yellow X)
Temp_Group being a unit group, and you also need to add a point variable if you want to remove the leaks.

Trigger:
  • * Select and Order
    • o Events
      • + Unit - A unit Starts the effect of an ability
    • o Conditions
      • + (Ability being cast) Equal to Select and Order
    • o Actions
      • + Set Temp_Group = (Units owned by (Owner of (Triggering unit)) matching ((Matching unit) Not equal to (Triggering unit)))
      • + Set Temp_Point = (Target point of ability being cast)
      • + Unit Group - Pick every unit in Temp_Group and do (Actions)
        • # Loop - Actions
          • * Unit - Order (Picked unit) to Attack-Move To Temp_Point
      • + Custom script: call DestroyGroup(udg_Temp_Group)
      • + Custom script: call RemoveLocation(udg_Temp_Point)


Also, the action for set is 'set variable' itll be near the top of list.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
I'm not sure why i said that actually XD but i don't know, i would believe it's a point already created when the ability is cast :S have no idea really if it leaks, sorry :(
 
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