i am currently trying to make a trigger that makes a medivac follow a marine. but i am having a problem keeping them together. i tried attach location to the marine and then order medivac to that location but its not sticking, must be doing something wrong! lol. anyways tell me what you think of this and how i can get this to work...2Triggers:
AttachRegion
Events
Timer - Every 1.0 seconds of Game Time
Local Variables
Conditions
(Unit type of (Triggering unit)) == Marine
(Owner of (Triggering unit)) == 9
Actions
Region - Attach P9EnergyPatrol to (Agent of player 9 for (Triggering unit)) with offset (Point(0.0, 0.0))
The second one is:
EnergyPatrol
Events
Timer - Every 2.0 seconds of Game Time
Local Variables
Conditions
Actions
Unit - Order all units in (Any units in WarGround owned by player 9 matching Required: Has Energy, with at most Any Amount) to ( Patrol targeting (Center of P9EnergyPatrol)) (Replace Existing Orders)
Mostly haveing the problem of attaching the location. the medivac patrols to location that dont stay with the marine, lol. Maybe shorten it up to 1 trigger? idk. any advice is graetly appreciated. :D
As Trieva has said you are have not provided an event or included within the event the actual unit that is the "triggering unit". Second you should propably use "attach region to unit" and not this agent of player crap.
Lastly why on earth are you using 2 triggers for this when it should be one, especially when it comes to periodic events as well and when the timing are so naturally close. This should all be done in one trigger for starters and mostly likely be done every 1 sec. If you really need it every 2 and 1 i would suggest setting it up as a 2 sec event and then having a wait action of 1 min and repeating the 1 sec action.
Maybe its me but its really scary that there's issues with something this simple - i highly suggest you watch some tutorial especially like a if-then-else tutorial that i believe onetwo did which explains how triggers are supposed to work. Hope it helps
wow dont know of any tutorials for sc2 triggers. but anyways. im good at modifing triggers once i have the base concept, such as i was asking how to get a unit to follow a unit. i can take that and make any unit follow any unit then and not just medivac/marine. sence this is a public forum and i can ask anything and everything that i need help with why not use it from people who are veterans in this stuff? i might be able to figure it out but its easier to have help than to wing-it...
as for the following issue, i can get medivac to patrol to location, i just need the location to stay with the marine. :D
All you need to do is order the medivac to follow the marine. If you have a unit selected, and right click on another ally unit, the selected unit will follow the one you right clicked. This is done through the move command.
Issue order to unit (your medivac) to (ability (move) targeting unit (the marine))
That will make the medivac follow the marine. Also, you only need to attach a region to a unit once, and it will stay on the unit even if the unit moves. So if you wanted, you can order your medivac to move to that region ever few seconds.
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
actions/unit/issue order = Order (triggering unit) to (Ability Command) (Replace existing order)
Changed: (Ability Command) to (Ability Command targeting (triggering unit))
Order (triggering unit) to (Ability Command targeting (triggering unit))
when i click on triggering unit it goes to unit form. no list of units to select and all thats left is the Function button and fields how do i make it a unit type (marine/medivac)? not trying to sound dumb just confused thats all, the only other issue order i have is to unit group and that dont seem right. as far as attach region to unit, im back at the unit menu wondering how to make it to marine, lol same thing.
Attach Region to (last created unit) want to change last created unit to marine. but hit the same wall as above. :/ 1 solution 2 problems, dam! haha
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
i am currently trying to make a trigger that makes a medivac follow a marine. but i am having a problem keeping them together. i tried attach location to the marine and then order medivac to that location but its not sticking, must be doing something wrong! lol. anyways tell me what you think of this and how i can get this to work...2Triggers:
AttachRegion
Events
Timer - Every 1.0 seconds of Game Time
Local Variables
Conditions
(Unit type of (Triggering unit)) == Marine
(Owner of (Triggering unit)) == 9
Actions
Region - Attach P9EnergyPatrol to (Agent of player 9 for (Triggering unit)) with offset (Point(0.0, 0.0))
The second one is:
EnergyPatrol
Events
Timer - Every 2.0 seconds of Game Time
Local Variables
Conditions
Actions
Unit - Order all units in (Any units in WarGround owned by player 9 matching Required: Has Energy, with at most Any Amount) to ( Patrol targeting (Center of P9EnergyPatrol)) (Replace Existing Orders)
Mostly haveing the problem of attaching the location. the medivac patrols to location that dont stay with the marine, lol. Maybe shorten it up to 1 trigger? idk. any advice is graetly appreciated. :D
As Trieva has said you are have not provided an event or included within the event the actual unit that is the "triggering unit". Second you should propably use "attach region to unit" and not this agent of player crap.
Lastly why on earth are you using 2 triggers for this when it should be one, especially when it comes to periodic events as well and when the timing are so naturally close. This should all be done in one trigger for starters and mostly likely be done every 1 sec. If you really need it every 2 and 1 i would suggest setting it up as a 2 sec event and then having a wait action of 1 min and repeating the 1 sec action.
Maybe its me but its really scary that there's issues with something this simple - i highly suggest you watch some tutorial especially like a if-then-else tutorial that i believe onetwo did which explains how triggers are supposed to work. Hope it helps
@hobbidude:
wow dont know of any tutorials for sc2 triggers. but anyways. im good at modifing triggers once i have the base concept, such as i was asking how to get a unit to follow a unit. i can take that and make any unit follow any unit then and not just medivac/marine. sence this is a public forum and i can ask anything and everything that i need help with why not use it from people who are veterans in this stuff? i might be able to figure it out but its easier to have help than to wing-it...
as for the following issue, i can get medivac to patrol to location, i just need the location to stay with the marine. :D
All you need to do is order the medivac to follow the marine. If you have a unit selected, and right click on another ally unit, the selected unit will follow the one you right clicked. This is done through the move command.
That will make the medivac follow the marine. Also, you only need to attach a region to a unit once, and it will stay on the unit even if the unit moves. So if you wanted, you can order your medivac to move to that region ever few seconds.
@zeldarules28:
actions/unit/issue order = Order (triggering unit) to (Ability Command) (Replace existing order)
Changed: (Ability Command) to (Ability Command targeting (triggering unit))
Order (triggering unit) to (Ability Command targeting (triggering unit))
when i click on triggering unit it goes to unit form. no list of units to select and all thats left is the Function button and fields how do i make it a unit type (marine/medivac)? not trying to sound dumb just confused thats all, the only other issue order i have is to unit group and that dont seem right. as far as attach region to unit, im back at the unit menu wondering how to make it to marine, lol same thing.
Attach Region to (last created unit) want to change last created unit to marine. but hit the same wall as above. :/ 1 solution 2 problems, dam! haha