Page 1 of 2

Need help on first TD

Posted: Fri Aug 15, 2008 3:31 am
by Torin
its going great execpt for three things idk how to do (sry if they seem noobish) first; When a wave of creeps spawn to and begin to run the maze they run jumbled together in a pack and they stop moving every now and then because they cant cut turns all together... how can i make them run single-file like in most TDs? Second: would i use an integer varible for a leader board showing player name/ # of kills and how could i do that. and Third: How do i set the teams lives and how do i make it to where if a creep leaks through that a life is lost? thankx ^^ sry if it seems alot (eenans prolley laughin rite now)

Re: Need help on first TD

Posted: Fri Aug 15, 2008 11:36 am
by 3ICE
Torin wrote:how can i make them run single-file like in most TDs?
Spawn one at a time and wait 0.2 or 0.5 sec between two spawns.t_tri Periodic spawn trigger by 3ICE
.... t_eve Events
........ t_pla Player - Player 12 (Brown)'s Food used becomes Equal to 0.00
.... t_co Conditions
.... t_act Actions
........ t_uni Unit - Create 1 Footman for Player 12 (Brown) at SpawnPoint facing 0.00 degrees
........ t_wai Wait 0.20 seconds
........ t_uni Unit - Create 1 Footman for Player 12 (Brown) at SpawnPoint facing 0.00 degrees
........ t_wai Wait 0.20 seconds
........ t_uni Unit - Create 1 Footman for Player 12 (Brown) at SpawnPoint facing 0.00 degrees
........ t_wai Wait 0.20 seconds
........ t_uni Unit - Create 1 Footman for Player 12 (Brown) at SpawnPoint facing 0.00 degrees
........ t_wai Wait 0.20 seconds
........ t_uni Unit - Create 1 Footman for Player 12 (Brown) at SpawnPoint facing 0.00 degrees
........ t_wai Wait 0.20 seconds
........ t_uni Unit - Create 1 Footman for Player 12 (Brown) at SpawnPoint facing 0.00 degrees
........ t_wai Wait 0.20 seconds

Torin wrote:would i use an integer varible for a leader board showing player name/ # of kills and how could i do that.
Yes, the best practice is using an integer array, lets call it "Kills"t_tri Count Kills trigger by 3ICE
.... t_eve Events
........ t_uni Unit - A unit owned by Player 12 (Brown) Dies
.... t_co Conditions
.... t_act Actions
........ t_set Set Kills[(Player number of (Owner of (Killing unit)))] = (Kills[(Player number of (Owner of (Killing unit)))] + 1)
........ t_lea Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to Kills[(Player number of (Owner of (Killing unit)))]

I guess you already know how to create the leaderboard and add the players to it.
Torin wrote:How do i set the teams lives and how do i make it to where if a creep leaks through that a life is lost?
t_tri TD leak trigger by 3ICE
.... t_eve Events
........ t_uni Unit - A unit enters LeakRegion <gen>
.... t_co Conditions
........ t_if (Owner of (Triggering unit)) Equal to Player 12 (Brown)
.... t_act Actions
........ t_set Set Lives = (Lives - 1)
........ t_if If (All Conditions are True) then do (Then Actions) else do (Else Actions)
............ t_co If - Conditions
................ t_if Lives Equal to 0
............ t_act Then - Actions
................ t_pgr Player Group - Pick every player in (All players) and do (Game - Defeat (Picked player) with the message: gg)
............ t_act Else - Actions


--3ICE

Re: Need help on first TD

Posted: Fri Aug 15, 2008 12:02 pm
by Torin
Awsome thanx 3ICE ^_^

Re: Need help on first TD

Posted: Fri Aug 15, 2008 12:35 pm
by 3ICE
No problem.

Leaving this thread open, should you have more questions, post here.

--3ICE

Re: Need help on first TD

Posted: Fri Aug 15, 2008 1:33 pm
by Torin
I do have a few problems though :( I cant get my leader board to show up (which i think i can fix on my own)and when i try to set the life loss triggers it wants a value i dont know what to put at.. for example if i wanted the trigger to start with 25 lives (which it does and then i go through the event and conditions but at the actions.....
t_eve
....... t_uni Unit - a unit enters Leakregion <gen>
t_co
........ t_if (Owner of (Killling unit)) Equal to Player 10 (light blue)
t_act
........ Set Lives[value] = Index- 1 how can i make it to where there is no Index there and its just- 1? thankx in advance btw: the color coded Set Lives[index] = value- 1 is in a window because since i cannot specify a value for [index] i cant press ok If you didnt understand my question here is a screen shot of my problem Image

Re: Need help on first TD

Posted: Fri Aug 15, 2008 2:23 pm
by 3ICE
I don't know English good enough to be able to explain that. Basically just click OK and it'll work. If you still can't get it to work, I'll capture a video of me doing it...

EDIT:t_lea Leaderboard - Show

Re: Need help on first TD

Posted: Fri Aug 15, 2008 2:28 pm
by Torin
i cant click okay unless i specify a value for the red.... should it be zero? because it wont let me just make it -1....i think you'll have to make a vid or sumthing... im running a map test now ill repost if it works if i dont repost i still need help

Re: Need help on first TD

Posted: Fri Aug 15, 2008 4:06 pm
by 3ICE
Here you go:
Image
If this GIF looks weird, let me know (Plays fine on my computer in every browser except I.View32)

--3ICE

EDIT: I accidentally named the variable "Lives". It should have been "Kills". Not a big problem though, this video is for explaining how to work with Arithmetic Functions, not about creating a trigger.

--3ICE

Re: Need help on first TD

Posted: Sun Aug 17, 2008 12:57 pm
by Torin
oH! i was in arithmetic not player number. can u not delete this thread becasuse i wont be near the computer with my war3 map for a while thanks^^

Re: Need help on first TD

Posted: Sun Aug 17, 2008 3:48 pm
by 3ICE
Sure. I never delete anything :) to preserve knowledge.
Other users with the same problem as yours can find this thread via search and they'll be good to go.
We are on Google.