Question about scripts

Umm…i cant figure out how to get the scripts/weapons/systems i added to work? Humm… maybe im adding them wrong or somthing? Pls help.

Re: Question about scripts

toweapons ;

It adds the entire NPC, containing that code as the NPC itself.
We are without an NPC-Server, so we're doing things the old fashioned way :stuck_out_tongue:

Meaning, all weapons you make will be stored in the weapons.txt, re-caching of weapons will not be instant, and NPC-Control for RC is disabled.

Re: Question about scripts

So where would I put this “toweapons ;” inside weapon.txt ?

Re: Question about scripts

lol, Nein.

You put it in the NPC.

if(playerenters) toweapons spin; if(weaponfired) { this.intdir = playerdir; for(this.i = 0; this.i < 12; this.i++){ playerdir = (this.intdir + this.i) % 4; sleep 0.05; } }

Once a player (who doesn't have the NPCweapon) obtains/grabs/gets the NPCw, the GServer will automatically place it in the weapons.txt

Re: Question about scripts

Okay so i add

if(playerenters) toweapons -SystemMovement;
if(weaponfired) {
this.intdir = playerdir;
for(this.i = 0; this.i < 12; this.i++){
playerdir = (this.intdir + this.i) % 4;
sleep 0.05;
}
}

and it didnt seem to add to my players attributes,I also added NPC-Control as a weapon and that work any ideas?[br][br]Double Posted on: April 03, 2008, 04:47:23 PM_________________________________________________[br]Okay i got that thanks,For tileset i have custom tiles and i have the tile script in the lvl as well but when i go ot the lvl its either all black or the level is all messed up. Any ideas?

Re: Question about scripts

You have to make ethe tileset an indexed 8-bit PNG or perhaps your tileset is over 64k, in that case you need to split it into sections.

Re: Question about scripts

Haha, and for the record, a weapon starting with - is invisible, as such, it can never be selected to be 'fired' as a weapon.