Clan CBS

Go Back   Clan CBS Forums > Warcraft Modding Support > Tutorials > -> Tutorial Submissions <-

-> 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.

Reply
 
Thread Tools Display Modes
Old 12-14-2008, 06:43 AM   #1
Freaky94swe
Registered User
Clan Member
 
Join Date: Nov 2008
Posts: 101
Freaky94swe is a puddle of milk
Default TD Spawn, Life, Leaderboard with more

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)
You gota write the name of your Point variable in (udg_.......) dont remove the udg!

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)
Nothing special about this first one

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
This one is also Easy to understand its just the basics :> you can have how many lvls you want in here



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...
Life
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!
Movement
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)
Commands
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 ...
Level commands are easy to :>
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.
Freaky94swe is offline   Reply With Quote
Old 12-14-2008, 10:20 AM   #2
Battle_Lord_NL
The Imba Peon Lord
Clan Member [Shaman]
 
Battle_Lord_NL's Avatar
 
Join Date: Dec 2006
Location: Netherlands
Posts: 1,757
Battle_Lord_NL is a black spot on a cows hiveBattle_Lord_NL is a black spot on a cows hive
Default

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.
__________________


Go check out my WarCraft Cursors
Battle_Lord_NL is offline   Reply With Quote
Old 12-14-2008, 11:21 AM   #3
Sipondo
~Mister
Clan Member [Grunt]
 
Sipondo's Avatar
 
Join Date: Oct 2007
Location: on earth
Posts: 607
Sipondo is coco
Default

Tooo.... muuuuch... leaaaks.....

And maybe add some pictures.
__________________

Quote:
"Some have theorized that an Orc resembles a cross between a pig and a human,
because of the fact that 'Orc' rhymes with 'pork'. Of course in actuality,
Orc is 'demon' in German, so the other theory is automatically scrapped for being scientifically proven to be composed entirely of dumbass matter."


"Mass Flying Machines This strategy was very popular for a time until someone realized that Flying Machines have no health and die instantly when attacked by peons."

"Around 5,998,341,345 people are not playing WoW at this moment."

"Ghost - Now capable of using their rifles to make a 1-shot kill. However, this doesn't work on buildings, as their heads are difficult to find."


Warcraft 3? Don't you mean WoW, lolol?!?
...No, I mean Warcraft 3.

“Ki-Ki-Ki!”
~ Zerg Zergling on StarCraft
“Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki-Ki!”
~ Zerg Rush on StarCraft
“Starcraft 2 the sequel to Starcraft ”
~ Captain Obvious on Starcraft 2
“Kekeke! ”
~ Zergling #1024 on Starcaft 2

Sipondo is offline   Reply With Quote
Old 12-14-2008, 11:43 AM   #4
Skargoth
Where's my neg rep?! : (
Clan Member [Grunt]
 
Skargoth's Avatar
 
Join Date: Mar 2008
Posts: 432
Skargoth is a puddle of milk
Default

The efficiency of the triggers is way too low ....
__________________

I'm a Laosh'Ra

Madness will prevail ... eventually ....
Skargoth is offline   Reply With Quote
Old 12-14-2008, 01:50 PM   #5
dan1mal
teh clan reviver
Clan Member
 
dan1mal's Avatar
 
Join Date: Mar 2008
Location: Netherlands!!
Posts: 394
dan1mal is warm milk
Default

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
__________________
Quote:
Originally Posted by Sipondo View Post
Danimal is freaking out again.
QFT

papa roach: scars
dan1mal is offline   Reply With Quote
Old 12-14-2008, 03:13 PM   #6
Freaky94swe
Registered User
Clan Member
 
Join Date: Nov 2008
Posts: 101
Freaky94swe is a puddle of milk
Default

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.
Freaky94swe is offline   Reply With Quote
Old 02-19-2010, 01:30 AM   #7
Dfx_iis_pro
Biggest Noob in CBS NOW
Clan Member
 
Dfx_iis_pro's Avatar
 
Join Date: May 2009
Posts: 52
Dfx_iis_pro is a puddle of milk
Default

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.
__________________
Currently Working on:
Training


Dfx_iis_pro is offline   Reply With Quote
Old 02-19-2010, 03:15 PM   #8
Skargoth
Where's my neg rep?! : (
Clan Member [Grunt]
 
Skargoth's Avatar
 
Join Date: Mar 2008
Posts: 432
Skargoth is a puddle of milk
Default

Quote:
Originally Posted by Dfx_iis_pro View Post
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.
Wtf? Are you serious? You can't see what the variable type is?

Stop mapping ... naoOoW!

Point_of_spawn = Point
LVL = Integer
killsred = Integer
killsblue = Integer
Chances = Integer
__________________

I'm a Laosh'Ra

Madness will prevail ... eventually ....
Skargoth is offline   Reply With Quote
Old 02-20-2010, 05:50 PM   #9
Dfx_iis_pro
Biggest Noob in CBS NOW
Clan Member
 
Dfx_iis_pro's Avatar
 
Join Date: May 2009
Posts: 52
Dfx_iis_pro is a puddle of milk
Default

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:
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
What have i done wrong?
__________________
Currently Working on:
Training


Dfx_iis_pro is offline   Reply With Quote
Old 02-20-2010, 06:28 PM   #10
Skargoth
Where's my neg rep?! : (
Clan Member [Grunt]
 
Skargoth's Avatar
 
Join Date: Mar 2008
Posts: 432
Skargoth is a puddle of milk
Default

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)
__________________

I'm a Laosh'Ra

Madness will prevail ... eventually ....
Skargoth is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT. The time now is 08:11 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Epicwar Hive Workshop War3 Workshop Wc3 Campaigns Elemental TD