I now notice why?/how? you love maths... but...

The perfect one step solution for creating Ice/Sliding Mazes in both Reign of Chaos and The Frozen Throne. It is the only decent system around and it even works in RoC, is lagfree, perfectly optimized, fast and reliable. The included TerrainKill feature frees you from the tedious task of creating a thousand kill-regions.

I now notice why?/how? you love maths... but...

New postby manstie on Mon Dec 14, 2009 7:11 am

Hello...
Just came back to post something...
I'm recently learning about using Sine, Cosine and Tangent, but I have no idea where people would use it in life... I guess I was partially wrong :roll:
I noticed that you used *Cos(0.017453278*GetUnitFacing(u) and *Sin(0.017453278*GetUnitFacing
I'd like to know, how did you get 0.017453278?

I'd also like to know what is Atan2? (In "Information for Dummies" talk)



And is there a way to increase the turn speed of your system (It won't turn any faster from like... 0.5 turning speed to 1 turning speed).
Image
User avatar
manstie
 
Posts: 273
Joined: Wed Jun 17, 2009 9:27 am
Location: Perth, Australia
Account: manstie

Re: I now notice why?/how? you love maths... but...

New postby 3ICE on Mon Dec 14, 2009 8:57 am

0.017453278 is a magic constant: π/180 Pi/180 is used for converting degrees (°) to radians ().

Computer games need a lot of trigonometry for distance calculations, collision detection, etc. A secretary or a lawyer will never need Sine, Cosine, or Tangent, but a programmer needs this stuff for sure.

Atan2 is on wikipedia. The first paragraph tells you everything you need to know about it. (takes two arguments, x and y, then in a coordinate system calculates the angle between the X axis and the (x;y) point and returns it in radians. I'd draw your a picture, but I'm 5$ not 10$ motivated 15$ enough 20$.

I have nothing on how to make them turn faster. I think all sliding maps have this problem. If you know of any map (protection isn't a problem) that has quicker turns on ice, I'd love to steal that and implement it into my system as a new variable (udg_TurningSpeed).
ImageImageImageImageImage
Image
ImageImage
User avatar
3ICE
Admin
 
Posts: 2118
Joined: Sat Mar 01, 2008 11:34 pm
Location: Hungary
Realm: US East
Account: 3ICE
Clan: 3ICE

Re: I now notice why?/how? you love maths... but...

New postby samtre on Mon Dec 14, 2009 10:40 am

the most thing a lot of warcraft map makers have in common is MATH!

it seems it's an addiction as they make systems and custom abilities....i still don't know how to use JASS, but i am able to make JASS spells using gui but with a lot of equations...
i still don't know how to use the other 'Math - ' actions.....

can't you try something like " call SetUnitFacing( GetEnumUnit(), ( GetUnitFacing(GetEnumUnit()) + udg_TurningSpeed ))"?
i tried this thing on my own maps and worked okay, i just removed the "Timed" before "SetUnitFacing" and ", 0.00 " before "udg_TurningSpeed )) ", i've never tried using in on your map..... don't dare to.
samtre
 
Posts: 82
Joined: Thu Nov 27, 2008 6:43 am

Re: I now notice why?/how? you love maths... but...

New postby 3ICE on Mon Dec 14, 2009 1:32 pm

I am already using that*, but it is no good.

*=call SetUnitFacing(u,57.295828*Atan2(GetLocationY(p)-y,GetLocationX(p)-x))

Btw what you have there would spin the unit like crazy, making the player feel slightly out of control :P
ImageImageImageImageImage
Image
ImageImage
User avatar
3ICE
Admin
 
Posts: 2118
Joined: Sat Mar 01, 2008 11:34 pm
Location: Hungary
Realm: US East
Account: 3ICE
Clan: 3ICE

Re: I now notice why?/how? you love maths... but...

New postby manstie on Tue Dec 15, 2009 3:59 am

Yeah...
A map with a faster turn speed (I think, pretty sure the triggers make them turn a bit faster) is Area of Ice Escape 4. (I noticed in Area of Ice Escape 1 that the turn speed wasn't as fast as #4.)
I was thinking - Wouldn't it be impossible to change the turn speed without a trigger that sets a unit's facing point instantly?

I just thought of another thing - Maybe you could do a custom thing to unit facing degreese, and don't use that at all, but use a real value to replace Unit facing degreese, and just make the unit face degreese for show :)
Image
User avatar
manstie
 
Posts: 273
Joined: Wed Jun 17, 2009 9:27 am
Location: Perth, Australia
Account: manstie

Re: I now notice why?/how? you love maths... but...

New postby 3ICE on Tue Dec 15, 2009 12:22 pm

You make absolutely no sense. SetUnitFacing is the function that sets the unit's facing "instantly". If only it did...
ImageImageImageImageImage
Image
ImageImage
User avatar
3ICE
Admin
 
Posts: 2118
Joined: Sat Mar 01, 2008 11:34 pm
Location: Hungary
Realm: US East
Account: 3ICE
Clan: 3ICE

Re: I now notice why?/how? you love maths... but...

New postby samtre on Wed Dec 16, 2009 12:02 am

i think he meant by as you order a unit to move(slide) to a point, instantly changes the unit facing from the unit's position to the point

or

it is just what i said

or

Wouldn't it be impossible to change the turn speed without a trigger that sets a unit's facing point instantly?

i just think of this as
Would it be possible
,
maybe just by changing the unit's turning speed, i remembered you(3ICE) said that your Steer trigger is somehow based on the unit's turning speed

and at the last sentence, why make a custom trigger for unit's facing degrees that we don't use at all? unit's facing degrees uses Real
samtre
 
Posts: 82
Joined: Thu Nov 27, 2008 6:43 am

Re: I now notice why?/how? you love maths... but...

New postby manstie on Wed Dec 16, 2009 4:18 am

samtrei think he meant by as you order a unit to move(slide) to a point, instantly changes the unit facing from the unit's position to the point

or

it is just what i said

or

Wouldn't it be impossible to change the turn speed without a trigger that sets a unit's facing point instantly?

i just think of this as
Would it be possible
,
maybe just by changing the unit's turning speed, i remembered you(3ICE) said that your Steer trigger is somehow based on the unit's turning speed

and at the last sentence, why make a custom trigger for unit's facing degrees that we don't use at all? unit's facing degrees uses Real


But with that real, you can't set it instantly to something else, it eases into the direction. So if you make a custom variable and change that, it's instant.
Image
User avatar
manstie
 
Posts: 273
Joined: Wed Jun 17, 2009 9:27 am
Location: Perth, Australia
Account: manstie

Re: I now notice why?/how? you love maths... but...

New postby samtre on Wed Dec 16, 2009 8:33 am

How about Unit - Move Unit instantly and Face Angle?
this might be dumb.........
you can't use any abilities though.
samtre
 
Posts: 82
Joined: Thu Nov 27, 2008 6:43 am

Re: I now notice why?/how? you love maths... but...

New postby 3ICE on Wed Dec 16, 2009 9:50 am

This is making less and less sense the deeper we go into it. Especially because you guys keep suggesting things I already use.

EDIT: It would have been great to have this discussion in two separate topics:
I now notice why?/how? you love maths and How to make sliding units turn faster?
ImageImageImageImageImage
Image
ImageImage
User avatar
3ICE
Admin
 
Posts: 2118
Joined: Sat Mar 01, 2008 11:34 pm
Location: Hungary
Realm: US East
Account: 3ICE
Clan: 3ICE

Next

Return to 3ICE's Sliding System for RoC



Who is online

Users browsing this forum: Google [Bot] and 4 guests