|
|||||||
| -> Tutorial Submissions <- Submit your tutorials here, if they get approved, they will get moved to one of the above sections. Note: Only CBS members are allowed to post tutorials. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Registered User
Clan Member
Join Date: Nov 2008
Posts: 101
![]() |
EDIT; Removed some leaks and redid the spawn trigger and the movment triggers
Im making this Tutorial becuse im bored and tired and dont got anything to do and cant fall to sleep :> Remember i had been aweken for 24+ hours when i did write this :> If you think i should add, remove, edit sumthing just tell me Things needed Warcraft3 TFT Warcraft3 TFT Worldeditor 1. Spawning system 2. Leaderboard 3. Life 4. Movement (For units (Evil units) ) 5. Commands (Kick and Show when air lvl's are) Spawning system Create a Rect//region at the point you want to spawn the enemies. You will need 2 triggers for this one One that enables the first Set LVL = (LVL + 1) You need to create a variable named LVL (its an integer) (Dosent matter what name it got) You need to create a variable Named point_of_spawn (its an point)(Dosent matter what name it got) IMPORTANT the trigger Code:
Custom script: call RemoveLocation (udg_Point_of_spawn) Trigger Code:
Start Waves
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Countdown Timer - Create a timer window for (Last started timer) with title Waves start in
Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in 20.00 seconds
Countdown Timer - Show (Last created timer window)
Wait 20.00 seconds
Countdown Timer - Destroy (Last created timer window)
Set LVL = (LVL + 1)
Made this spawning triggers so you wont need to keep track of maybe 50 diffrent triggers My self i think its easyer to use 50 diffrent triggers but it makes the lagg becomes bigger the more evens you use (RECOMENDED to use this big one :>) Code:
Waves1
Events
Time - Every 10.00 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
LVL Equal to 1
Then - Actions
Set Point_of_spawn = (Center of Region 000 <gen>)
Unit - Create 10 Peasant for Player 12 (Brown) at Point_of_spawn facing Default building facing degrees
Leaderboard - Change the value for Player 10 (Light Blue) in LEADERBOARD to LVL
Game - Display to (All players) the text: Wave 1 of ??
Custom script: call RemoveLocation (udg_Point_of_spawn)
Set LVL = (LVL + 1)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
LVL Equal to 2
Then - Actions
Set Point_of_spawn = (Center of Region 000 <gen>)
Unit - Create 10 Footman for Player 12 (Brown) at Point_of_spawn facing Default building facing degrees
Leaderboard - Change the value for Player 10 (Light Blue) in LEADERBOARD to LVL
Game - Display to (All players) the text: Wave 2 of ??
Custom script: call RemoveLocation (udg_Point_of_spawn)
Set LVL = (LVL + 1)
Else - Actions
Leaderboard A simple leaderboard (P1 and P2 kills Level and Chances) Triggers Code:
Make
Events
Time - Elapsed game time is 2.00 seconds
Conditions
Actions
Leaderboard - Create a leaderboard for (All players) titled TD Kills
Set LEADERBOARD = (Last created leaderboard)
Leaderboard - Add Player 10 (Light Blue) to LEADERBOARD with label Current LVL >>> and value LVL
If ((Player 1 (Red) slot status) Equal to Is playing) then do (Leaderboard - Add Player 1 (Red) to LEADERBOARD with label (Name of Player 1 (Red)) and value killsred) else do (Do nothing)
If ((Player 2 (Blue) slot status) Equal to Is playing) then do (Leaderboard - Add Player 2 (Blue) to LEADERBOARD with label (Name of Player 2 (Blue)) and value killsblue) else do (Do nothing)
Leaderboard - Add Player 12 (Brown) to LEADERBOARD with label CHANCES>>> and value Chances
Code:
Kills Red
Events
Unit - A unit owned by Player 12 (Brown) Dies
Conditions
(Owner of (Killing unit)) Equal to Player 1 (Red)
Actions
Set killsred = (killsred + 1)
Leaderboard - Change the value for Player 1 (Red) in LEADERBOARD to killsred
Code:
Kills Blue
Events
Unit - A unit owned by Player 12 (Brown) Dies
Conditions
(Owner of (Killing unit)) Equal to Player 2 (Blue)
Actions
Set killsblue = (killsblue + 1)
Leaderboard - Change the value for Player 2 (Blue) in LEADERBOARD to killsblue
Code:
Quit Red
Events
Player - Player 1 (Red) leaves the game
Conditions
Actions
Leaderboard - Change the label for Player 1 (Red) in LEADERBOARD to Quit 'cause they su...
Code:
Quit Blue
Events
Player - Player 2 (Blue) leaves the game
Conditions
Actions
Leaderboard - Change the label for Player 2 (Blue) in LEADERBOARD to Quit 'cause they su...
These triggers is needed for the life in leaderboard to work Code:
Set life
Events
Time - Elapsed game time is 0.10 seconds
Conditions
Actions
Set Chances = 20
Code:
Life
Events
Unit - A unit comes within 100.00 of Dummy 0001 <gen>
Conditions
(Owner of (Triggering unit)) Equal to Player 12 (Brown)
Actions
Unit - Remove (Triggering unit) from the game
Set Chances = (Chances - 1)
Leaderboard - Change the value for Player 12 (Brown) in LEADERBOARD to Chances
Code:
Die
Events
Time - Every 1.00 seconds of game time
Conditions
Chances Less than or equal to 0
Actions
Game - Defeat Player 1 (Red) with the message: Defeat!
Game - Defeat Player 2 (Blue) with the message: Defeat!
Its a simple movment trigger Code:
Movement Region000 to Region007
Events
Unit - A unit enters Region 000 <gen>
Conditions
(Owner of (Triggering unit)) Equal to Player 12 (Brown)
Actions
Set Movement_1 = (Center of Region 007 <gen>)
Unit - Order (Triggering unit) to Move To Movement_1
Custom script: call RemoveLocation (udg_Movement_1)
I will show you how to do Kick commands // level commends (to show when immune, air and all that is) Kick triggers are real easy :> Code:
Kick 02
Events
Player - Player 1 (Red) types a chat message containing -kick blue as An exact match
Conditions
Actions
Game - Defeat Player 2 (Blue) with the message: Player 2 have been ...
Code:
Air levels
Events
Player - Player 1 (Red) types a chat message containing -Air as An exact match
Player - Player 2 (Blue) types a chat message containing -Air as An exact match
Conditions
Actions
Game - Display to (All players) the text: Air levels are; 5, ...
__________________
Only God Can Judge Me 90% of teens have experimented with drugs or alchohol. Put this in your signature if you don't really care and like blowjobs.
Last edited by Freaky94swe; 12-14-2008 at 04:37 PM. |
|
|
|
|
|
#2 |
|
The Imba Peon Lord
Clan Member [Shaman]
Join Date: Dec 2006
Location: Netherlands
Posts: 1,757
![]() ![]() |
This is more like a system. For a tutorial you should add more explanation.
Plus there are quite a lot of memory leaks in your triggers. You could either fix them in your triggers, or at least add a note that they are there, so someone who would want to use this, could look for a memory leak removal tutorial to keep his/her map smooth and clean. |
|
|
|
|
|
#3 | ||||
|
~Mister
Clan Member [Grunt]
Join Date: Oct 2007
Location: on earth
Posts: 607
![]() |
Tooo.... muuuuch... leaaaks.....
And maybe add some pictures.
__________________
Quote:
|
||||
|
|
|
|
|
#5 |
|
teh clan reviver
Clan Member
Join Date: Mar 2008
Location: Netherlands!!
Posts: 394
![]() |
must resist urge to purge leaks.. LEAKSS
and u can just put the entire spawning system in 2 triggers one with lotsa if then else for spawns and one to turn it on of. so kinda useless :S |
|
|
|
|
|
#6 |
|
Registered User
Clan Member
Join Date: Nov 2008
Posts: 101
![]() |
Sorry for all the leaks but i had been up for 24+ hours so couldent concentrate, gonna change it soon enough
Edit removed someleaks made the spawn into 2 trigger
__________________
Only God Can Judge Me 90% of teens have experimented with drugs or alchohol. Put this in your signature if you don't really care and like blowjobs.
Last edited by Freaky94swe; 12-16-2008 at 05:46 PM. |
|
|
|
|
|
#7 |
|
Biggest Noob in CBS NOW
Clan Member
Join Date: May 2009
Posts: 52
![]() |
Well, when i done the trigger according to what you have done here nothing worked.... This need a little explanation on the variables, for example the leader board variables, should they be integer or anything else, cos im a noob at this map making business. Oh and i can see that this post is damn old but could be still more explained xDD.
|
|
|
|
|
|
#8 | |
|
Where's my neg rep?! : (
Clan Member [Grunt]
Join Date: Mar 2008
Posts: 432
![]() |
Quote:
Stop mapping ... naoOoW! Point_of_spawn = Point LVL = Integer killsred = Integer killsblue = Integer Chances = Integer |
|
|
|
|
|
|
#9 | |
|
Biggest Noob in CBS NOW
Clan Member
Join Date: May 2009
Posts: 52
![]() |
Lawl,
Well dude give me a break im a nub at mappin, still practicing, if u see my map AOI... that will show that im a nub at mappin.. xDD ------------------------ Okay i done like every thing ther....appart from leader board...wont spawn anything. Quote:
|
|
|
|
|
|
|
#10 |
|
Where's my neg rep?! : (
Clan Member [Grunt]
Join Date: Mar 2008
Posts: 432
![]() |
Code:
Trigger 2 Events Time - Every 40.00 seconds of game time Conditions Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions Level Equal to 1 Then - Actions Set Point_of_spawn = (Center of Spawn <gen>) Game - Display to (All players) the text: Wave 1 of 20 Unit - Create 1 Footman for Player 12 (Brown) at (Center of (Playable map area)) facing Default building facing degrees Custom script: call RemoveLocation (udg_Point_of_spawn) Set Level = (Level + 1) Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions Level Equal to 2 Then - Actions Set Point_of_spawn = (Center of Spawn <gen>) Unit - Create 1 Footman for Player 12 (Brown) at (Center of (Playable map area)) facing Default building facing degrees Game - Display to (All players) the text: Wave 2 of 20 Custom script: call RemoveLocation (udg_Point_of_spawn) Set Level = (Level + 1) Else - Actions Apart from that your trigger just sucks pretty much. "Set Point_of_spawn = (Center of Spawn <gen>)" should be added to the initialization trigger. It doesn't make any sense to set the point and then remove it afterwards if it is always the same point. Your whole if/then/else structure is completely useless. Use an array to save the unit-type for each level. It should look like this: Code:
Intialization Events Map intialization Conditions Actions Set Point_of_spawn = (Center of Spawn <gen>) Set Unittype[1] = Footman Set Unittype[2] = Footman Spawn Events Time - Every 40.00 seconds of game time Conditions Actions Unit - Create 1 Unittype[Level] for Player 12 (Brown) at Point_of_spawn facing Default building facing degrees Set Level = (Level + 1) |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Fight for Life | Av3n | Clan Projects | 4 | 02-02-2007 11:39 PM |
| Lives in Leaderboard (TD) | mikke95 | Beginner Tutorials | 10 | 01-08-2007 07:56 PM |
| Leaderboard time | Nudl9 | First Aid: Map Making Help | 6 | 12-19-2006 01:49 PM |
| Leaderboard like in DotA ?! Someone know how to ?! | lilanime | First Aid: Map Making Help | 15 | 11-06-2006 09:13 PM |
| What is....the life of a star! | r0khan | Off Topic | 5 | 08-21-2006 11:33 AM |