Graal Forums  

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

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-19-2002, 06:58 AM
ArchOwl ArchOwl is offline
KHERRUPTED SHROOM
ArchOwl's Avatar
Join Date: Aug 2001
Location: SOMEWHERE, DAMNIT
Posts: 2,464
ArchOwl is on a distinguished road
Send a message via AIM to ArchOwl Send a message via Yahoo to ArchOwl
Quote:
Originally posted by TDO2000
u need to do showimg and hitplayer/hitobjects or just a triggeraction to attack (I had the best results with triggeraction)

something like:
NPC Code:

if(weaponfired && this.active==0){
this.xy={playerx,playery};
this.dir=playerdir;
this.distance=0;
this.maxdis=15;
this.active=1;
timeout=.05;
}

if(timeout){
if(this.distance < this.maxdis){
this.distance++;
this.xy[0]+=vecx(this.dir);
this.xy[1]+=vecy(this.dir);
showimg 1,yourprojectile.gif,this.xy[0],this.xy[1];
hitobjects 1,this.xy[0],this.xy[1];
}
else {this.active=0;}
if(this.active==1){timeout=.05;}
}



could be shorter but this should show u how to do it...
hmm, see the things im going to make are basically fireball clones except for the size/width of the blast (they are guns)
__________________

DDR Videos.
More DDR Videos.
Closed Thread


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 01:58 AM.


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