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

[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.
 
Level 12
Joined
Mar 23, 2008
Messages
942
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.
Top