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

[General] Unit collision ignoring

Status
Not open for further replies.
Level 14
Joined
Nov 17, 2010
Messages
1,265
I believe you can turn collision off for the trampler and then turn it back on when you are done trampling. Unit - turn collision off/on
 
Level 11
Joined
Oct 16, 2013
Messages
246
Giving it to the trampler (rather than the trampled) didn't work either?

It does all the opposite. The main unit can't walk over any obstacle while everyone ignores and can walk over it.

I believe you can turn collision off for the trampler and then turn it back on when you are done trampling. Unit - turn collision off/on

Sadly the trampler could go through walls, I want it to move around the map as a regular unit does, ignoring only other units. I'm seriously thinking about making it a flying unit and place blockers as long as I don't find a major bug by doing so.
 
Level 14
Joined
Nov 17, 2010
Messages
1,265
Removing collision doesn't allow a unit to walk through walls afaik. I use it to have a unit charge towards a unit and go through any units on it's way. When I get back to my comp I'll take a look and see for sure how I did it.
 
Level 14
Joined
Nov 17, 2010
Messages
1,265
The way I do it is to periodically move the unit every .03 seconds. I turn off collision and check pathability every time i move it to make sure the point it is travelling to is walkable. If not I stop it and turn collision back on. There is also some spells in the spells section that have the unit move left or right to get around the spot that is unwalkable. When the spell is over you turn collision back on. This allows you to go through any units you want to. In my case I have it ignore friendly units and detect when it comes within range of an enemy unit and deal damage to it.

All that being said though, it doesn't really help you continuously move through units as you walk around and cast spells. So I guess you should disregard my reply
 
Level 3
Joined
Feb 25, 2019
Messages
35
The way I do it is to periodically move the unit every .03 seconds. I turn off collision and check pathability every time i move it to make sure the point it is travelling to is walkable. If not I stop it and turn collision back on. There is also some spells in the spells section that have the unit move left or right to get around the spot that is unwalkable. When the spell is over you turn collision back on. This allows you to go through any units you want to. In my case I have it ignore friendly units and detect when it comes within range of an enemy unit and deal damage to it.

All that being said though, it doesn't really help you continuously move through units as you walk around and cast spells. So I guess you should disregard my reply
So does the pathability check not take into account their own collision? I was thinking it did. See, I made an ability that splits into 3 possible triggers all running the 0.03s idea but in different outcomes dependent on the pathability of the environment around the caster at that point; I ended up trying to solve an issue for the ability and decided to try turning collision off, but this made it so the 2 options (Where pathability is limited) never fired, so I ended up concluding that turning it off made the game say "yeah I can go there" when checking for pathability.
 
Level 14
Joined
Nov 17, 2010
Messages
1,265
The pathability check uses an item to see if it can be placed at the next point. If not then it is not pathable. You can place an item on top of a unit so it doesn't consider them an obstacle. I can't remember where I found the system, but I think it may be in the Spells section
 
Level 3
Joined
Feb 25, 2019
Messages
35
The pathability check uses an item to see if it can be placed at the next point. If not then it is not pathable. You can place an item on top of a unit so it doesn't consider them an obstacle. I can't remember where I found the system, but I think it may be in the Spells section
Wait that is crazy, between the time that I commented and you replied, I actually made a new pathing checking system that sounds like what you just mentioned. Basically, I create and destroy an item at the point I want to check, then check using X & Y to see if it was moved off the desired point. It is working so far for me. Is that similar?
 
Status
Not open for further replies.
Top