Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-31-2006, 07:14 AM
Omini Omini is offline
Millenium Owner
Join Date: Feb 2006
Location: N.Ireland
Posts: 293
Omini is on a distinguished road
Send a message via AIM to Omini Send a message via MSN to Omini Send a message via Yahoo to Omini
Shoot to GS2?

Is there any specific method that shoot is to be done in GS2? I used the same shoot and setshootparams in GS1, but I'm unsure how to do it in GS2.

This is what I have.

NPC Code:
function shoot()
{
freezeplayer(0.65);
setani millenium_cx-fire,;
client.cxclip -= 1;
this.angle = getangle(vecx(playerdir),vecy(playerdir));
this.dx = playerx+vecx(playerdir)*2;
this.dy = (playery-.5)+vecy(playerdir)*2.5;
//Setting Shoot Params
setshootparams #w,this.gunpow;
//Shooting Bullets
shoot this.dx,this.dy,playerz,this.angle+random(this.max angle*-1,this.maxangle),0,0,"millenium_bullet",;
shoot this.dx,this.dy,playerz,this.angle+random(this.max angle*-1,this.maxangle),0,0,"millenium_bullet",;
shoot this.dx,this.dy,playerz,this.angle+random(this.max angle*-1,this.maxangle),0,0,"millenium_bullet",;
shoot this.dx,this.dy,playerz,this.angle+random(this.max angle*-1,this.maxangle),0,0,"millenium_bullet",;
shoot this.dx,this.dy,playerz,this.angle+random(this.max angle*-1,this.maxangle),0,0,"millenium_bullet",;
shoot this.dx,this.dy,playerz,this.angle+random(this.max angle*-1,this.maxangle),0,0,"millenium_bullet",;
}



I'm guessing there's a problem in there because it worked fine in GS1, and it's setting the players gani animation as well as taking the bullet away but the bullets arent shooting. Any helpful advice/tips (NB: Tryial and ApothiX - read bolded part twice to make sure you understand. That means don't ***** at each other in this thread.) are appreciated.



Edit:

Oh, I found it useful removing the quotations from the gani name, heh heh heh. On another note - is there a GS2 version of shoot? If so, what is it (If someone would be so kind as to tell me.)
__________________



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 02:21 PM.


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