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 02-23-2009, 02:55 AM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
Cool theres somthing wrong with my gun script

PHP Code:
//#CLIENTSIDE

if (weaponfired){
clientr.m16=1;}
{if(
clientr.m16=1);

function 
onKeyPressedcodekey ) {
  if ( 
key == "g" ) {
    
setshootparams PARAMEQUALS;
  
//shoot x,y,z,angle,zangle,power,gani,ganiparams;
  
shoot this.x,this.y,playerz,(playerdir 1) * pi 2,,,shuriken,;
  
setani dg_m16-fire,;
  
replaceani idle,dg_m16-idle;
  
replaceani walk,walk;
  
freezeplayer 0.0383;
  
sleep 0.1;

  
//up
if (playerdir=0)
  
this.x=playerx-1;
  
this.y=playery-2;

//left
if (playerdir=1)
  
this.x=playerx-2;
  
this.y=playery;

//down
if (playerdir=2)
  
this.x=playerx+1;
  
this.y=playery+2;

//right
if (playerdir=3)
  
this.x=playerx+2;
  
this.y=playery;


if (
actionprojectile) {
  if(
strequals(#p(index),PARAMEQUALS)) {
  
}}}}} 
ok ill explan whats wrong with it


its like this if i turn it on then shoot it shoots where i stand

when i move to a difrent spot it shoots from the same spot that i shot from
when i fire it again
until i shoot again

ok ill show you what i mean

heres a pic


it goes from this

]to this






so its from


the first pic


to the second pic


up to down
Attached Thumbnails
Click image for larger version

Name:	New Bitmap Image (2).PNG
Views:	446
Size:	70.5 KB
ID:	47510   Click image for larger version

Name:	New Bitmap Image 1.PNG
Views:	458
Size:	72.1 KB
ID:	47511  
Reply With Quote
 


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 06:49 PM.


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