Okay. Firstly, I've made an NPC that when the player says /serverlist, a GUI window pops up. with a long list of servers. The player can select one, click connect, and will warp to that server.
Everything works just fine. Except for the fact that i don't know how to make serverwarp read a var.
Currently it's: serverwarp this.selectedserverconnect;
though i've tried serverwarp @ this.selectedserverconnect; and a few more.
I just need the format.
Also, in regards to putnpc2. This has drivin me crazy.
Offline, I used putnpc to place a custom NPC (like, lets say it puts a bomb script that lays a bomb, that puts a few randomly sized explosions, in random areas within a certain area. I would put something like:
PHP Code:
if(weaponfired&&playerbombs>0){
if(playerdir=0){
play put.wav;putnpc custombombimg.png,custombomb.txt,playerx+0.5,playery-1;
playerbombs-=1;
}
if(playerdir=1){
play put.wav;putnpc custombombimg.png,custombomb.txt,playerx-1.5,playery+1;
playerbombs-=1;
}
if(playerdir=2){
play put.wav;putnpc custombombimg.png,custombomb.txt,playerx+0.5,playery+2.5;
playerbombs-=1;
}
if(playerdir=3){
play put.wav;putnpc custombombimg.png,custombomb.txt,playerx+2.5,playery+1;
playerbombs-=1;
}
Or whatever. The problem is, I've had -no- luck translating this to use putnpc2
I started with rescripting it online in GS2. Though as I kept searching every available resource I could find for what I was doing wrong, and as my frustration grew, I eventually started rescripting it in GS1 (So I can get what I got in GS1, then once I have everything else set up, I could try attempting to convert it back to GS2.) Still had no luck of course.
So could
anyone please explain to me the correct format of putnpc2?
(I.e. the format for putnpc (in GS1) is: putnpc image.png, script.txt, x, y; )