View Single Post
  #3  
Old 04-11-2009, 10:22 AM
Raelyn Raelyn is offline
the Professional.
Raelyn's Avatar
Join Date: Sep 2003
Location: Zormite
Posts: 964
Raelyn will become famous soon enough
Question #2

Question #2:
What is the GS2 equivalent of the lay and lay2 commands?

Answer #2:
Quote:
Originally Posted by Tigairius View Post
"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(xy"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.1.5 vecx(player.dir), player.vecy(player.dir), player.zgetangle(vecx(player.dir), vecy(player.dir)), NULLNULL"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
Reply With Quote