HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Arithmetic/Geometry/Triginomentry Triggers, help!

11-24-2002, 05:38 AM#1
Guest
Alright, im making a PONG map, and I already have implemented angles for the ball to bouce off when it hits a wall. BUT, the problem is, lets say the ball hits a pong paddle that is in motion, this will effect the angle of the shot, correct? But how can I detect this? How do I make it so if the ball comes in contact with a unit (the paddle) moving a certain direction, then it will slightly add 10 or so degrees to its angle when it bounces off? Thanks in advance!
11-24-2002, 11:10 AM#2
Jeltz
How does the paddle move? Is it walking or is it moved instantly?
11-24-2002, 02:29 PM#3
The_Cyberdemon1
Well, to detect if the unit is not moving, use the "Unit is issued an order with no target" event. That means it is stopped. I suggest, that you make a variable (boolean). Call it, movingornot. Using the event "A unit owned by player 1 is issued an order with no target", set it false. When it is set as false, we know the unit isn't moving. USing the event "a unit owned by player 1 is issued an order targeting a point" set the variable true. That means the unit is moving. Now, on the trigger where the ball is hit when the unit touches it, use the variable in and if/then/else. If movingornot = true, then send the unit off on the turned course, otherwise, just make it go normal.

Complicated, but it helps.

Note: Until the variable is set as false, the unit is still moving. It's ingenius.
11-24-2002, 03:16 PM#4
Guest
wel since hte paddle moves by either the user telling it to move, or a computer which you tell IT to move, either way you will know how it is moving...

and depending on the varieties of pong, some dont change teh ball angle depending on movement and only depending on where exactly on the paddel the ball hits...

and there are lots of math functions dealing with angles already so you can just check them out..