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

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
800
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