
04-11-2009, 10:22 AM
|
|
the Professional.
|
 |
Join Date: Sep 2003
Location: Zormite
Posts: 964
|
|
Question #2
Question #2:
What is the GS2 equivalent of the lay and lay2 commands?
Answer #2:
Quote:
Originally Posted by Tigairius
"lay", "lay2", and "shoot" commands are all deprecated commands that were only left for compatibility and are not actually recommended to use.
An example of laying a green rupee could be replicated (depending on your 'gralats' class) with something as simple as:
PHP Code:
with (putnpc2(x, y, "join gralats;")) {
this.type = 1; // 0 = green, 1 = blue, 2 = red, 3 = gold
}
Other commands, like shootarrow() can be replicated using a shoot() command.
PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
// TServerLevel.shoot(x,y,z,angle,zangle,strength,ani,aniparams)
shoot(player.x + 1.5 + vecx(player.dir), player.y + 2 + vecy(player.dir), player.z, getangle(vecx(player.dir), vecy(player.dir)), NULL, NULL, "arrow", NULL);
}
You would have to make a gani called 'arrow' with an arrow facing all four directions, of course. It's my recommendation that you don't use any of those older commands, and re-script most of that kind of stuff.
|
|
__________________
*Don't let the door hit you on the way out.*
|
Last edited by Raelyn; 04-11-2009 at 12:49 PM..
Reason: Neatness
|
|
|