Can you change players[]. variables? As well as bombs[] etc.
Re: Changing players[]. variables…
Yeah, just write something like
players[0].bombs = 99;
0 being the default player that launched the script.
And for npcs it's
npcs[-1].ap = 20;
-1 being the default npc that launched the script
Re: Changing players[]. variables…
in the case of npcs[-1] is there any way to change OTHER npc’s attributes? As in, I’m in the script of an NPC called ‘bob’ and I want to change the x,y position of the npc ‘harry’. Is this possible without server strings if all NPC’s index’s are “-1”?
Re: Changing players[]. variables…
Yes, aparently not for players though.
Just go:
this.i=1;
while(this.i<=npcscount){
if(npcs[i].ap==50){
message YEAH!;
}
this.i=this.i+1;
}
Will search thru all the npcs on a level and will display message YEAH!, for all showcharacter npc's with 50 ap.
Replace message with npcs[i].x = 32; npcs[i].y = 45; and your in business.
They don't seem to have a convient name or anything to find which one your looking for so i'd do something like, npcs[-1].rupees = 3; To give them all differn't amounts, so there findable. Then make the while loop look for rupees ==3.
Re: Changing players[]. variables…
that seems inconvenient. I would think having some kind of unique identifier built into all the npcs would be a good idea…
Re: Changing players[]. variables…
Yeah, their id is exclusive atleast. Used in ways like testnpc(x,y) to find the id of the npc would work alright.
Can't edit the client though, so whatever synthax there is, your stuck with till they crack a newer version.