• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] movement system with no collision

Status
Not open for further replies.
Level 3
Joined
May 7, 2005
Messages
36
Now I've created a movement system using the arrow keys, much like whats been seen before, however if the unit gets too close to an object or doodad it turned away and trys to find a way around. A collision, how do I rid of this? I've tried making the unit have no collision to no success. I'd like the unit to keep trying to go into that object without straying path, just kinda running into it.
 
Try to detect with side the unit is coming from the object and them increase the move order per second based in how long the player press the arrow key.

Explain:
Unit find a block | |(block) O(unit)
You press left | |O

So the game detect you are coming from right, and send a order to unit move facing 50 offset left from block. And add +50 range each second the player still the left arrow key pressed, so if the block have 90range of side, if you press the arrow key for 2s the unit will eventually avoid the block and go to the other side.
 
Status
Not open for further replies.
Back
Top