HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Help with turning.

01-27-2005, 03:14 PM#1
Checkmate
I have a map where there is one unit that is controlled by the arrow keys. The Camera is directly overhead.

Is there any way that, when the Player presses left/right, I could get the main unit to move in that direction without turning in that direction? I want a unit to be able to move left while still facing up.
01-27-2005, 05:11 PM#2
Guest
i think you would have to use jass i don't know though
01-27-2005, 05:33 PM#3
oNdizZ
Use: Unit - Move Instantly
And then Point with Polar Projection, this will be kinda leaky if you don't know how to clean it up, but that doesn't matter if its your first map.
01-27-2005, 09:22 PM#4
Checkmate
Quote:
Originally Posted by oNdizZ
Use: Unit - Move Instantly
And then Point with Polar Projection, this will be kinda leaky if you don't know how to clean it up, but that doesn't matter if its your first map.

I was thinking about doing this, but won't it be really choppy?
01-28-2005, 06:57 AM#5
Ant
Nah it's not choppy.

Basically as long as you have about 25 movements per second then it's fluid.
Moving every 0.05 or 0.04 seconds may seem choppy but after a few seconds it'll seem fine. 0.01 and 0.02 emulates perfect movement but causes too much lag.
01-28-2005, 10:52 AM#6
iNfraNe
Quote:
Originally Posted by Ant
0.01 and 0.02 emulates perfect movement but causes too much lag.
does it? not if you move only 1 unit... at least. I never had much of a problem with it :P
01-28-2005, 11:32 AM#7
HEZZA
You could order it to move to x degrees by xxx polar offset but then run a trigger that every 0.5 seconds of the game it faces directly ahead....maybe an invisible dummy unit
01-28-2005, 12:48 PM#8
Kalvorod
without turning? yeah, that'd be the only way to do that. Unless you mean that the Left key moves him left, while the Right key moves him right, WITH facing.

If you want him to face, do sorta what the previous post said
Give order targetting point - Move to (Point with Offset ( Position of unit offset by (0,100)
That would be moving up
(100,0) right
(0,-100) down
(-100,0) left
01-28-2005, 02:28 PM#9
Ant
Oh you can trigger move a few dozen units at 0.01 second intervals in single player, but in multiplayer you probably can't move more than 4 without lag.

Anyway, there are only two types of movement. Both use Move Unit to point with polar offset. The first, just move the unit to position of unit + 10 towards 90 degrees (let's say). The second is the same except you move the unit towards 90 degrees + Facing Angle of Unit.
01-28-2005, 06:54 PM#10
Checkmate
This is one-player only, so I'm not worried about lag. I have one problem now; somewhat unrelated to turning.

How do I get a unit to cast Carrion Swarm targeting a point (x, y) when the Player presses the up arrow?

I see no trigger that allows me to make a unit cast a spell targeting a certain point.
01-28-2005, 07:05 PM#11
iNfraNe
its in the same action as making it move. Unit - order targetting a point. Its in the list with "move": "Undead - Carrion Swarm".
01-29-2005, 01:50 AM#12
Checkmate
Quote:
Originally Posted by toot
its in the same action as making it move. Unit - order targetting a point. Its in the list with "move": "Undead - Carrion Swarm".

Hmm....

I got lucky this time, but can you only cast those spells that are on the list there?
01-29-2005, 04:19 AM#13
Ant
Anything with the base spell as carrion swarm will be casted.

So if you have two spells based off carrion swarm it's kinda messy, but if you rename everything and the base spell is still carrion swarm then it's enough.

And it's Unit - issue order targeting a point (convert coordinates to point).