Graal Forums  

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

 
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 07-15-2001, 05:44 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
Trouble

Ok. I made a firework weapon that places those bee fireworks on the ground. I used putnpc2 to do it. Here is my code:
NPC Code:

// NPC made by Boco
if (playerenters || created) {
message Bee;
}
if (playerchats && strequals(#c,buy bee)) {
if (playerrupees>=5) {
playerrupees-=5;
toweapons Bee;
setstring client.Firework_Bee_Count,#v(strtofloat(#s(client. Firework_Bee_Count))+5);
} else {
say2 You don't have enough Gralats!;
}
}
if (weaponfired) {
setplayerprop #c,#s(client.Firework_Bee_Count);
putnpc2 playerx+vecx(playerdir)*2, playery+vecy(playerdir)*2, {
if (created) {
message Bee;
showcharacter;
dontblock;
setcharani bravo_firework_bee,;
sleep 0.95;
this.x=random(-1,1);
this.y=random(-1,1);
for (this.time=0.95;this.time<1.85;this.time+=0.1) {
if (this.time<1.2) { hitobjects 0.5,x+1.5,y+2; }
this.x+=random(-0.5,0.5);
this.y+=random(-0.5,0.5);
move this.x,this.y,0.1,1;
sleep 0.1;
}
move this.x,this.y,0.55,1;
sleep 1;
destroy;
}
};
setstring client.Firework_Bee_Count,#v(strtofloat(#s(client. Firework_Bee_Count))-1);
if (strtofloat(#s(client.Firework_Bee_Count))==0) { destroy; }
}
//#CLIENTSIDE
if (created) {
setimgpart bravo_firework_bee.gif,0,0,16,16;
}


Ok. The putnpc2 part of the code doesn't work. The script seems to halt completely at that part of the code. I know this because it won't subtract the string 'client.Firework_Bee_Count' by 1. Can anyone help me in getting this to work? Thanks.
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
  #2  
Old 07-15-2001, 06:07 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
you can't use putnpc2 in a clientside NPC (or weapon for that matter)
  #3  
Old 07-15-2001, 06:14 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
-_-' So, can you use ANY type of putnpc command inside of a weapon?
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
  #4  
Old 07-15-2001, 06:20 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
uhm...not really...you have to use the server cnpc...it's not that complicated, just a little bit tricky to get working well...
ICQ# 61900933, I can probably give you some help. I'm assuming you have an NPC server to test with and know what the server control-NPC is right?
  #5  
Old 07-15-2001, 06:24 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
Yep, but NC isn't loading currently...
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
 


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 09:14 PM.


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