Developer's Blog
Register Low Fi Mark Forums Read

Reply
 
Thread Tools
Old 06-25-2012, 12:49 PM   #1
MathsDebator
Member
 
MathsDebator's Avatar
 
Join Date: Oct 2009
Posts: 1,678
MathsDebator is offline

Default Possible to disable turning


As title suggests: is it possible to disable a unit from turning? It would be an interesting skill for a future hero..
__________________


Check out my latest hero:

Arith'rak, the VOODOO DOCTOR
  Reply With Quote
Old 06-25-2012, 01:17 PM   #2
MauranKilom
Member
 
MauranKilom's Avatar
 
Join Date: Jan 2010
Location: Germany
Posts: 5,142
MauranKilom is offline
Default Re: Possible to disable turning

You can pause/stun him... Effectively prevents him from turning...
But i guess that's not what you were looking for.

Setting turnrate to 0 will make any turning instant (as opposed to making it impossible). it slow, but not impossible.
__________________
I might edit my p0sts frequently and rapidly after posting.

DotA code of the week:
Jass:
if loc_real01>650 then
else
  call GroupAddUnit(group002,GetEnumUnit())
endif

Fix OD combo! IMPLEMENTED!
  Reply With Quote
Last edited by MauranKilom; 06-25-2012 at 08:25 PM.
Old 06-25-2012, 02:21 PM   #3
EebstertheGreat
Forum Staff
 
EebstertheGreat's Avatar
 
Join Date: Sep 2009
Location: Cleveland, OH
Posts: 5,796
EebstertheGreat is offline
Default Re: Possible to disable turning

You can simply turn the unit back to its original facing angle every 0.1 seconds, as is done with Black Hole.
  Reply With Quote
Old 06-25-2012, 03:20 PM   #4
chick3nfist
Member
 
Join Date: Sep 2009
Location: Singapore
Posts: 675
chick3nfist is offline
Default Re: Possible to disable turning

But will the unit be able to move by spam-clicking the move command?
__________________
Quote:
Originally Posted by Artio View Post
Logic makes no sense
Quote:
Originally Posted by TimeLocked View Post
I'm quite satisfied my stick. In most cases, there's no need to make it bigger.
Make Zeus's Static Field better and more intuitive design
  Reply With Quote
Old 06-25-2012, 04:23 PM   #5
EebstertheGreat
Forum Staff
 
EebstertheGreat's Avatar
 
Join Date: Sep 2009
Location: Cleveland, OH
Posts: 5,796
EebstertheGreat is offline
Default Re: Possible to disable turning

Yeah, he could move slightly diagonally, not just straight forward. However, if you reduce the interval to 0.01 seconds, this effect would be completely negligible. You can't turn very much in a hundredth of a second.
  Reply With Quote
Old 06-25-2012, 06:44 PM   #6
1239
Member
 
1239's Avatar
 
Join Date: Jul 2010
Posts: 64
1239 is offline
Default Re: Possible to disable turning

Quote:
Setting turnrate to 0 will make any turning instant
Setting turnrate to 0 will give a unit the lowest possible turnrate. If you want to make a unit only to be able to move forward for some seconds this could be a good solution.
  Reply With Quote
Old 06-25-2012, 06:55 PM   #7
doomsheep
Member
 
doomsheep's Avatar
 
Join Date: Jun 2009
Posts: 5,974
Blog Entries: 1
doomsheep is offline
Default Re: Possible to disable turning

Quote:
Originally Posted by 1239 View Post
Setting turnrate to 0 will give a unit the lowest possible turnrate. If you want to make a unit only to be able to move forward for some seconds this could be a good solution.
that's just in the object editor which uses a different way of showing turn rate and has a minimum of 0.10, whatever that means. in practice the unit turns slow but very clearly is still able to turn.
  Reply With Quote
Old 06-25-2012, 08:25 PM   #8
MauranKilom
Member
 
MauranKilom's Avatar
 
Join Date: Jan 2010
Location: Germany
Posts: 5,142
MauranKilom is offline
Default Re: Possible to disable turning

Oh man, messed that up with 0 movespeed... Sorry.
__________________
I might edit my p0sts frequently and rapidly after posting.

DotA code of the week:
Jass:
if loc_real01>650 then
else
  call GroupAddUnit(group002,GetEnumUnit())
endif

Fix OD combo! IMPLEMENTED!
  Reply With Quote
Old 06-26-2012, 01:27 AM   #9
MathsDebator
Member
 
MathsDebator's Avatar
 
Join Date: Oct 2009
Posts: 1,678
MathsDebator is offline
Default Re: Possible to disable turning

okay thx for comments.

What I was after is something along the lines of Eebster: only being able to face in one direction, therefore only being able to move or attack in that direction, such that you cant physically attack a unit that is not directly in front of you. Still possible?
__________________


Check out my latest hero:

Arith'rak, the VOODOO DOCTOR
  Reply With Quote
Old 06-26-2012, 06:02 AM   #10
beetin
Member
 
beetin's Avatar
 
Join Date: Apr 2011
Posts: 2,943
beetin is offline
Default Re: Possible to disable turning

