• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

How to make a unit not collide with player 9 units

Status
Not open for further replies.
Level 2
Joined
Nov 26, 2011
Messages
5
How to make a player 10 ground unit not collide with ground units of player 9, but do collide with ground units of players 1-8? I still need a system where units 'Attack-Move to' a place but go for their objective when they can move through. I thought of a way of doing this, is to make a unit 'check' for whether theres a 'hole' that can be went through or not. For this I need this checker unit not to collide with units of player 9.
 
Level 2
Joined
Nov 26, 2011
Messages
5
That technically works but it makes player 9s units able to go through the smallest holes so Im afraid I cant use this solution.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
With triggers:
Custom script: set bj_wantDestroyGroup = true
Pick every unit in (Units owned by Player 9) and do (Actions):
Actions -> Set (Picked unit) collision size to 0.
 
Level 11
Joined
Nov 15, 2007
Messages
781
A simple way to do it would be to run a periodic event that checks if any of player 10's units are in range of any of player 9's units. If it returns true, set the unit's collision to 0 - if it returns false, set it above 0. That way it will always have a collision size unless there's a unit owned by player 9 in range. Make sure you clean up leaks because such a large periodic event will lag extensively if there are any.
 
Status
Not open for further replies.
Top