I shall try that tomorrow. I was originally going to just copy over data from a worker and replace everything with the peasant. However this might be a better solution :D
Its not set because it keeps resetting. I dont know why, and I dont know how to fix it. Try it: make the command card go to 2. Then click on something else - a different unit in data editor. Then go back to peasant and it will do the same.
In my submenu there are abilities to construct a building. I tried moving the button/ability onto the first command card and the unit began building. So I know these abilities work. All the abilities(build) are in the second command card. And I want it to work like a worker, probe,scv, drone. Yes, the worker has the ability. Here's a link to my map, look at peasant in the data editor.
The problem is, there are 6 players, each creating units for a time limit, which may differ from another player. Creating a loop and singularly adding buff seems like a longer, inefficient way.
I thought up of something after I posted shown as attachment.
Meanwhile, as the number of ultralisk caverns change, the more # of guardians and/or the longer the guardians last.
I need something like: create 2 guardians at x location
give last created unit y buff
Except the function last created unit will not give to both of them. I don't want to put the buff on a type of unit because it will change. So I want to put a particular buff, based on conditionals, on a unit.
Give the unit a Buff behaviour with the timed life being set under the Stats: Duration field and a Damage type effect under the Effect: Effect - Final field. Make sure the Damage effect has the Kill flag enabled although the default called Timed Life Fate should suffice.
I'm not very familiar with the data editor, and you basically said the same thing the link did. I don't know how to add a buff to a unit, but I can add a behaviour. I have also tried looking how it works on infested terrans/turrets and I cannot find it.
Hello, I am wondering how to apply a timed life on units. It needs to be specific to the unit I create because their duration might change. I tried doing this http://www.galaxywiki.net/Timed_Life but I don't understand it.
How should I reference players, the GUI wants an integer. If you mean this:
Add 10 minerals for player 5
Add 10 minerals for player 6
Add 10 minerals for player 7
I can't think of a better way. They are in a player group called bottom force. But I am unsure if I can do add 10 minerals for each player in x player group. I'm a noob, this is my first map :)
Hello everyone, I am wondering if and how triggers work (perhaps a queue?) when two events are something like "any unit dies" Each different trigger goes to a different player group.
Example: -Trigger 1-
Event: Any unit dies Conditions: Owner of Triggering Unit == 4 ;This is the AI's player number
Actions: If ;works best if I don't put an initial condition for this if
Or
Unit type of triggering unit == Zealot
Unit type of triggering unit == Ghost
Unit type of triggering unit == Firebat
Unit type of triggering unit == Kerrigan - Void
Unit type of triggering unit == Hydralisk
Then: Add 10 minerals for player 5
Add 10 minerals for player 6
Add 10 minerals for player 7
Trigger 2 is similar but instead of the initial condition of player 4, it is 8. In addition 10 minerals are added to player 1, 2, and 3.
My question is, if a unit dies, will the code make a queue such that it checks the first trigger with event "any unit dies" and then the second? Or will it just break completely? I'm curious because both triggers use the same event but different conditions (I would assume this is fine). The other issue is that these two triggers will happen like every 2-5 seconds and I don't want any issues to occur. Edit: The reason I am worried about the time is if it does make a queue, but the frequency is high, there might be some delay to the mineral addition.
I was also skeptical of combining these two triggers into one trigger.
P.S. I would test but I have not figure out how to be on 2 teams at different times :P
Clean Empty Slots
Events
Game - Map initialization
Local Variables
Conditions
Actions
Player Group - Pick each player in (All players) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
Or
Conditions
(Status of player (Picked player)) == Unused
(Status of player (Picked player)) == Left The Game
Then
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Picked player) matching (No Value), with at most Any Amount) and do (Actions)
Actions
Unit - Remove (Picked unit) from the game
Else
Clean Dropper
Events
Player - Player Any Player leaves the game with Any
Local Variables
Conditions
Actions
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching (No Value), with at most Any Amount) and do (Actions)
Actions
Unit - Remove (Picked unit) from the game
Thank you so much! I didn't realize the check was a conditional.
0
0
What should I do? How can I fix it?
0
Its not set because it keeps resetting. I dont know why, and I dont know how to fix it. Try it: make the command card go to 2. Then click on something else - a different unit in data editor. Then go back to peasant and it will do the same.
0
Hi, thanks for responding.
In my submenu there are abilities to construct a building. I tried moving the button/ability onto the first command card and the unit began building. So I know these abilities work. All the abilities(build) are in the second command card. And I want it to work like a worker, probe,scv, drone. Yes, the worker has the ability. Here's a link to my map, look at peasant in the data editor.
0
Ok I'll use a loop, thanks!
0
The problem is, there are 6 players, each creating units for a time limit, which may differ from another player.
Creating a loop and singularly adding buff seems like a longer, inefficient way.
I thought up of something after I posted shown as attachment.
Meanwhile, as the number of ultralisk caverns change, the more # of guardians and/or the longer the guardians last.
0
Is it possible to create a unit with a behavior.
I need something like: create 2 guardians at x location
give last created unit y buff
Except the function last created unit will not give to both of them. I don't want to put the buff on a type of unit because it will change. So I want to put a particular buff, based on conditionals, on a unit.
https://www.sc2mapster.com/forums/development/data/228160-timed-life-like-infested-terran-turret is the buff that I want to apply, basically a timer for the unit.
0
Awesome, just what I needed. Thanks for your help!
Now I just need trigger help with this buff.
0
Edit: I kind of need hand holding here :)
0
Hello, I am wondering how to apply a timed life on units. It needs to be specific to the unit I create because their duration might change.
I tried doing this http://www.galaxywiki.net/Timed_Life but I don't understand it.
Thanks!
0
That seems a lot simpler xD
How should I reference players, the GUI wants an integer.
If you mean this:
Add 10 minerals for player 5
Add 10 minerals for player 6
Add 10 minerals for player 7
I can't think of a better way. They are in a player group called bottom force. But I am unsure if I can do add 10 minerals for each player in x player group. I'm a noob, this is my first map :)
0
Hello everyone, I am wondering if and how triggers work (perhaps a queue?) when two events are something like "any unit dies"
Each different trigger goes to a different player group.
Example:
-Trigger 1-
Event: Any unit dies
Conditions: Owner of Triggering Unit == 4 ;This is the AI's player number
Actions: If ;works best if I don't put an initial condition for this if
Or
Unit type of triggering unit == Zealot
Unit type of triggering unit == Ghost
Unit type of triggering unit == Firebat
Unit type of triggering unit == Kerrigan - Void
Unit type of triggering unit == Hydralisk
Then:
Add 10 minerals for player 5
Add 10 minerals for player 6
Add 10 minerals for player 7
Trigger 2 is similar but instead of the initial condition of player 4, it is 8. In addition 10 minerals are added to player 1, 2, and 3.
My question is, if a unit dies, will the code make a queue such that it checks the first trigger with event "any unit dies" and then the second?
Or will it just break completely? I'm curious because both triggers use the same event but different conditions (I would assume this is fine). The other issue is that these two triggers will happen like every 2-5 seconds and I don't want any issues to occur.
Edit: The reason I am worried about the time is if it does make a queue, but the frequency is high, there might be some delay to the mineral addition.
I was also skeptical of combining these two triggers into one trigger.
P.S. I would test but I have not figure out how to be on 2 teams at different times :P
0
0
0
How do I check players in map initalization?