PDA

View Full Version : TD Basics (based on Original Green TD)


alex_181993
1st November 2006, 11:22 AM
If you want to have leadboards to show the kills in you're maps you should follow this:
Event:Unit-A unit owned by Player (1,2,3...) (colour) Dies
Condition:(Owner of (Killing unit)) Equal to Player (1,2,3...) (colour)
Actions:Set variable:Set kill(colour) = (kills(colour) + 1)
Leadboard-Change the value for Player (1,2,3...) (colour) in LEADBOARD to kills(colour)
Now this is the ''heart'' of a tower defence the waves:
Event:Time-Counter expires
Condition:None
Action:Countdown Timer-Destroy TIMEWINDOW (if you want to)
Set variable:LVL = (LVL + 1)
Leadboard-Change the value for Player 10 (Light Blue) in LEADBOARD to LVL
Game-Display to (All players) the text:Wave # of #
If/Then/Else:If ((Player (1,2,3...) (colour) slot status)Equal to Is playing)Then do (Unit-Create # (Unit) for Player (1,2,3...) (colour) at center of region else Do Nothing
Wait (game Time):Wait 1.00 game-time seconds
(AND SO ON FOR ALL PLAYERS)
Trigger-Turn On:Turn Wavstart2<gen>
Trigger-Turn Off:(This trigger)
This will start the next trigger for the next wave:
Event:Time-Every 1.00 seconds game-time
Condition:(Number of units in (Units in (Playable map area) owned by Player (1,2,3...) (colour) )))
Less than or equal to 0
Event:Set variable:Set UNIT = Value
Run trigger:Run Waves2 <gen> (ignoring condition)
Trigger-Turn Off (This trigger)