Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-06-2004, 05:47 PM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
Question 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
}
__________________________________________________ __________

Last edited by falco10291029; 06-06-2004 at 07:42 PM..
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:56 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.