HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Melee Distance

03-26-2006, 01:33 AM#1
Linera
I did a distance check between two units standing right next to each other (as close as possible), which is melee, but distance between them isn't 0.

What is the actually melee distance?
03-26-2006, 03:10 AM#2
TaintedReality
Not exactly sure but I usually use 30 to 40.
03-26-2006, 03:44 AM#3
Linera
Is there a way to set it so its the same for all units?
03-26-2006, 04:46 AM#4
Ignitedstar
30 or 40? I think that's too low. If my memory is correct, melee damage is anywhere from 90 to 110. Some units have high melee range because it should make their weapon that strikes the target, like 110. On the other hand, Ghouls and other melee units that attack with their hands or a small weapon or something have 90. Melee distance(I think) is also affected by the colision size of the unit.

I'm not sure if that's what your talking about though. :/
03-26-2006, 05:02 AM#5
Linera
I'm talking about the distance between two units standing so close that there collsion boxes are touching so they can't move any closer.
03-26-2006, 05:11 AM#6
TaintedReality
Pathing - Collision Size in the object editor under each unit. Haven't messed with it or anything but I think that should be what you want.
03-26-2006, 05:17 AM#7
Linera
I just did a test that would grab the distance between two units and show it to me if a message.

I did 4 tests 1 north, east, west, and south.
Both units where exactly the same.
I got 4 different numbers
099.225
106.260
112.840
109.076
03-26-2006, 05:18 AM#8
TaintedReality
Hmm..in the object editor most units seem to have around 30 Collision Size, so you'd think 30+30 would mean 60 distance between them. But..who knows ^^. Why do you need to know it btw?
03-26-2006, 05:27 AM#9
Linera
this is to detect when the unit moves out of range during the attacking

Its for my Combat engine.

I need it to detect the range in a sense.
03-26-2006, 05:35 AM#10
TaintedReality
Well try setting all attack ranges and all collision sizes to the same amount, then do 20 tests or something and figure out close to the number you need. Won't be exact, but you can estimate and it will work fine.
03-26-2006, 05:50 AM#11
Linera
I'm using a custom spell made from the Channel spell, all of the combat is done with Jass and GUI
03-26-2006, 06:21 AM#12
TaintedReality
It seems even easier in that case. Just set cast range to 100, and check if they're outside of 100.
03-26-2006, 06:35 AM#13
Linera
what be a problem with the range attack spell. problem is with the melee attack spell. as it works like melee attacking.
03-26-2006, 10:08 AM#14
Anitarf
I'm not sure what you want to know. Melee distance is around 100, that's the distance at which melee units can normaly attack.
03-26-2006, 04:15 PM#15
Linera
Well what is the max distance?

I'm needing to write a script for my combat engine so when the unit leave the attacking unit's range if attacking unit is a computer controlled unit it run after the unit.