![]() |
Help!
In the following thread it is supposed to put an npc that puts explosions based on a players power(a custom string) but it always treats it as 0, can anyone see whats wrong?
______________________________________________ if (actionserverside) {; putnpc2 strtofloat(#p(1)),strtofloat(#p(2)),{//creates the npc; if (created||playerenters) {setimg shadoworb.png;//sets image as shadoworb.png this.helth=1;//sets variable this.helth as 1; setshape 1,50,50;//sets the size; this.helth+=strtofloat(#p(0));//Problem 1:should add the amount of variable thing, but adds 0 instead; for (i=0;this.helth>-1;i++) { putexplosion2 10,strtofloat(#p(0))+1//Problem 2:explosion size should be the players power +1,x,y; sleep 1;}} if (wa****||wasshot) {this.helth-=1; message #v(this.helth)} if (this.helth<=-1) {putexplosion strtofloat(#p(0)),x,y;//Problem 3: when it dies, the explosion size should be players power, but it's 0; destroy;//destroys the npc;} }} //#CLIENTSIDE if (weaponfired) { play shock.wav; setplayerprop#c, Mine Power: #v(strtofloat(#s(client.playerpower)));//makes player say How powerful the mine will be based on their client.playerpower string ;thing=strtofloat(#s(client.playerpower));//creates variable thing with the value of the player's power; triggeraction 0,0,serverside,Summoner,#v(thing),#v(playerx),#v(p layery);triggers the serverside action } __________________________________________________ __________ |
I am certain it would help if you formatted your scripts like ~everybody else, and used a more informative thread title. Please do so.
|
I hardly have time for that, and you mean neaten and say what each part's supposed to do? fine ill edit it
|
Get the script redone by someone who's better and use the [CODE] tags please.
|
what [CODE] tags
|
By using [CODE]
NPC Code:ofcourse. Except with a different slash.and [\CODE] |
I don't see where you're getting the parameters in the putnpc's script... not to mention that you're missing a parameter in your putnpc2, and some other issues I'll just assume are typos for simplicity's sake
|
er you cant use paramaters in putnpcs?
|
Quote:
putnpc2 imgname,x,y,{ script }; you only have two parameters before the script, and no you can't send parameters to the putnpc script, atleast not like that hmm, I worded my other post kinda weird x_x |
Check your spelling and semicolons. Also check to see if you put in everything necessary, like the putexplosion2 doesn't look complete.
|
actually the parameters was the only real problem, except, why dont shootarrow and shootfireblast ect work in putnpcs?
|
becasue putnpcs are serverside (unless it joins a class).
|
LOL you need help man
|
Who needs help? me?
|
yup your right
|
All times are GMT +2. The time now is 08:20 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.