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-22-2002, 02:39 PM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Clouds

Here is a little script I made for an little Graal Omive i am making:
NPC Code:

NPC Code:

// NPC made by NyghtGT
if (created) {
setimg smoke.gif;
this.speed=0.2; // Increase to go faster
this.startx=x;
this.starty=y;
timeout=1;
drawoverplayer;
dontblock;
}
if (timeout) {
x-=this.speed;
updown();
if (this.updown=1) {
y=y;
} else {
if (this.updown=2) {
y-=0.2;
} else {
y+=0.2;
}
}
poscheck();
timeout=0.12;
}
// Functions
function updown() {
this.updown=int(random(0,3));
}
function poscheck() {
if (x<=2) {
x=62;
y=int(random(0,64));
sleep 1;
this.x=x;
this.y=y;
}
}




I had to use smoke.gif for know till i can make me some better cloud images. But what it does is the movie starts and the clouds come in ... and blah blah blah, you'll just have to wait, . I know this script is very basic but does it seem to be ok for my purposes ?
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 10:52 PM.


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