U have 1 building , When u select a Unit in that Building that Unit is created every 5sec ( or w/e ) on a loop (untill de-selected)
but , here the hard part: I want that Unit that is created to basicly Stack up ( so every 5 sec + 1 unit ) and then
once u have Enought units u can push a Button on a Building that will realse them all at once , ( or one at a time w/e )
SO i guess does units would be in a Void untill reade to release?
Now is this done all with trigers? (aside from the button?)
can some one PLS point me in the right Direction to get this done?
Doesn't sound too hard to be honest. Now, I can't actually link a button to a trigger - but I know it's doable. I think you create a dummy ability for the button, and then have a trigger check for when that ability is used.
The actual trigger part (except the button thing) could simply be a periodic event that runs every 5 second. The trigger would simply check a variable for what unit you're spawning (this is what you would have to set with the button trigger), and add + 1 to another variable. Meaning, you don't spawn any units until you press that release button, you simply stack variables.
So say you have your SpawningUnit variable, a UnitCurrentlySpawning variable, a StackingSpawn variable and an array for UnitsToSpawn[x]. You have a trigger that checks SpawningUnit and sets UnitCurrentlySpawning to that value. As long as SpawningUnit and UnitCurrentlySpawning was the same value, that would mean the player hasn't switched unit and you could add + 1 to StackingSpawn, and then add the value of StackingSpawn to UnitsToSpawn[for the unit type you're spawning]. If they did change value, the player switched unit, and you'd set StackingSpawn back to 1. Get it? :x
I'll look around for the button to trigger function so I can post an example of the full trigger.
i'm not that good in the editor, but i can help you with some possibilitys:
1 way: via trigger:
just increase a variable each time a unit should be created (but dont create it yet). then check every time when the variable is increased if the amount is high enough to let them run out of the building. when you then use a ability (has't to do anything, just able to click it for the trigger) or press a costum button create the amount of units stored in the variable at the location of the building.
the only thing i wouldn't know without trying it myself is how to disable the ability until the number is reached.
second way:
give your house the ability to hold units (like bunker or medivacs) and give the unloadbutton a validator thar checks the amount of units in the building (if thats possible).
dont know if you can create units inside such a building, but you could also let them spawn exactly at the same position of the building and give it a order to go inside. dont know if the unit just pops into the map for a millisec.
ok so i have an idea to do it like this ( with less trigers as possible )
I could give the spawning building an ability for all my unit types
that alows them to stack Individually in the building ( like a bunker )
then have a button for each Unit that Realse the Unit ( or all Units )
HAve a basic triger to have the units Spawn Directly in the spawning building from the Construnction building?
and also One to Know witch unit type is selected ( to build ) and one more to have them build on a Time period.
Sound about right ? Im more of a Data guy then trigers , so i wana stay away from trigers as much as possible.
I create an example map, with working triggers to select either Marine, Marauder or Reaper from a Barrack, have them stack over time (just 1 second for testing purposes) and for all to be released when you hit the "Spawn Units" button. Take a look at it, I'm hoping it should clear some things up. Note that all triggers work for any player - so there's just one set of triggers needed.
One more thing doh , COuld I , and by I i mean you ;) (lol) make it , so they are created in a Barrack , but u click on the Command center to relase them ?
cause thats what im doing
u need to build a a building type to make a type of units , ( but u can build it any where on the map )
thats why all need to spawn from the start position ( command center - home abse ) ( the way my game works i need to make them spawn else where )
thanx again , just that map saved me i think 10hours of playing arround.
Absolutely. The triggers will work for any unit - you just have to go to the "Ability - Abilities +" section for the Barrack in the data editor and remove the "Spawn Units" ability. Then go to "Ability - Command Card +" and remove the button. Then you do the same, but the other way around, for adding the ability to your other building. I could re-upload the map with these changes, but it's really easy to do. :3
thanx again , ill be honest with you Triggers is Sorta way out of my league at the moment
ive only been playing with this thing for 2 weeks , I figuered out most of the Stuff int he data Editor ( not the crazy advance stuff )
i havent really started learning trigers yet . i want to , and readying what ur typing is srota over my head im more of a Visual type of guy
Tutorials have been my best friend ( over 25hours of them lol )
Tsk, you'd really be better of learning to do it yourself! Give a man a fish, feed him for the day. Teach a man to fish, feed him for a life time. But in this case, I really wanted to learn to do triggers activated by buttons, so it's okay. :3
ok so basicly what im trying to do is .
U have 1 building , When u select a Unit in that Building that Unit is created every 5sec ( or w/e ) on a loop (untill de-selected) but , here the hard part: I want that Unit that is created to basicly Stack up ( so every 5 sec + 1 unit ) and then once u have Enought units u can push a Button on a Building that will realse them all at once , ( or one at a time w/e )
SO i guess does units would be in a Void untill reade to release?
Now is this done all with trigers? (aside from the button?)
can some one PLS point me in the right Direction to get this done?
@Selfcreation: Go
Doesn't sound too hard to be honest. Now, I can't actually link a button to a trigger - but I know it's doable. I think you create a dummy ability for the button, and then have a trigger check for when that ability is used.
The actual trigger part (except the button thing) could simply be a periodic event that runs every 5 second. The trigger would simply check a variable for what unit you're spawning (this is what you would have to set with the button trigger), and add + 1 to another variable. Meaning, you don't spawn any units until you press that release button, you simply stack variables.
So say you have your SpawningUnit variable, a UnitCurrentlySpawning variable, a StackingSpawn variable and an array for UnitsToSpawn[x]. You have a trigger that checks SpawningUnit and sets UnitCurrentlySpawning to that value. As long as SpawningUnit and UnitCurrentlySpawning was the same value, that would mean the player hasn't switched unit and you could add + 1 to StackingSpawn, and then add the value of StackingSpawn to UnitsToSpawn[for the unit type you're spawning]. If they did change value, the player switched unit, and you'd set StackingSpawn back to 1. Get it? :x
I'll look around for the button to trigger function so I can post an example of the full trigger.
i'm not that good in the editor, but i can help you with some possibilitys:
1 way: via trigger:
just increase a variable each time a unit should be created (but dont create it yet). then check every time when the variable is increased if the amount is high enough to let them run out of the building. when you then use a ability (has't to do anything, just able to click it for the trigger) or press a costum button create the amount of units stored in the variable at the location of the building.
the only thing i wouldn't know without trying it myself is how to disable the ability until the number is reached.
second way:
give your house the ability to hold units (like bunker or medivacs) and give the unloadbutton a validator thar checks the amount of units in the building (if thats possible).
dont know if you can create units inside such a building, but you could also let them spawn exactly at the same position of the building and give it a order to go inside. dont know if the unit just pops into the map for a millisec.
hmm yeah, dont got more idears, hope i could help
thanx for the help guys
looking into it :) ,
Edit:
ok so i have an idea to do it like this ( with less trigers as possible )
I could give the spawning building an ability for all my unit types that alows them to stack Individually in the building ( like a bunker ) then have a button for each Unit that Realse the Unit ( or all Units )
HAve a basic triger to have the units Spawn Directly in the spawning building from the Construnction building? and also One to Know witch unit type is selected ( to build ) and one more to have them build on a Time period.
Sound about right ? Im more of a Data guy then trigers , so i wana stay away from trigers as much as possible.
@Selfcreation: Go
I create an example map, with working triggers to select either Marine, Marauder or Reaper from a Barrack, have them stack over time (just 1 second for testing purposes) and for all to be released when you hit the "Spawn Units" button. Take a look at it, I'm hoping it should clear some things up. Note that all triggers work for any player - so there's just one set of triggers needed.
@Zinatic: Go
WOW <sub> thanx ALOT!!</sub>
One more thing doh , COuld I , and by I i mean you ;) (lol) make it , so they are created in a Barrack , but u click on the Command center to relase them ? cause thats what im doing u need to build a a building type to make a type of units , ( but u can build it any where on the map ) thats why all need to spawn from the start position ( command center - home abse ) ( the way my game works i need to make them spawn else where )
thanx again , just that map saved me i think 10hours of playing arround.
@Selfcreation: Go
Absolutely. The triggers will work for any unit - you just have to go to the "Ability - Abilities +" section for the Barrack in the data editor and remove the "Spawn Units" ability. Then go to "Ability - Command Card +" and remove the button. Then you do the same, but the other way around, for adding the ability to your other building. I could re-upload the map with these changes, but it's really easy to do. :3
@Zinatic: Go
thanx again , ill be honest with you Triggers is Sorta way out of my league at the moment
ive only been playing with this thing for 2 weeks , I figuered out most of the Stuff int he data Editor ( not the crazy advance stuff ) i havent really started learning trigers yet . i want to , and readying what ur typing is srota over my head im more of a Visual type of guy Tutorials have been my best friend ( over 25hours of them lol )
@Selfcreation: Go
You're welcome. But what that a "please re-upload the map" or a "I'll fix it myself"? :p Just so I know before I head to bed.
id like it if u could fix it :P
@Selfcreation: Go
Tsk, you'd really be better of learning to do it yourself! Give a man a fish, feed him for the day. Teach a man to fish, feed him for a life time. But in this case, I really wanted to learn to do triggers activated by buttons, so it's okay. :3
lol , thanx alot
but to be honest ill broply learn more by looking on how u did and redoing it my self , then just trying to figuer it out
thanx a million :) trigers is my next chapter , i will learn it .