• 🏆 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!

[vJass] Programming Movement

Status
Not open for further replies.
Level 3
Joined
Jun 14, 2007
Messages
56
==============================================================
Helloooo again
==============================================================

==============================================================
My goal is to programme a unit to always have the "homing" style movement similar to hungry hungry fellhounds in this map.
- What this movement style is, is a unit that looks like its moving (with a sped up walk animation triggered), but actually is "sliding" with triggers, and homes in on a target. it has the potential to miss and slide past the obect, unlike normal warcraft pathfinding. Its based on basic things such as X Velocity, Y Velocity, and acceleration always towards the object. Because acceleration is only a change in speed, the speed isnt automatically set towards the target location (be it a unit's location or an area) but is changed with the acceleration over time and thus it can slide past etc. Imagine a constant homing missile that constantly changes destinations Just like warlocks homing spell

==============================================================
I know how to make the chasing unit move like that, the difference is that in this map the pathing is not going to be direct (due to obstacles etc) and thus I cannot do the linear path like they do in hungry fellhounds for most destinations
==============================================================

==============================================================
The chasing unit does not have any movement speed and is programmed moved manually with SetUnitPosition based on a bunch of things. The idea is that it is searching for players across the map which has houses and obstacles etc, there wont be a linear path to get to destinations. The reason why i do the manual homing type move speed is to have dodging predators as a possibility, and have survival more skill based.
==============================================================

==============================================================
Options i have considered:
- Making a pilot dummy unit that moves towards the destination, and only moves if it is within range of the chasing unit. the target for the chasing unit will constantly be the pilot, this way it will follow the normal pathfinding of an issued order rather than a manual movement thing

- Give the chasing unit a movement speed, periodically issue the order to find which direction normal pathfinding would take (avoiding obstacles etc), and periodically making the unit move forwards (towards facing angle) by x distance <--- not sure what to do to make this "slide" past / miss etc

- Maybe this manual movement should only activate when close to the chased units. that way the chaser can move normally (issue order) up to that point (normal pathfind to destinations) and then cancel once out of range

- Some how find the path between the chase unit and the destination, and move him along that path manually
==============================================================

==============================================================
Is there any more effective ways of doing this? Which one of these is my best bet? Any pointers? Thx, Matt
==============================================================
 
Last edited:
Status
Not open for further replies.
Top