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 11-19-2001, 05:10 AM
taki taki is offline
Registered User
Join Date: Nov 2001
Location: Arizona
Posts: 30
taki is on a distinguished road
bush script

how to make the classic graal bush? i made two versions, one has a bug with the 'thow-through' attribute (kinda alternates after you touch it) and the other's "supposed" to work using the setshape2 command
NPC Code:

Bush #1:
if (created){
canbecarried;
this.bushx=x; this.bushy=y;
this.mode=1;
timereverywhere;
timeout=0.05;
}
if (timeout){
if (abs((x+.5)-(playerx+.5))<=1&&abs((playery+.5)-(y+.5))<=1) this.mode=1;
else this.mode=0;
if (this.mode==0){
dontblock;
drawunderplayer;
} else{
blockagain;
drawunderplayer;
}
timeout=0.05
}
if (washit||exploded||wasthrown){
putleaps 0,x,y;
if (!wasthrown){
bushlay=int(random(0,9));
if (bushlay==0){lay2 heart,x,y;}
if (bushlay==1){lay2 bombs,x,y;}
if (bushlay==2){lay2 greenrupee,x,y;}
if (bushlay==3){lay2 bluerupee,x,y;}
}
hide;
sleep 9;
x=this.bushx; y=this.bushy;
show;
}

==================================

Bush #2
if (created){
canbecarried;
this.bushx=x; this.bushy=y;
setshape2 2,2,{20,20,20,20};
}
if (washit||exploded||wasthrown){
putleaps 0,x,y;
if (!wasthrown){
bushlay=int(random(0,9));
if (bushlay==0){lay2 heart,x,y;}
if (bushlay==1){lay2 bombs,x,y;}
if (bushlay==2){lay2 greenrupee,x,y;}
if (bushlay==3){lay2 bluerupee,x,y;}
}
hide;
sleep 9;
x=this.bushx; y=this.bushy;
show;
}

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 09:53 PM.


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