Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


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