• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Unit Pathing in Hero Defense

Status
Not open for further replies.
Level 2
Joined
Jan 29, 2009
Messages
21
I've been working on a Hero Defense game for the past few weeks, and recently decided to rework the terrain. The new terrain includes fairly complex paths for the periodically spawned units to follow to reach an opposing outpost, with several kinks and bends in the way.

My problem is that the units often A) Walk back to their original position once reaching their destination or B) Stray off the path

I have no idea how to fix A, and the only way to fix B I can think of is to make regions at each kink and bend and have them move to the next one once the enter one. The problem with this is it takes a TON of time and is a massive headache, and the movement still doesn't look fluid.

I was wondering if there was a way to make some units only able to walk on certain types of terrain, but not to limit others (My heroes need to be able to move freely). Or maybe to program/trigger in some sort of path command or something that wouldn't involve too much legwork (AKA not having to make tons of regions for one small segment of path...).

Any suggestions?
 
Level 3
Joined
Jul 13, 2008
Messages
38
Im really good with Triggers, but bad at knowing what to do unless i see the problem in front of me. For simple trouble shooting, this is something i do. I walk my way though the trigger trying to put myself in the comps frame of mind. Take it step by step and be nothing but a dummy doing what your told. 90% of the time this works for me to find the problem. Any further help i can give is only if i can see the triggers myself.
 
Level 4
Joined
May 4, 2008
Messages
113
There's an action that is something along the lines of "AI - Make (Last created unit) ignore all guard positions"

or something along those lines. That will prevent problem II.

For problem 1, I can't think of anything other than regions. I'm not actually sure there's another way, sorry :(.
 
Level 2
Joined
Jan 29, 2009
Messages
21
There's an action that is something along the lines of "AI - Make (Last created unit) ignore all guard positions"

or something along those lines. That will prevent problem II.

For problem 1, I can't think of anything other than regions. I'm not actually sure there's another way, sorry :(.

Thanks - the piece about ignored guard positions helped a lot.

And I guess it is as I fear, there is no alternate way...At least now I wont waste my time looking for one. Thanks again!
 
Status
Not open for further replies.
Top