Collision Detection

Status
Not open for further replies.
Or just give the units a very low ranged immolation with instant death and a fast burn rate. (And remove the fire effects, of course).
You could then set the ability to target specific types of units (such as non-ancient) and then give units which you don't want to die from collision the classification of ancient. Of course there are plenty other classifications to use.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
EVENT
  • Events
    • Time - Every 0.03 seconds of game time
Why do we use Time - Periodic Event ?
This is because we want to form a "check" if there any Unit B around Unit A
One check every 0.03 second is a standard checking time

ACTIONS
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units within 150.00 of (Position of (Triggering unit))) and do (Actions)
    • Loop - Actions
      • Unit - Kill (Picked unit)
This is an example of "detecting collision" system
It picks up units in area (circular shape) once per *YourEventTime* per check

I have attached a test map for you to see
Standard collision size area of circle is 160.00 (same as Immolation AOE)
Use 160.00 for detecting collision to as near as possible from the unit

TEST MAP
This test map includes 1 Hero-controlled unit
Move your Blood Mage to any Footman and when the Footman tries to get near you (160.00 range or less), it will instantly kills that unit (by obeying the Loop - Actions)
 

Attachments

  • Simple Collision System.w3x
    13.4 KB · Views: 56
Level 33
Joined
Mar 27, 2008
Messages
8,035
That is not a good system when you need to do this for every unit in the game.
loloLOLOLOLXXXXX111!111111!!!11!111

That test map only focuses on that action, the Unit Group - Pick Every Unit..."
Of course I just did the baseline of the system, you want to work with every unit ?
Check out my spell http://www.hiveworkshop.com/forums/...-0-a-193975/?prev=search=defskull&d=list&r=20, it is MUI and use this kind of system as "detecting collision"
It works for every moving thunder in that map (used for spell, same principle applies to use for normal units)
The key is Unit Group
When you add the collision unit to a Unit Group, you can pick it up in another trigger looping for once per 0.03 seconds and set a variable of location of the (Picked unit) and this will automatically supports multiple of units
Geez, I hate to get to this detailed part anyway, but you backfired my statement, so...

And if you say that 150 is way too large, please try to check in Object Editor for Immolation's default setting of its "Level X - Stats - Area of Effect"
It is 160.00 and you said that 150.00 is way too large ?
 
Status
Not open for further replies.
Top