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

[vJASS] Collision Ability

Status
Not open for further replies.
Level 13
Joined
Mar 19, 2010
Messages
870
Hi hivers,

i have an idea to make an ability which deactivates the collision of a hero for x seconds.. BUT the collision should only work for all allied computer controlled units but not for allied real player units. Is that possible?

Reg.
 
You'll need to disable collision and then build your own pathfinding algorithm to override the existing one. Nestharus https://github.com/nestharus has built an A* (high performance) pathfinding algorithm in JASS but even that is too slow for viability. You'll need to severely limit the use cases or cut out features if you want any chance to do this.

I'd rank this in the top 10 most difficult class of problems in JASS.
 
Level 13
Joined
Mar 6, 2008
Messages
852
Simple thoughts about what you could make:

- Make a shift movement spell which let your hero shift through allied units in a specific direction but not through enemy units.

- Make the hero flying with a flying hight of 0.
-- Then you could take flying away if there is an enemy unit near the casting hero
-- or you could slightly knock back the hero from enemy units so that he or she can not fly over an enemy unit.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Give 'Ghost' to the hero, then periodically pick living ground (and that suffice your conditions) units around it (IsUnitInRangeXY considers collision size) and knock the hero away from those. You probably have only single heroes having activated the feature, so it's much more performant from their end.
 
Status
Not open for further replies.
Top