![]() |
We need some shortcut commands..
Heh, sometimes it gets tiring scripting things like "playernear" and such...
It should be integrated into graal, shortening our scripts and making it easier... Post what commands should be integrated to make things easier here. My suggestion is playnear... playernear(x,y,radius(from x,y)); So you could do... if (playernear(10,10,2)) { message Hey; }else{ message ; } If the player is within the radius given, from the point 10,10, the NPC will say Hey. As long as he is in that location, it will continue to say Hey. Once he leaves, it will no longer... Heh, just post your shortcut commands here anyway ;) |
if(((playerx-x)^2)+((playery-y)^2)<(radius^2))
Pythagorean theorem. |
nearestplayer variable is in the next version (player index it returns i thinks)
|
I just wish it'd allow us to create custom functions like that, along with global custom NPC-Server functions.
Like: NPC Code: |
Stefan said that would be quite imposible. I asked him if we could have function arguments and functions that return values other than void every time. He said Gscript wasn't object oriented or something. *shrugs* don't hink it will happen any time soon. But there is always hope.
|
Quote:
|
Quote:
|
Distance Formula:
((x2-x1)^2 + (y2-y1)^2)^.5 (yes, to the 1/2 power = square rt. ) |
Quote:
I like Fermat's Last Theorem better, but Pythagorus is cool, too. |
| All times are GMT +2. The time now is 05:43 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.