HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Locust unit with collision

02-02-2007, 09:20 PM#1
Szythe
I have a dummy unit which I'm using as a projectile, which has the following properties:

Collision Size: 0
Abilities: Locust, Invulnerable
Movement Speed: 0
Movement Type: Hover

Then when I create the dummy unit, I use
Collapse JASS:
call SetUnitPathing(dummy, false)

After that, I use a loop to move the unit, using
Collapse JASS:
call SetUnitPosition(dummy, x, y)

The problem that I'm running into, is that if the projectile is moving and runs into a unit, it doesn't go through the unit but instead gets blocked by it. I can't figure out what would cause this dummy unit to have collision, so I'm baffled. Any help would be appreciated.
02-02-2007, 09:27 PM#2
blu_da_noob
There shouldn't be problem if it has locust, but anyway. Don't use SetUnitPosition, use
Collapse JASS:
call SetUnitX(dummy,x)
call SetUnitY(dummy,y)
02-02-2007, 09:39 PM#3
Szythe
When i use
Collapse JASS:
call SetUnitX(dummy, x)
call SetUnitY(dummy, y)
then for some reason the unit does not move at all.

In fact, using
Collapse JASS:
call SetUnitX(dummy, x)
call SetUnitY(dummy, y)
call BJDebugMsg("Move")

Displays the text message but does not move the unit, so theres no issue with thread crashing. Also, I am sure that "dummy" is the correct unit.
02-02-2007, 09:48 PM#4
blu_da_noob
Make sure the unit's move speed is greater than 0.
02-02-2007, 10:01 PM#5
The)TideHunter(
Yes, theres your problem.

Quote:
Originally Posted by Szythe
Movement Speed: 0

I unit will not and cannot move when its movespeed is 0.
If its a dummy unit, it dosent matter what the movement speed is, it should never move if your updating it very fast, and your dummy units should never be ordered, so they will never move.
02-02-2007, 10:02 PM#6
Szythe
Thanks for the speedy solution. +rep