• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Need simple TD triggering help......

Status
Not open for further replies.
Level 8
Joined
Nov 5, 2005
Messages
342
I feel noobish for needing to ask, but i need help on how to get the enemies to walk to the goal in my TD without stopping.

So far, the enemies are on a lower height, so they have to take the set path to the goal.

This is what i have:
(first I have a trigger activating this one, but im pretty sure thats not causing a problem)

EVENT: EVERY 2.00 SECONDS OF THE GAME
ACTION:
CREATE 1 ____ FOR NEUTRAL HOSTILE AT (START NUMBER 1)
ORDER LAST CREATED UNIT TO MOVE TO (GOAL)
CREATE 1 ____ FOR NEUTRAL HOSTILE AT (START NUMBER 2)
ORDER LAST CREATED UNIT TO MOVE TO (GOAL)

But the problem is, when the enemies are attacked too much, or frozen/stunned, they stop andhad back to their starting spot.

Ive made sure to disable the "flee" thing, and im made sure the follow distance in Gameplay Constances is maximised.

thank you.
 
Level 2
Joined
Apr 20, 2006
Messages
22
If you mean stopping like in wintermaul, where they halt every few seconds is because there are more then 100 units for your computer player. Try deviding the creep waves in 2 players.

Code:
Actions
    Unit - Create 50 Footman for Player 11 (Dark Green) at (Center of (Playable map area)) facing Default building facing degrees
    Unit - Create 50 Footman for Player 12 (Brown) at (Center of (Playable map area)) facing Default building facing degrees

Like that.
 
Level 6
Joined
Feb 18, 2005
Messages
263
neutral hostile only try to return if their 'camp range'' in the GC is to small. set it to the max and they'll never try to return -> there simply is no map larger than that, so they consider themselves home all the time ^^

and for the laggin if there are too many units on the map.

i thought about a little, call it 'system, that takes care of that quite easily ^^

here the (semi-)trigger (as it would work for a team-td, you need to modify it a little to make it work for several spawn points. but that shouldn't be that hard):

variables:
integer array - stack_amount[]
unittype array - stack_type[]
integer - stack_length

integer - tmp

event:
- time - every 1 second
cond:
- integer - number of units (units in playable map, owned by <your creep owner/s>) < 100
- stack_length > 0
action:
- for Integer A = 1 to (100-number of units (units in playable map, owned by <your creep owner/s>) do
- - if - cond
- - - integer - stack_length > 0
- - then
- - - unit - create 1 stack_type[1] at <your spawnpoint>
- - - set stack_amount[1] = stack_amount[1] - 1
- - - if - cond
- - - - stack_amount[1] = 0
- - - then
- - - - for Integer B = 1 to (stack_length-1) do
- - - - - set stack_amount[Integer B] = stack_amount[Integer B + 1]
- - - - - set stack_amount[Integer B] = stack_type[Integer B + 1]
- - - - //it's purpose that this is done AFTER the 'for'
- - - - set stack_length = stack_length - 1
- - - else
- - - - do nothing
- - - endif
- - else
- - - do nothing
- - endif


event:
- <whatever you want to start a new wave>
cond:
action:
- set stack_length = stack_length + 1
- set stack_type[stack_length] = <the creaturetype for this wave>
- set stack_amount[stack_length] = <the number of creeps for this wave>



those two triggers together take care, that there never are more than 100 creeps on the map and that the ones you spawn above that are spawned, as soon as there is (lagfree) space for them on the map[/b]
 
Level 4
Joined
Dec 10, 2004
Messages
66
Raszul is right...
more or less...

if you are working with a lot (animated) dodads, it will leg erlier than 100 creeps.....

maybe you should limit it to 75.. or 50.

you only have to change 2 things in RZLs Trigger (orange highlighted):
event:
- time - every 1 second
cond:
- integer - number of units (units in playable map, owned by <your creep owner/s>) < 100
- stack_length > 0
action:
- for Integer A = 1 to (100-number of units (units in playable map, owned by <your creep owner/s>) do
 
Status
Not open for further replies.
Top