I've been working on a map for a while using the melee units and stuff. Recently I've came across a problem that has bothered me for a couple of hours or so.
Its like this. I have code that basically sets up tech buildings for unit spawning later, using triggers. This is all well and good when I go to use the exact same code (with small modification) to make a roach warren, baneling nest, and hydralisk den using a drone and orders. But for some reason, the actual building doesn't delay the actual setup of the Tech Buildings array, hence spawning the brood lords without the actual building being complete. I have tried using progress bars, training ques and everything, but I just cant seem to detect the progress of the Greater spire. The actual building does start to morph, it only doesn't pickup and progress.
Thanks in advance!
Roach Warren: (works fine)
General-If(Conditions)thendo(Actions)elsedo(Actions)IfTurns>=15Events[3]==falseThenUI-Createatipwithtitle(Formattip"Zerg Units"asNormalTip),description"You have progressed far enough in t...",alerttext"Zerg Units"andiconAssets\Textures\btn-tips-research.ddsfor(Allplayers)Variable-SetEvents[3]=truePlayer-Modifyplayer15Minerals:Add1000Player-Modifyplayer15Vespene:Add1000TechTree-Disabletechtreerequirementsforplayer15Unit-Create1Droneforplayer15atRoachWarrenusingdefaultfacing(NoOptions)Unit-Order(Lastcreatedunit)to(Drone-MutateintoRoachWarrentargetingRoachWarren)(ReplaceExistingOrders)General-Wait0.25GameTimesecondsUnitGroup-Pickeachunitin(RoachWarrenunitsin(Entiremap)ownedbyplayer15matchingExcluded:Missile,Dead,Hidden,withatmostAnyAmount)anddo(Actions)ActionsVariable-SetRoachWarren=(Pickedunit)UI-Display"Uh Oh, Kerrigan Has Ordered A Roach..."for(Allplayers)toSubtitleareaPing-PingtheminimapatRoachWarrenfor(Allplayers)over5.0seconds,usingthecolor(100%,0%,0%)UI-Displaybossbar2withtitle"Roach Warren Completion",portraitAssets\Textures\btn-building-zerg-roachwarren.ddsandmaximumvalue100for(Allplayers)UI-Setbossbar2maximumvalueto100(Dorefreshthebossbar)UI-Movebossbar2toTopofscreenwithoffset(0,150)UI-Setbossbar2racetoZerg(Dorefreshthebossbar)UI-Showbossbar2General-While(Conditions)aretrue,do(Actions)Conditions(RoachWarrenisunderconstruction)==trueActionsUI-Setbossbar2currentvalueto(Integer((ProgressofRoachWarrenslot1)))(Dorefreshthebossbar)General-Wait0.125GameTimesecondsGeneral-Waitfor(Conditions),checkingevery1.0GameTimesecondsConditionsOrConditions(RoachWarrenisalive)==falseAndConditions(RoachWarrenisalive)==true(RoachWarrenisunderconstruction)==falseUI-Hidebossbar2Variable-SetUnitIncrement[2]=3.0General-If(Conditions)thendo(Actions)elsedo(Actions)If(RoachWarrenisalive)==true(RoachWarrenisunderconstruction)==falseThenVariable-SetTechBuildings[1]=trueElseElse
Brood Lords: (Somewhat works, but doesn't delay the brood lords with the actual building)
General-If(Conditions)thendo(Actions)elsedo(Actions)IfTurns>=55Events[11]==falseTechBuildings[4]==trueThenVariable-SetEvents[11]=trueTechTree-Disabletechtreerequirementsforplayer15Player-Modifyplayer15Minerals:Add1000Player-Modifyplayer15Vespene:Add1000UnitGroup-Pickeachunitin(Spireunitsin(Entiremap)ownedbyplayer15matchingExcluded:Missile,Dead,Hidden,withatmostAnyAmount)anddo(Actions)ActionsVariable-SetGreaterSpire=(Pickedunit)General-Wait0.25GameTimesecondsUnit-OrderGreaterSpireto(Spire-MutateintoGreaterSpire)(ReplaceExistingOrders)General-Wait1.0GameTimesecondsUI-Display"Uh Oh, Kerrigan congratulates you o..."for(Allplayers)toSubtitleareaPing-PingtheminimapatSpirefor(Allplayers)over5.0seconds,usingthecolor(100%,0%,0%)UI-Displaybossbar6withtitle"Greater Spire Completion",portraitAssets\Textures\btn-building-zerg-greaterspire.ddsandmaximumvalue100for(Allplayers)UI-Setbossbar6maximumvalueto100(Dorefreshthebossbar)UI-Movebossbar6toTopofscreenwithoffset(0,150)UI-Setbossbar6racetoZerg(Dorefreshthebossbar)UI-Showbossbar6General-While(Conditions)aretrue,do(Actions)Conditions(GreaterSpireisunderconstruction)==trueActionsUI-Setbossbar6currentvalueto(Integer((ProgressofGreaterSpireslot1)))(Dorefreshthebossbar)General-Wait0.125GameTimesecondsGeneral-Waitfor(Conditions),checkingevery1.0GameTimesecondsConditionsOrConditions(GreaterSpireisalive)==falseAndConditions(GreaterSpireisalive)==true(GreaterSpireisunderconstruction)==falseUI-Hidebossbar6Variable-SetUnitIncrement[5]=6.0General-If(Conditions)thendo(Actions)elsedo(Actions)If(GreaterSpireisalive)==true(GreaterSpireisunderconstruction)==falseThenVariable-SetTechBuildings[5]=trueElseElse
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hey guys,
I've been working on a map for a while using the melee units and stuff. Recently I've came across a problem that has bothered me for a couple of hours or so.
Its like this. I have code that basically sets up tech buildings for unit spawning later, using triggers. This is all well and good when I go to use the exact same code (with small modification) to make a roach warren, baneling nest, and hydralisk den using a drone and orders. But for some reason, the actual building doesn't delay the actual setup of the Tech Buildings array, hence spawning the brood lords without the actual building being complete. I have tried using progress bars, training ques and everything, but I just cant seem to detect the progress of the Greater spire. The actual building does start to morph, it only doesn't pickup and progress.
Thanks in advance!
Roach Warren: (works fine)
Brood Lords: (Somewhat works, but doesn't delay the brood lords with the actual building)