• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Directions of the trigger point with polar offset

Status
Not open for further replies.
Level 9
Joined
Oct 3, 2006
Messages
302
Ehllo, I have a question regarding a certain trigger.

The trigger reads like this
Move a (unit) instantly to (point with polar offset)

Move (footman001) instantly to position of (footman001) offset by (x) towards (y) degrees.

What does x and y mean? How do you read them as directions?

Thanks in advanced to all who help!!
 
Level 9
Joined
Oct 3, 2006
Messages
302
EDITED: Coz I didn't understand ur answer before..sorry

So Polar offset degree x means?
degree y means?
I think that one of those degrees refers to the point where the unit is facing. But where is it? Is it x or y?
And what degree is north? south? west? east?

Sory for so many questions!
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
TheBlooddancer gave an example of degrees, not coordinates. For coordinates, you have it like this:

.....Y+......
X-...0...X+
......Y-.....

So up on the Y-axis is higher, down on the Y-axis is lower, east on the X-axis is higher and west on the X-axis is lower. Very simple.
 
Level 13
Joined
Mar 16, 2008
Messages
941
And that has nothing to do with the question?
Saying that x is the x-axis and y is the y-axis is just false... he inserted those variables in the fields and in this case x was the offset and y the angle.
He also could write:
Move (footman001) instantly to position of (footman001) offset by (NODAMNXAXIS) towards (NODAMNYAXIS) degrees.
and it wouldn't be coordinates either :/
 
Level 8
Joined
Aug 4, 2006
Messages
357
"Move (footman001) instantly to position of (footman001) offset by (x) towards (y) degrees"

okay. let me break this down for you. the X you refer to is HOW FAR to move the footman from THE POSITION OF THE FOOTMAN. X is measured in pixels (i think), so this number is usually in the hundreds.

Y is WHICH DIRECTION to move him in. Y should be a number between 0 and 360 (in degrees °). Y = 0 mean east, Y = 90 means north, Y = 180 means west, Y = 270 means south.

Example: x = 100, y = 90. The footman will be moved 100 pixels to the north of its original position.
 
Level 13
Joined
Mar 16, 2008
Messages
941
So south and west are negative values?/If you wanna make an object move instantly to south or west you gotta put on negative values?
Is that it?

Just ignore the stuff with the coordinates, it has "nothing" to do with the PolarProjectionBJ. Its just idiotic to use a negativ offset with 0 degree when 180 degree and the normal offset does the same.
Read the stuff from maskedpoptart and be happy :)
 
Level 9
Joined
Apr 3, 2008
Messages
700
1. He means negatives of real location values, not polars.

2. He can make it on GUI without BJ
JASS:
function PolarProjectionBJ takes location source, real dist, real angle returns location
    local real x = GetLocationX(source) + dist * Cos(angle * bj_DEGTORAD)
    local real y = GetLocationY(source) + dist * Sin(angle * bj_DEGTORAD)
    return Location(x, y)
endfunction
 
Level 9
Joined
Oct 3, 2006
Messages
302
"Move (footman001) instantly to position of (footman001) offset by (x) towards (y) degrees"

okay. let me break this down for you. the X you refer to is HOW FAR to move the footman from THE POSITION OF THE FOOTMAN. X is measured in pixels (i think), so this number is usually in the hundreds.

Y is WHICH DIRECTION to move him in. Y should be a number between 0 and 360 (in degrees °). Y = 0 mean east, Y = 90 means north, Y = 180 means west, Y = 270 means south.

Example: x = 100, y = 90. The footman will be moved 100 pixels to the north of its original position.

Thank you for that info, that was all I needed to know..I keep on getting confused as to why there were two slots.
So this means,
that (x) has nothing to do the south, west, east coordinate thingy but has something to do with non-other than the distance of where the unit will be placed.
And (y) has something to do with the south, west, east coordinate thingy.

One last question..What are the common values in (x) used to make a unit look as if it is jumping or being thrown to.
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
My sample was with real X and Y axis. That means I was referring to the 'Point with Offset' command. maskedpoptart is referring to the 'Point with Polar Offset' command. The first is only with coordinates, and the second is in a certain angle for a certain distance.
 
Level 13
Joined
Mar 16, 2008
Messages
941
It depends most on your timer period.
Example:
Jump lasts 1 second, timer has a period of 0.04 seconds.
-> the timer will run 25 times. If you want the unit to travel for 1000 range the small offset per calculation will be 20 :)
Most times the values are between 5/20-40, but you should just calculate it.
 
Status
Not open for further replies.
Top