Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-07-2004, 12:21 PM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
NPCServer bug: Projectiles?

I have noticed that on a few servers projectiles don't seem to work right.

I PMed Stefan about the problem on one PW when it occured, but I never heard back.

Heres the problem:
Serversided actionprojectile/actionsprojectile seem to call before a projectile actually hits something. Now randomly it WILL work but usually it doesn't.

I have found that if you add a "zangle" and "power" to the projectile it work fine, otherwise it doesn't.

Scripts used for testing:
weapon: Projectile/Test-1
NPC Code:
//#CLIENTSIDE
if (weaponfired) {
setshootparams test;
shoot playerx,playery,playerz,
getangle(vecx(playerdir),vecy(playerdir)),
0,0,
gralats,1;
}


This one seems to call before it hits, shortly after its fired.

weapon: Projectile/Test-2
NPC Code:
//#CLIENTSIDE
if (weaponfired) {
setshootparams test;
shoot playerx,playery,playerz,
getangle(vecx(playerdir),vecy(playerdir)),
0.7,1.5,
gralats,1;
}


This one calls when it lands like it's supposed to.

DB-NPC: Control-NPC
NPC Code:
if (actionprojectile || actionsprojectile) {
if (strequals(#p(2),test)) {
this.x = strtofloat(#p(0));
this.y = strtofloat(#p(1));
setplayerprop #c,Projectile: (#v(this.x),#v(this.y)) Player pos: (#v(playerx),#v(playery))
}
}

Reply With Quote
  #2  
Old 03-12-2004, 07:05 AM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
works fine for me
try this in a weapon
NPC Code:

//#CLIENTSIDE
if (created) {
timeout = .05;
}
if (timeout) {
if (onwall(mousex,mousey)) {
setplayerprop #c,WALL!!!;
}else{setplayerprop #c,clear;}
timeout = .05;
}


that's all I can think of right now
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #3  
Old 03-12-2004, 09:59 PM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Well after further testing i found it to be only bugging in some levels, however looking at the levels nothing is wrong...

Edit: Also only the serverside actionprojectile is messing up, thats why i said "NPCServer bug?"
Reply With Quote
  #4  
Old 03-14-2004, 11:07 PM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Problem solved, you can close this if needed.

newtilesets=true was inside server options when it shouldn't have been.

Although i thought the NPCServer only applied that to the levels or levelstart inside the newtilesetlevels= option. apparently it doesn't.
Reply With Quote
Reply


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 02:09 AM.


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