PDA

View Full Version : NPCServer updates (Math functions)


Admins
08-28-2007, 04:03 PM
Today the npcservers have been restarted.
There are a few new functions taken from the client which handle vectors, boxes and matrices. Most of them are listed at http://wiki.graal.net/index.php/Creation/Dev/Script/Client#Math.
Those handle 3d vectors, but can also be used to calculate angles e.g. for getting the reflection angle of a ball when colliding with a player. Just use z=0 if you want to do 2-dimensional calculations.

Chompy
08-28-2007, 04:32 PM
Nice! :D

xXziroXx
08-28-2007, 06:10 PM
Too.. much.. math.. brain.. failure..

Twinny
08-28-2007, 06:43 PM
*curls into the fetal position and sucks his thumb*

It may just be me but some of the text in http://wiki.graal.net/index.php/Matrix is incredibly hard to read. I'd try and fix it but i'd probably set the wiki on fire.

zokemon
08-28-2007, 06:45 PM
Hurray!

Kyranki
08-28-2007, 07:02 PM
Hurray!

That force told me this was coming.

coreys
08-29-2007, 01:16 AM
That force told me this was coming.

The force is strong in this one.
Although anyone could have seen it coming.
But still.

Anyways, perhaps you could show an example of how you would use these functions to do something like that ball thing? I'm unsure what each of these do...:(