View Single Post
  #5  
Old 04-11-2009, 08:21 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by Raelyn View Post
Thanks!

Oi, I should start another thread titled "Raelyn's Big List of Questions" since I have about a million more. Such as, what is the GS2 equivalent of the lay and lay2 commands? And why does firing arrows and placing bombs on the gmap seem to not work properly? :P

Also, I have a script for setani is GS1, how would I setani in GS2? And the GS1 version doesn't work in the gmap, only indoor levels, what would cause this?

Thank you.
"lay", "lay2", "shootarrow", etc. 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.

Simple animation changes are:
PHP Code:
setCharAni("idle"NULL); // This will set the NPC's ani to idle, replace "NULL" with an additional PARAM1 if necessary.

setAni("idle"NULL); // This will set the player's ani to idle, replace "NULL" with an additional PARAM1 if necessary.

replaceAni("walk""newwalk"); // Replaces 'walk' with 'newwalk'. 
The top two commands for ganis work both clientside and serverside.


If you really need to place bombs on a gmap, I recommend doing something like this:

PHP Code:
temp.mapx player.gmap.name == NULL getmapx(player.level.name) * 64;
temp.mapy player.gmap.name == NULL getmapy(player.level.name) * 64;
putbomb(1temp.mapx xtemp.mapy y); 
Quote:
Originally Posted by Schetti View Post
Simple ani scripts:
PHP Code:
(this.)setcharani("sch_ctfblueidle","null"); //changes the ani of the NPC
//(dont know about null(Serverside only)), this. isnt needed, but I got told to use

setani("burninair","null"); //changes the ani of the Player
//(dont know about null(Clientside only)) 
Go make that thread, I'll try to help you(1 newb helps the other)
Let's not teach bad habits, probably better to leave the teaching to the teachers
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”

Last edited by Tigairius; 04-24-2009 at 02:34 AM.. Reason: Clarification
Reply With Quote