I have been wanting to make a map for a long time, but I have no programming or mod making experience. Hopefully someday I can be a big part of the community here on SC2mapster. After watching and reading every single tutorial I could get my hands on for the past week I'm having trouble on one of the triggers for my map. If someone could help I would appreciate it so much, im really trying to figure this out.
I need a trigger that starts when any unit within a specific unit group moves next to and clicks on a specific neutral building. The action should load a progress bar over 8 seconds that will hide the building and increase an integer variable. However, any actions taken by the triggering unit or any damage taken during the 8 second period will stop or reset the trigger.
This would be similar to capturing tributes or turning in coins in heroes of the storm.
Thank you for your time, I hope that someone can help.
This is just off the top of my head and may not be the optimal choice but what comes to find and to have your trigger apply a buff to the capturing unit. The buff is there simply to ensure the unit is not active and if it does it would be removed. Then just have your trigger check while the unit has the buff modify your integer that keeps track of the progress bar and update the dialog accordingly.
I wish I knew how to do any of this. I set the event when unit enters range of unit. Instead of a unit clicking on a building. But units can't click so I don't know what to do
Check my signature for all the tutorials you'll ever need. If you want to do this with triggers, there is an event for player selects unit, you can use that and set the condition to be owner of unit == player 0.
Edit: then you can do some actions like pick each unit in the unit group you want, then check if they are within like 2 meters of point, and make the point "position of unit" with the unit being the neutral structure. if all of this is true, then you can make your progress bar appear.
If you ever intend on using unit selections where a player is meant to select a unit owned by another, be sure you use the action "override player option". Choose enable Enemy Unit selection. Took me months before I realized what was happening in one of my maps where it wasn't working for some players.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello SC2Mapster community,
I have been wanting to make a map for a long time, but I have no programming or mod making experience. Hopefully someday I can be a big part of the community here on SC2mapster. After watching and reading every single tutorial I could get my hands on for the past week I'm having trouble on one of the triggers for my map. If someone could help I would appreciate it so much, im really trying to figure this out.
I need a trigger that starts when any unit within a specific unit group moves next to and clicks on a specific neutral building. The action should load a progress bar over 8 seconds that will hide the building and increase an integer variable. However, any actions taken by the triggering unit or any damage taken during the 8 second period will stop or reset the trigger.
This would be similar to capturing tributes or turning in coins in heroes of the storm.
Thank you for your time, I hope that someone can help.
@KradDrol1: Go
This is just off the top of my head and may not be the optimal choice but what comes to find and to have your trigger apply a buff to the capturing unit. The buff is there simply to ensure the unit is not active and if it does it would be removed. Then just have your trigger check while the unit has the buff modify your integer that keeps track of the progress bar and update the dialog accordingly.
What about behavior? its the easiest thing ever!
Make behavior with progress bar like life time or duration and make trigger.
and just set it
When your action starts, add the progress behavior to your unit and after time remove behaviour and again and again. it will still comes up.
I wish I knew how to do any of this. I set the event when unit enters range of unit. Instead of a unit clicking on a building. But units can't click so I don't know what to do
@KradDrol1: Go
Check my signature for all the tutorials you'll ever need. If you want to do this with triggers, there is an event for player selects unit, you can use that and set the condition to be owner of unit == player 0.
Edit: then you can do some actions like pick each unit in the unit group you want, then check if they are within like 2 meters of point, and make the point "position of unit" with the unit being the neutral structure. if all of this is true, then you can make your progress bar appear.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
@fishy77: Go
If you ever intend on using unit selections where a player is meant to select a unit owned by another, be sure you use the action "override player option". Choose enable Enemy Unit selection. Took me months before I realized what was happening in one of my maps where it wasn't working for some players.