Edit: Useless information.

Someone would need to confirm what a units attack angle is, as I clearly don't know anymore.
__________________
  Reply With Quote
Last edited by beetin; 06-26-2012 at 06:18 AM.
Old 06-26-2012, 10:22 AM   #11
MauranKilom
Member
 
MauranKilom's Avatar
 
Join Date: Jan 2010
Location: Germany
Posts: 5,142
MauranKilom is offline
Default Re: Possible to disable turning

GUI-Action: Animation - Change Unit Turn Speed -> Set it to 0. Works perfectly.
Jass: call SetUnitTurnSpeedBJ( unit, 0.00 )

Have to test what influence this has on attacks. But the unit can only run in a straight line for now. I'll collect my findings below.

Attacking is still possible in a limited angle. Don't know how it is determined though.

Art - Propulsion Window has some interesting effects. If you set it to 90° then the unit will not do anything when ordered to go behind itself, but move forward when ordered to somewhere in front of it. Similarly, if it's 180° the unit will move forward no matter where you order it to go, which interacts in a funny way with the wc3 pathing (the engine doesn't consider stuff in front of you an obstacle because you should turn around first, thus you start moving. But since you don't turn around, you start moving through stuff in front of you).

The turnspeed isn't exactly 0, but it's close. You'll need 2 minutes to turn 180° i believe.

Also, reporting for move to Programming.
__________________
I might edit my p0sts frequently and rapidly after posting.

DotA code of the week:
Jass:
if loc_real01>650 then
else
  call GroupAddUnit(group002,GetEnumUnit())
endif

Fix OD combo! IMPLEMENTED!
  Reply With Quote
Last edited by MauranKilom; 06-26-2012 at 11:22 AM.
Old 06-26-2012, 11:38 AM   #12
chick3nfist
Member
 
Join Date: Sep 2009
Location: Singapore
Posts: 675
chick3nfist is offline
Default Re: Possible to disable turning

Or you can just trigger everything. Inelegant programming though.
__________________
Quote:
Originally Posted by Artio View Post
Logic makes no sense
Quote:
Originally Posted by TimeLocked View Post
I'm quite satisfied my stick. In most cases, there's no need to make it bigger.
Make Zeus's Static Field better and more intuitive design
  Reply With Quote
Old 06-26-2012, 11:40 AM   #13
SoletLuna
Forum Staff
 
SoletLuna's Avatar
 
Join Date: Jun 2009
Location: Germany
Posts: 3,693
Blog Entries: 1
SoletLuna is offline
Default Re: Possible to disable turning

Reeeeeeeeeeports, eh, moved.
  Reply With Quote
Old 06-26-2012, 01:35 PM   #14
1239
Member
 
1239's Avatar
 
Join Date: Jul 2010
Posts: 64
1239 is offline
Default Re: Possible to disable turning

If you have tested it you will know that propulsion window has nothing to do with attack angle and is another story.


From my tests a unit can attack a target if the angle between its facing and center of the target is less than ~11.756°.

This seems to be a constant for all units except the ones with Movement - Speed Base 0 (and the ones that have a root ability with rooted turning boolean false and are in rooted state).

Note that the facing of the model does not always show the actual facing of the unit (extreme example would be jakiro). While spell casting, attacks and running use the actual facing of the unit, GetUnitFacing(unit u) returns the facing of the model.
  Reply With Quote
Old 06-26-2012, 01:57 PM   #15
MauranKilom
Member
 
MauranKilom's Avatar
 
Join Date: Jan 2010
Location: Germany
Posts: 5,142
MauranKilom is offline
Default Re: Possible to disable turning

I found that information about Propulsion window in a quick search around the web. I then proceeded to test it and i removed it as soon as i realized that this information was wrong. Refer to my sig.
__________________
I might edit my p0sts frequently and rapidly after posting.

DotA code of the week:
Jass:
if loc_real01>650 then
else
  call GroupAddUnit(group002,GetEnumUnit())
endif

Fix OD combo! IMPLEMENTED!
  Reply With Quote
Old 06-27-2012, 10:52 PM   #16
EebstertheGreat
Forum Staff
 
EebstertheGreat's Avatar
 
Join Date: Sep 2009
Location: Cleveland, OH
Posts: 5,796
EebstertheGreat is offline
Default Re: Possible to disable turning

I can't find any mathematical justification for 11.756°. I wonder where it comes from.

Anyway, PropWin is clearly buggy, like so many fields.
  Reply With Quote
Old 06-28-2012, 02:02 AM   #17
1239
Member
 
1239's Avatar
 
Join Date: Jul 2010
Posts: 64
1239 is offline
Default Re: Possible to disable turning

Quote:
I can't find any mathematical justification for 11.756°. I wonder where it comes from.
No idea .
And its something like 11.755xxxxxxxx. But feel free to retest, there is too little test stuff goin on these days an my fingers still bleeding from hitting the test button in WE that often the last years ..

Quote:
Anyway, PropWin is clearly buggy, like so many fields.
Hm, I think it does what its supposed to do..
  Reply With Quote
Reply
  Entertainment Programming


Forum Jump

Thread Tools