Nvm, fixed. Gah, talking problems through with peeps on the IRC really helps (even if they don't know the answer XD).
The problem was the unit group was local and was getting units rehashed into it every time the trigger ran, so basically it had the exact same units as the waves. From that, the computer was removing units from the waves and therefore removing units from the unit group. The fix? Creating a global unit group that only gets the units of each wave added to it once.
So I have units shoved into a wave via data table. Then these units are added to a unit group. Every unit in this unit group (when they are about 10 spaces from a hatchery) are ordered to morph. This works.. sort of...
Some of the first few units that reach a hatchery are ordered to morph as normal, but the others are magically removed from the unit group (tested via chat output of number of units in UGroup).
How are these units magically getting removed from the unit group?
Side notes:
- A computer player controls the units.
- Trigger code below:
SunkenRushChildEventsTimer-Every1.2secondsofAITimeLocalVariablesPos=0.0<Real[1]>
Player = 2 <Integer>
Wave = (Empty unit group) <UnitGroup[8]>
Conditions
Actions
Unit Group - Add all units in (Units of (("SR" + "2") from the Global data table)) to Wave[2]
UI - Display (Combine ("Checking for sunken spot with ", (Text((Get the number of units in wave (("SR" + (String(2))) from the Global data table)))), " or ", (Text((Number of Living units in Wave[2]))), " drones.")) for (All players) to Subtitle area
General - While (Conditions) are true, do (Actions)
Conditions
Player < 9ActionsUnitGroup-PickeachunitinWave[Player]anddo(Actions)ActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Distancebetween(Positionof(Pickedunit))and(StartlocationofplayerPlayer))<10.0ThenUnit-Create1PhotonCannonforplayer1at(Positionof(Pickedunit))usingdefaultfacing(UnderConstruction)Variable-SetPos[0] =(Xof(Positionof(Lastcreatedunit)))Variable-SetPos[1] =(Yof(Positionof(Lastcreatedunit)))Unit-Remove(Lastcreatedunit)fromthegameUnit-Order(Pickedunit)to(Stop)(ReplaceExistingOrders)Unit-Order(Pickedunit)to(Drone-MutateintoSpineCrawlertargeting(Point(Pos[0],Pos[1])))(ReplaceExistingOrders)-------Forcedronestowanderarounduntilfindaspottosunkenon.General-If(Conditions)thendo(Actions)elsedo(Actions)If0<=(Distancebetween(Positionof(Pickedunit))and(StartlocationofplayerPlayer))<=3ThenGeneral-Wait0.7AITimesecondsUnit-Order(Pickedunit)to(Movetargeting(Centerof(Playablemaparea)))(ReplaceExistingOrders)ElseUnit-Order(Pickedunit)to(Movetargeting(StartlocationofplayerPlayer))(AfterExistingOrders)ElseVariable-ModifyPlayer:+1-------Deletewavesonceallsunkensaremadeordronesdied.General-Waitfor(Conditions),checkingevery2.2GameTimesecondsConditions(NumberofLivingunitsin(DroneunitsinWave[2]ownedbyplayer1matchingExcluded:Missile,Stasis,Dead,Hidden,withatmostAnyAmount))==0(NumberofLivingunitsin(DroneunitsinWave[3]ownedbyplayer1matchingExcluded:Missile,Stasis,Dead,Hidden,withatmostAnyAmount))==0Variable-SetPlayer =2General-While(Conditions)aretrue,do(Actions)ConditionsPlayer<9ActionsAIAdvanced-Deletewave(("SR"+(String(Player)))fromtheGlobaldatatable)Variable-ModifyPlayer:+1Trigger-Turn(Currenttrigger)Off
P.S. I dropped all the units from the Waves (Data Table) into unit groups because I figured the computer was pulling them out of the waves and couldn't do that to unit groups. Neither is confirmed, it was just a guess.
So I have an ability that chains into missile launch as such:
Persistent > Search Area > Launch Missile
The problem is I cannot get the missile to launch from off of the ground. I have searched around and tried using Site Ops, or changing the periodic offset of the Persistent effect, but to no avail. The Site Op has no effect, and the Persistent's periodic offset can only change the launch offset on a 2D, xy plane.
Any insight into getting my missile to launch off the ground is appreciated.
Btw, changing the missile unit's height isn't a viable option as it messes up the mover big time.
SS's that may be of help:
nvm, fixed it. Just made like 10 changes at once. Needed to change, mover pathing, where the LM effect was launching from, unit height, and CP offset. Done.
You can use the AI command Build, or you can do an Issue Order -> Build Hatchery thing...
If you go with the AI command, the computer might not do it instantly (think time), but they will find an open area to place the hatchery automatically
If you go with Issue Order, it will be built instantly, but if there is something in the spot you want to build the Hatchery, it won't be built at all.
Then I guess for the nydus thing you can do something like any unit uses 'nydus transport'.. & if the unit type = drone... then do that stuff.
nah. You have to go into the text editor and change the name of the unit in there. The text links are the same, but you have to change them so it doesnt keep renaming itself... i think its F8 or something.
in the editor, hit 'open map.' Then go to Battle.net, log in, and DL one of those maps. Check out the triggers of a custom map you've played before to get a familiarity for triggers.
The basics:
The event Ahli is talking about is "Periodic Event"
Regions are basically area's of w/e size you define. They are a layer in the terrain editor (Press R after loading a map and the region editor will show).
Order units with "Issue Order."
the player leaves event only fires if the player loses, wins, or ties the game. It doesnt detect disconnects, alt-f4's, or menu->quits
you need a periodic timer or something, then use a pick each player in 'all players'.. if player status = left the game (or w/e), then do:
kill all units owned by player.
do uhm...
pick each spore crawler and do:
-Enable Script control for (picked unit)
then the same for spine crawlers ----
but, the AI will only move the spine/spore crawlers if there is no creep under them... If you don't want preplaced s crawlers to move just put a creep tumor near them (or permanent creep).
Unit - Create ([Upgrade] count for player Triggering Player, counting Complete) Marine for player Triggering Player at [Point] using default facing (No Options)
with the event 'upgrade count changes' or w/e the upgrade event is
Ty Zelda ---------
Here's an SS of the perfectly working script if anyone needed an idea of how to put this together.
This trigger orders the AI to build a Pylon near any unpowered Protoss structure as long as the computer is able (has nexus + probe).
I know there's the behavior 'Power User,' but I'm not sure how or if I could use that to help me detect a building out of range of a Pylon (unpowered).
Basically just need this so that if a computer player has any unpowered buildings I can make them build a pylon in that area to power them.
Which settings do I need to change to make my triggers look like this:
instead of this:
at startup? (Or make the loops within triggers not auto-expand themselves when I look at a different trigger). The expandiness of all my folders and trigger loops is a headache to see when I go to edit things.
0
@zeldarules28: Go
Do you want my beta key? I hardly play the beta because I don't want to fail school until the actual game comes out.
0
Nvm, fixed. Gah, talking problems through with peeps on the IRC really helps (even if they don't know the answer XD).
The problem was the unit group was local and was getting units rehashed into it every time the trigger ran, so basically it had the exact same units as the waves. From that, the computer was removing units from the waves and therefore removing units from the unit group. The fix? Creating a global unit group that only gets the units of each wave added to it once.
Done!
0
So I have units shoved into a wave via data table. Then these units are added to a unit group. Every unit in this unit group (when they are about 10 spaces from a hatchery) are ordered to morph. This works.. sort of...
Some of the first few units that reach a hatchery are ordered to morph as normal, but the others are magically removed from the unit group (tested via chat output of number of units in UGroup).
How are these units magically getting removed from the unit group?
Side notes:
- A computer player controls the units.
- Trigger code below:
P.S. I dropped all the units from the Waves (Data Table) into unit groups because I figured the computer was pulling them out of the waves and couldn't do that to unit groups. Neither is confirmed, it was just a guess.
0
So I have an ability that chains into missile launch as such:
Persistent > Search Area > Launch Missile
The problem is I cannot get the missile to launch from off of the ground. I have searched around and tried using Site Ops, or changing the periodic offset of the Persistent effect, but to no avail. The Site Op has no effect, and the Persistent's periodic offset can only change the launch offset on a 2D, xy plane.
Any insight into getting my missile to launch off the ground is appreciated.
Btw, changing the missile unit's height isn't a viable option as it messes up the mover big time.
SS's that may be of help:
nvm, fixed it. Just made like 10 changes at once. Needed to change, mover pathing, where the LM effect was launching from, unit height, and CP offset. Done.
0
You can use the AI command Build, or you can do an Issue Order -> Build Hatchery thing...
If you go with the AI command, the computer might not do it instantly (think time), but they will find an open area to place the hatchery automatically
If you go with Issue Order, it will be built instantly, but if there is something in the spot you want to build the Hatchery, it won't be built at all.
Then I guess for the nydus thing you can do something like any unit uses 'nydus transport'.. & if the unit type = drone... then do that stuff.
0
@MangledMind: Go
nah. You have to go into the text editor and change the name of the unit in there. The text links are the same, but you have to change them so it doesnt keep renaming itself... i think its F8 or something.
0
in the editor, hit 'open map.' Then go to Battle.net, log in, and DL one of those maps. Check out the triggers of a custom map you've played before to get a familiarity for triggers.
The basics:
The event Ahli is talking about is "Periodic Event"
Regions are basically area's of w/e size you define. They are a layer in the terrain editor (Press R after loading a map and the region editor will show).
Order units with "Issue Order."
0
the player leaves event only fires if the player loses, wins, or ties the game. It doesnt detect disconnects, alt-f4's, or menu->quits
you need a periodic timer or something, then use a pick each player in 'all players'.. if player status = left the game (or w/e), then do:
kill all units owned by player.
0
noooooooooooooooooooooooooooo
use the AI triggers :D
do uhm...
pick each spore crawler and do:
-Enable Script control for (picked unit)
then the same for spine crawlers
----but, the AI will only move the spine/spore crawlers if there is no creep under them... If you don't want preplaced s crawlers to move just put a creep tumor near them (or permanent creep).
0
Unit - Create ([Upgrade] count for player Triggering Player, counting Complete) Marine for player Triggering Player at [Point] using default facing (No Options)
with the event 'upgrade count changes' or w/e the upgrade event is
0
Ty Zelda
---------Here's an SS of the perfectly working script if anyone needed an idea of how to put this together.
This trigger orders the AI to build a Pylon near any unpowered Protoss structure as long as the computer is able (has nexus + probe).
http://img513.imageshack.us/img513/2171/1111jm.png
Oh but ignore the "initially off" thing & the Text Message things... those were for me.
0
I know there's the behavior 'Power User,' but I'm not sure how or if I could use that to help me detect a building out of range of a Pylon (unpowered).
Basically just need this so that if a computer player has any unpowered buildings I can make them build a pylon in that area to power them.
0
Good 1! I like that :)
0
You could throw a region around the whole defense area then issue them to move back & patrol the area on event "unit leaves region DEFENSE"
Also, for faster responses hit the IRC: http://webchat.freenode.net/?channels=SC2Mapster
0
Sorta minor, but it's annoying to look at...
Which settings do I need to change to make my triggers look like this:
instead of this:
at startup? (Or make the loops within triggers not auto-expand themselves when I look at a different trigger). The expandiness of all my folders and trigger loops is a headache to see when I go to edit things.