Quote:
Originally Posted by Raelyn
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(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.
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 ? 0 : getmapx(player.level.name) * 64;
temp.mapy = player.gmap.name == NULL ? 0 : getmapy(player.level.name) * 64;
putbomb(1, temp.mapx + x, temp.mapy + y);
Quote:
Originally Posted by Schetti
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
