Ok, so i've made a map whereby a dropship comes along, unloads the units and then moves back to the edge of the map. That all works fine. However, when I try to make the dropship despawn when finished, it doesn't work - either he despawns as soon as he spawns, or he doesn't despawn at all. I'll post a link of my trigger so far without the despawn element, if you guys could tell me what to do for the rest of it to make it despawn once the trigger is finished, that'd be great (I've tried setting conditions and a waiting timer, none of which want to work - it'll still despawn as soon as it is created).
Thanks!
Right now all I see is every 60 seconds you spawn a unit at a point make that last une uncommandable. put 4 marines and 2 firebat in the cargo. give two orders which overlap themselves (both are set at replace existing orders) and then you order that unit (which is un-commandable (lol)) to go off the map and I don't see a destroy action.
Maybe adding a remove unit action once the unit gets off screen (into a dummy region perhaps?)
which is why I PM'ed you. I wanted to help. ow well I guess. lol?
Please don't use PM's for help. When it may solve issue the solution will remain here as "I PM'ed you" and thus other user will create another thread or continue to look for help.
@madlibrarian: Go
You issue is probably the fact that you order all this stuff and it is removed instantly (if you even use remove anywhere).
Code runs at once. Even if you give 1000 orders it will still order them and run further.
There's multiple ways to handle this:
you will have to use some variance of "Wait" (duration wait is ok if total time is not exceeding time to next trigger run, in this case 60 seconds)
you could use Wait for condition: Unit order count == 0. This would require you to save drop ship to local variable because at this point 'Last Created Unit' will refer to units inside drop ship
you may save this spawned unit (drop ship) to global variable and in another trigger use event 'Any Unit becomes idle', condition: 'Triggering unit == your saved variable', action: remove/kill Triggering Unit. Note that this approach may be more unstable
Curious about the "after exisiting orders" - When I do set patrol replace current, then add another line, stop after existing orders, the unit instantly stops and doesn't execute the patrol first, at first I thought patrol was accepted as done asap it was set, but then I tried "move" then "Stop" unit stil instantly stops. What's wrong?
I'd use separate triggers for the whole thing you're trying to do. First one spawns the dropship and create the cargo units, also orders the dropship to move to the drop point. A second trigger detects when the dropship has arrived ans orders to drop units, then orders it to go back. A third one removes the dropship when it gets to the border again.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Ok, so i've made a map whereby a dropship comes along, unloads the units and then moves back to the edge of the map. That all works fine. However, when I try to make the dropship despawn when finished, it doesn't work - either he despawns as soon as he spawns, or he doesn't despawn at all. I'll post a link of my trigger so far without the despawn element, if you guys could tell me what to do for the rest of it to make it despawn once the trigger is finished, that'd be great (I've tried setting conditions and a waiting timer, none of which want to work - it'll still despawn as soon as it is created). Thanks!
@madlibrarian: Go
Right now all I see is every 60 seconds you spawn a unit at a point make that last une uncommandable. put 4 marines and 2 firebat in the cargo. give two orders which overlap themselves (both are set at replace existing orders) and then you order that unit (which is un-commandable (lol)) to go off the map and I don't see a destroy action.
Maybe adding a remove unit action once the unit gets off screen (into a dummy region perhaps?)
I decided to remove that from the trigger on account of it not working, and was asking if someone could direct me as to how to make one that works.
@madlibrarian: Go
which is why I PM'ed you. I wanted to help. ow well I guess. lol?
Sorry DarlD, just responded now. My PM thing doesn't like to show I've got PM's until about a day later
@madlibrarian: Go
Hope that info helped ya.
Please don't use PM's for help. When it may solve issue the solution will remain here as "I PM'ed you" and thus other user will create another thread or continue to look for help.
@madlibrarian: Go You issue is probably the fact that you order all this stuff and it is removed instantly (if you even use remove anywhere).
Code runs at once. Even if you give 1000 orders it will still order them and run further.
There's multiple ways to handle this:
@Nerfpl: Go
I prefer to help people in real time as much as possible. Sorry?
Curious about the "after exisiting orders" - When I do set patrol replace current, then add another line, stop after existing orders, the unit instantly stops and doesn't execute the patrol first, at first I thought patrol was accepted as done asap it was set, but then I tried "move" then "Stop" unit stil instantly stops. What's wrong?
I'd use separate triggers for the whole thing you're trying to do. First one spawns the dropship and create the cargo units, also orders the dropship to move to the drop point. A second trigger detects when the dropship has arrived ans orders to drop units, then orders it to go back. A third one removes the dropship when it gets to the border again.