What can i do to have pre-filled bunkers with marines 4 or 6 for overtime that i place a bunker in the terrain module. And that if i change the team the marines inside will change too. Is this doable by date because all I've found is done by triggers.
It would have to be done by triggers, I believe. But it would be a simple initialize trigger. Pick each unit type bunker and create cargo unit for picked unit.
If you want to build a bunker and have it automatically filled with units in game, you would need a separate trigger upon unit creation, with the condition being that the unit being created is a bunker.
Hi! Thanks for your help. But, unfortunately i can't find nowhere the action: Pick Each Unit Type (Bunker). I can only see Pick each unit in unit group. Pick each player in player group and pick each integer.
You want Pick each unit in unit group. It will come up with a function for (last created units). Click that and change it to (Units in region matching condition).
This will bring up a large function with a bunch of things you can change. The only one you need right now is (Any). Change it to (Unit Type of Unit). Another Function called (Triggering unit) pops up. Click it, change to Values, and then simply choose one of the bunkers that are on the map.
Now in the new action field created by your pick and do, make a new action (Create Cargo Units). Change (last created units) to (Picked Unit). You can finally set how many you want to make and what kind. If you want 1 firebat and two marines, you'll need to copy past the action and change the numbers accordingly. Just keep in mind that stock bunkers have a cargo space of 4 (unless upgraded or edited in the data) and the cargo space of any units you want to add. Trying to create too many units will probably throw back a few errors upon testing, and may not allow the trigger to fire properly.
EDIT: It's a really good idea anytime you use new events/conditions/actions to play around with all of the fields so you can get an idea of just what you can accomplish with triggers. Following step by step instructions is fine if you are learning, but experience is the best teacher.
No, I mean trying to load each bunker with 3 marines and 1 firebat (5 cargo space) would either throw up a bunch of errors and load 3 marines or throw up a bunch of errors and not load anything.
So i have to group them using variables is that it?
No. When you change (Triggering Unit) to a value, which is the list where you see everything you've placed so far, it picks every unit of that type. So picking a bunker would make the actions do the same thing for EVERY bunker in place when the map starts.
Adding them to a Unit group would be just as easy, but it's a different process.
Ok. This is what i did... But it still not working. The bunkers aint firing.
Trigger Name: Pre-garrisoned bunkers
∇ Events
Game - Map Initialization
x= Variables
⇒Conditions
∇ Actions
∇ Unit Group - Pick each unit in ((Unit type of Army Defense - Armed Bunker [61.50, 126.50]) units in (Entire Map) owned by player in Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
∇ Actions
Unit - Create 2 Army - Marines as cargo in (Picked Unit)
Unit - Create 1 Army - Firebat as cargo in (Picked Unit)
Here's how to create a second bunker unit that can be pre-placed in the terrain module and will be pre-filled with units when the game starts.
Part 1
Duplicate the normal bunker unit and name it "Bunker Prefilled".
Duplicate the normal bunker actor and set its Unit Name token to "Bunker Prefilled". (This step isn't really required but creating units without actors causes errors during the game).
Create a new effect of type: Create Unit and name it "Create Marines". Set up the unit type you want (Marines) and the number you want to spawn (4 or 6). This will spawn units next to the bunker.
Create a new effect of type: Issue Order and name it "Enter Bunker". Set the ability to "Bunker - Load-Unload (Bunker)". Set the Unit to "Caster" and set the Target to "Target Unit". This will order the bunker to load the units.
Go back to the first effect (Create Unit) and set Effect - Spawn to the effect you just created. The tooltips explain what most of these fields mean.
Now you could go to the new bunker unit and add the Create Unit effect to the "(Basic) Unit: Effect^ +" field and you're done, but there's one small problem...
Part 2
To replace the bunker with a normal bunker:
Create a new ability of type Morph, name it "Replace With Normal Bunker" and add the normal bunker unit to the ability info.
Add this ability to the new bunker unit. You don't need to set up command card buttons for this.
Create a new effect of type: Issue Order and name it "Replace With Normal Bunker". Set the ability to the new morph ability and set the unit to "Caster".
Create a new effect of type Set. Name it "Prefill With Marines" and add the Create Unit effect and the effect to issue the morph order. When we add this effect to the new bunker, it will cause it to spawn the 4–6 units, load them and then morph into a normal bunker.
Add this new Set effect to the new bunker unit for the Birth event.
Bless you it works! and all those who help those in need. :) Ive noticed i didn't need do add the morph ability to the abilities of the new bunker it works just fine without it.With just the set placed on the unit effects under birth it works. Anyway do u happen to know how could i increase the cargo size so i could add more units to the bunker as if it were an upgraded bunker? Thanks anyway. IT works! Yeah!
PD:
Why did u said in your first post "a second bunker unit"?
By just editing the data, you can change the bunkers data field "cargo space".
By trigger, upon initialization set (The Bunker space upgrade) level for (Whatever player you want) = 1
If I'm understanding his data solution (which I understood but couldn't duplicate), either solution should work without changing anything else (except the number of marines you spawn).
Ive noticed i didn't need do add the morph ability to the abilities of the new bunker it works just fine without it.With just the set placed on the unit effects under birth it works.
I touched upon this but I wasn't very clear. Since this isn't a normal bunker (as in the bunker from the standard game dependencies), you'll end up having two different types of bunkers on the map. This may be undesirable. That's why I included Part 2 which adds the morph effect to turn the bunker back to a standard bunker immediately after it's garrisoned. My thinking was that you'd use this bunker purely for pre-placing bunkers in the terrain module. But it's of course perfectly fine to skip Part 2 and just have two different types of bunkers in your map.
The "(Basic) Stats: Cargo Size" field field on the bunker is just how many cargo slots the bunker would occupy if it were loaded inside a transport.
Whoops. I should have caught that. I made the same mistake trying to make my nydus canals hold more cargo. Weren't they initially made to hold an unlimited number of units? The ability as is has a limit of 255. Which is a lot, but I felt 9999 was a more fair number. lol
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
What can i do to have pre-filled bunkers with marines 4 or 6 for overtime that i place a bunker in the terrain module. And that if i change the team the marines inside will change too. Is this doable by date because all I've found is done by triggers.
@JEGCPR: Go
It would have to be done by triggers, I believe. But it would be a simple initialize trigger. Pick each unit type bunker and create cargo unit for picked unit.
If you want to build a bunker and have it automatically filled with units in game, you would need a separate trigger upon unit creation, with the condition being that the unit being created is a bunker.
@BigDonRob: Go
Hi! Thanks for your help. But, unfortunately i can't find nowhere the action: Pick Each Unit Type (Bunker). I can only see Pick each unit in unit group. Pick each player in player group and pick each integer.
@JEGCPR: Go
You want Pick each unit in unit group. It will come up with a function for (last created units). Click that and change it to (Units in region matching condition).
This will bring up a large function with a bunch of things you can change. The only one you need right now is (Any). Change it to (Unit Type of Unit). Another Function called (Triggering unit) pops up. Click it, change to Values, and then simply choose one of the bunkers that are on the map.
Now in the new action field created by your pick and do, make a new action (Create Cargo Units). Change (last created units) to (Picked Unit). You can finally set how many you want to make and what kind. If you want 1 firebat and two marines, you'll need to copy past the action and change the numbers accordingly. Just keep in mind that stock bunkers have a cargo space of 4 (unless upgraded or edited in the data) and the cargo space of any units you want to add. Trying to create too many units will probably throw back a few errors upon testing, and may not allow the trigger to fire properly.
EDIT: It's a really good idea anytime you use new events/conditions/actions to play around with all of the fields so you can get an idea of just what you can accomplish with triggers. Following step by step instructions is fine if you are learning, but experience is the best teacher.
By unit you mean each bunker? i have 2 sides east and west with bunch of bunkers each side. So i have to group them using variables is that it?
@JEGCPR: Go
No, I mean trying to load each bunker with 3 marines and 1 firebat (5 cargo space) would either throw up a bunch of errors and load 3 marines or throw up a bunch of errors and not load anything.
No. When you change (Triggering Unit) to a value, which is the list where you see everything you've placed so far, it picks every unit of that type. So picking a bunker would make the actions do the same thing for EVERY bunker in place when the map starts.
Adding them to a Unit group would be just as easy, but it's a different process.
Ok. This is what i did... But it still not working. The bunkers aint firing.
Trigger Name: Pre-garrisoned bunkers
∇ Events
Game - Map Initialization
x= Variables ⇒Conditions
∇ Actions
∇ Unit Group - Pick each unit in ((Unit type of Army Defense - Armed Bunker [61.50, 126.50]) units in (Entire Map) owned by player in Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
∇ Actions Unit - Create 2 Army - Marines as cargo in (Picked Unit) Unit - Create 1 Army - Firebat as cargo in (Picked Unit)
Buuuuuut. No cigar.
Here's how to create a second bunker unit that can be pre-placed in the terrain module and will be pre-filled with units when the game starts.
Part 1
Part 2
To replace the bunker with a normal bunker:
Ta-da!
Oh, and here are the triggers used: http://peeeq.de/gui.php?id=3878
Bless you it works! and all those who help those in need. :) Ive noticed i didn't need do add the morph ability to the abilities of the new bunker it works just fine without it.With just the set placed on the unit effects under birth it works. Anyway do u happen to know how could i increase the cargo size so i could add more units to the bunker as if it were an upgraded bunker? Thanks anyway. IT works! Yeah!
PD:
Why did u said in your first post "a second bunker unit"?
By just editing the data, you can change the bunkers data field "cargo space".
By trigger, upon initialization set (The Bunker space upgrade) level for (Whatever player you want) = 1
If I'm understanding his data solution (which I understood but couldn't duplicate), either solution should work without changing anything else (except the number of marines you spawn).
Because you make another unit in the data window named prefilled bunker.
I touched upon this but I wasn't very clear. Since this isn't a normal bunker (as in the bunker from the standard game dependencies), you'll end up having two different types of bunkers on the map. This may be undesirable. That's why I included Part 2 which adds the morph effect to turn the bunker back to a standard bunker immediately after it's garrisoned. My thinking was that you'd use this bunker purely for pre-placing bunkers in the terrain module. But it's of course perfectly fine to skip Part 2 and just have two different types of bunkers in your map.
Just change the "(Basic) Stats: Cargo Count Maximum^" and "(Basic) Stats: Cargo Space^" fields of the "Bunker - Load-Unload (Bunker)" ability.
The "(Basic) Stats: Cargo Size" field field on the bunker is just how many cargo slots the bunker would occupy if it were loaded inside a transport.
Indeed.
Ohh lol. My bad.. You just went right to explain the first step lol. Ok nvm. Thanks guys.. I think this will do for now.....for now..... lol :)
Whoops. I should have caught that. I made the same mistake trying to make my nydus canals hold more cargo. Weren't they initially made to hold an unlimited number of units? The ability as is has a limit of 255. Which is a lot, but I felt 9999 was a more fair number. lol