Staredit Network

Staredit Network -> UMS Assistance -> LEvels
Report, edit, etc...Posted by r[s]t on 2005-07-11 at 13:11:03
Whats teh most effiecent and fastest way to make levels in like defense games where all the units die and next level begins?
Report, edit, etc...Posted by UED77 on 2005-07-11 at 13:35:03
The creation of the units should be controlled by Death Counters.
Increment the Death Counter by one if no units controlled by the computer player are present in the playing field.


Trigger
Description:
Game Start
Conditions:
¤ BRING: Player brings ≥1 civ to loc(GameStart)
Actions:
¤ SET DEATHS: Set Player deaths of Data Disc to 1




Trigger
Description:
Level 1: Overlord
Conditions:
¤ DEATHS: Player has suffered the deaths of exactly 1 Data Disc
Actions:
¤ Create Overlords.



Trigger
Description:
Checking for Unitsd
Conditions:
¤ BRING: Computer player brings 0 units to loc(Playfield)
Actions:
¤ Display Level Finish text to user
¤ Add score or bonus resources accordingly
¤ Wait
¤ SET DEATHS: Add 1 to Player deaths of Data Disc)



Trigger
Description:
Level 2: Guardian
Conditions:
¤ DEATHS: Player has suffered the deaths of exactly 2 Data Disc
Actions:
¤ Create Guardians.


And so on...

UED77
Report, edit, etc...Posted by Subrosian on 2005-07-11 at 14:17:08
It's better to use the Gas counter so players can keep track of the level more easily.
Report, edit, etc...Posted by slayer766 on 2005-07-11 at 14:30:18
Yeah the gas counter would be the best way to go. biggrin.gif I think anyways.
Report, edit, etc...Posted by r[s]t on 2005-07-11 at 15:04:08
death counters... . okay. i was thinking about switches, w/e
thanks
Report, edit, etc...Posted by ShadowBrood on 2005-07-11 at 15:13:05
Switches are slow and work funny when they overlap (from my experiences anyway).

Death counters are the way to go for damn near everything.
Report, edit, etc...Posted by r[s]t on 2005-07-11 at 16:41:30
okay wielrd problem


Using gas switches these are my trigs (example)

Accumulate(All Players, Exactly, 1, Gas);

CreateUnit(5, Ultralisk, Enemy-spawn, P8);
Comment("lvl 1");


Bring(P8, Exactly, 0, Men, Anywhere);

SetResources(All Players, Add, 1, Gas);
DisplayText("Level Finsihed", 4);
Wait(10000);
Comment("detect");


Bring(Force1, AtLeast, 1, Hydralisk, Player-Spawn);

SetResources(All Players, Add, 1, Gas);
Comment("game start");









the untis arent spawning and the player gets teh gas! wth
Report, edit, etc...Posted by UED77 on 2005-07-11 at 17:07:35
You are using "All Players" for the gas counter. That is a very bad choice. When you add 1 gas to "All players", you are adding 1 gas to each player.
When the trigger checks for All Players having 1 gas, it fails to execute, because "All Players" actually has 8 gas, as each player from P1 to P8 has one.

Use a numbered player instead.

UED77
Report, edit, etc...Posted by DT_Battlekruser on 2005-07-11 at 18:30:15
Death counts are much better, never use something that can be used for a leaderboard for a value that you don't want up there. You don't need a "Current Level" leaderboard so use death counts. UED's original method is the correct answer.
Report, edit, etc...Posted by r[s]t on 2005-07-11 at 19:20:33
okay. in the trigger that detects if thers enemies left am i suppose to preserve it? its not repeating.

and also in lvl 1 u start with 1 gas. but in lvl 2 u get 3. wtf
and the display message isnt displying either

Bring(P8, Exactly, 0, Men, Anywhere);

Wait(1500);
SetResources(All Players, Add, 1, Gas);
DisplayText("Level Finsihed", 4);
KillUnitAt(All, Hydralisk, Anywhere, All Players);
Wait(5000);
Comment("detect");
Report, edit, etc...Posted by HeRtZ on 2005-07-11 at 20:02:59
WOW r[s]t stop posting noob questions. Before posting read THE TUTORIAL AREA!! goodness
Report, edit, etc...Posted by UED77 on 2005-07-11 at 20:03:41
Quasi-StarForge format, don't be confused by SCMDraft2-style separators.

//--------------------------------------------//

If {
Bring(P1,AtLeast,1,Civilian,L-StartGame);
}
Then {
SetDeaths(P8,SetTo,1,Data Disc);
}

//--------------------------------------------//

If {
Deaths(P8,Exactly,1,Data Disc);
}
Then {
CreateUnit(20,Overlord,L-Spawn,P8);
SetSwitch(Sw-RoundInProgress,Set);
}

//--------------------------------------------//

If {
Bring(P8,Exactly,0,AnyUnit,L-PlayField);
Switch(Sw-GameInProgress,Set);
}
Then {
SetSwitch(Sw-RoundInProgress,Clear);
DisplayText("Round completed", 4);
SetDeaths(P8,Add,1,Data Disc);
PreserveTrigger();
}

//--------------------------------------------//

If {
Deaths(P8,Exactly,2,Data Disc);
}
Then {
CreateUnit(20,Devourer,L-Spawn,P8);
SetSwitch(Sw-RoundInProgress,Set);
}

//--------------------------------------------//

These should work now. The switch was included to provide control flow, now that the third trigger is preserved. Sorry about missing that earlier.

As for text not displaying, make sure the trigger with the DisplayText(); in it is run for a human player.

UED77
Report, edit, etc...Posted by r[s]t on 2005-07-11 at 21:00:32
no problems right now

Report, edit, etc...Posted by Heimdal on 2005-07-12 at 22:00:52
QUOTE(r[s]t @ Jul 11 2005, 02:04 PM)
death counters... . okay.  i was thinking about switches, w/e
thanks
[right][snapback]260238[/snapback][/right]
Just a design note here:

Use switches for things that can only have two possible values and don't necessarily depend on other values (things that might happen out of order). Use death counters for things that have several possible numeric values, like levels.

For example, if you're making an RPG and there's a key the players need to find before they can unlock the door, you should make "Found key" a switch. Set it to true when they've found it.
Report, edit, etc...Posted by noisuk on 2005-07-12 at 23:54:20
I for some reason never used deathcounters. I use either score or gas/minerals wink.gif
Report, edit, etc...Posted by Heimdal on 2005-07-13 at 21:46:18
For values that you want players to see, use gas, minerals, or score (and put it on the leaderboard). For things that the players shouldn't or don't need to see, use death counters. If you have Starforge or SCMDraft you can use unused units in your death counters so they don't conflict with anything else. You can also rename the unit you're using so you don't forget what you're using it for, which is something you can't do with score/gas/minerals.
Report, edit, etc...Posted by (U)Bolt_Head on 2005-07-14 at 01:16:36
Deathcounters are also usefull to create a "current player switch"
Next Page (1)