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 11-20-2005, 08:26 PM
protagonist protagonist is offline
Banned
protagonist's Avatar
Join Date: May 2003
Location: CAW
Posts: 5,586
protagonist is on a distinguished road
Send a message via AIM to protagonist Send a message via MSN to protagonist
Do the lights!

Post your light effects:

NPC Code:

// NPC made by VT
if (created) {
timeout=.05;
this.angle=.1;
drawoverplayer;
}
if(timeout){
timeout = .05;
this.angle+=.2;
for(j=0;j<50;j++){
showimg j-2,light2.png,x+cos(this.angle),y+4*sin(this.angle) ;
changeimgcolors j-2,.1,.5,.1,.9;
changeimgzoom j-2,.4;
showimg j-3,light2.png,x-cos(this.angle/j),y-5*sin(this.angle);
changeimgcolors j-3,.5,.5,.1,.9;
changeimgzoom j-3,.4;
showimg j-4,light2.png,x-4*cos(1/2*this.angle/2*j),y-5*sin(this-angle);
changeimgcolors j-4,.5,.1,.1,.9;
changeimgzoom j-4,.1;
}
x+=3*cos(this.angle);
y+=.5*sin(this.angle);
}

/*original stuff which is now unused
showimg j-1,light2.png,x+4*cos(this.angle),y+sin(this.angle) ;
changeimgcolors j-1,.5,.1,.2,.9;
changeimgzoom j-1,.1;
/*




Have fun with them.
Reply With Quote
  #2  
Old 03-31-2006, 02:08 AM
Gothiclette Gothiclette is offline
Registered User
Gothiclette's Avatar
Join Date: Feb 2006
Posts: 2
Gothiclette is on a distinguished road
Cool

Thats cool

unfourtanetly (SP?)
i dont have any light effects
but i did edit yours to go in a circle
i made one clockwise and counter clockwise
__________________
RIP Shawn Noel
Reply With Quote
  #3  
Old 03-31-2006, 02:45 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
PHP Code:
function onCreated() {
  if (
params[0] == "wind") {
    
this.la = new[8];
    
this.lz = new[8];
    
this.ls = new[8];
    
this.lm = new[8];
    
this.lr = new[8];
    
this.lu 0;
    
this.ll 0;
  }
  
setTimer(.05);
}
function 
onTimeout() {
  if (
this.lu == 0NewLeaf();
  
this.lu = (this.lu 1) % 6;
  for (
08a++) {
    if (
this.ls[a] > 0) {
      
this.la[a] += this.lm[a];
      
this.lz[a] += this.ls[a];
      
showimg2(a,"leaf1.png",player.sin(this.la[a]) * 1.5,player.cos(this.la[a])*.5player.this.lz[a]);
      
findimg(a).zoom .75;
      
findimg(a).rotation += this.lr[a];
      if (
a%== 0) {
        
findimg(a).image "light2s.png";
        
findimg(a).red findimg(a).blue 0;
        
findimg(a).green 1;
        
findimg(a).alpha .9;
        
findimg(a).zoom .5;
      }
      if (
this.la[ain |1.57,4.71|) findimg(a).layer 0;
      else 
findimg(a).layer 2;

        
      if (
this.lz[a] > 3.5this.ls[a] = 0;
    }
    else 
hideimg(a);
  }
}

function 
NewLeaf() {
  
this.la[this.ll] = random(0,6.28);
  
this.lz[this.ll] = 0;
  
this.ls[this.ll] = random(.03,.1);
  
this.lr[this.ll] = random(0,.5);
  
this.lm[this.ll] = random(.3,.6);
  
this.ll = (this.ll+1) % 8;

Yep.. I have like ~60 ganis with light effects in them..
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 03:20 PM.


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