Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Clouds (https://forums.graalonline.com/forums/showthread.php?t=24320)

nyghtGT 02-22-2002 02:39 PM

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, :D. I know this script is very basic but does it seem to be ok for my purposes ?

btedji 02-22-2002 09:34 PM

Can you attach smoke.gif please, I had to switch computers so I lost some of my images

BTW: Your PM inbox is full :(

Tommy2000 02-22-2002 10:58 PM

1 Attachment(s)
here ye go

neomaximus2k 02-22-2002 11:11 PM

Re: Clouds
 
Quote:

Originally posted by nyghtGT
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, :D. I know this script is very basic but does it seem to be ok for my purposes ?

Yes it does, but you might want to have a varying speed for different clouds

Saga2001 02-22-2002 11:34 PM

don't be retarded, use arrays.

TDK_RC6 02-23-2002 06:58 AM

arrays would work best, but randomize it though

zallus-k 02-23-2002 08:00 AM

1 Attachment(s)
Want a better cloud graphic? Here:

You should make it translucent, but then put a whole lot of them at one place and randomize the speeds.

nyghtGT 02-23-2002 08:54 AM

Quote:

Originally posted by Saga2001
don't be retarded, use arrays.
i'm not, its just at 2AM in the morning i'm not thing about the best syntax thats why I came here and let you guys remind me ....

zell12 02-23-2002 09:04 AM

Quote:

Originally posted by zallus-k
Want a better cloud graphic? Here:

You should make it translucent, but then put a whole lot of them at one place and randomize the speeds.


Thats from RPG Maker o.o

nyghtGT 02-23-2002 09:08 AM

Quote:

Originally posted by zallus-k
Want a better cloud graphic? Here:

You should make it translucent, but then put a whole lot of them at one place and randomize the speeds.

thats great, i wanted it to more cartoon like, ALl it is so far is a troll dude comes out and does some arobics ...

TDO2000 02-23-2002 06:47 PM

Re: Re: Clouds
 
Quote:

Originally posted by neomaximus2k


Yes it does, but you might want to have a varying speed for different clouds

why should they have different speed? wind blows the same speed for every cloud...

nyghtGT 02-23-2002 07:36 PM

Re: Re: Re: Clouds
 
Quote:

Originally posted by TDO2000


why should they have different speed? wind blows the same speed for every cloud...

well I was thinking, in response to what neomaximus said, I could have foreground clouds moving faster then clouds further behind them ...

neomaximus2k 02-23-2002 07:41 PM

Re: Re: Re: Clouds
 
Quote:

Originally posted by TDO2000


why should they have different speed? wind blows the same speed for every cloud...

Someone didn't pay much attention in geography did they!!!
the wind is not a constant speed all over, clouds move at vary speeds due to their height in the atmosphere, i could go into it but there aint much point!
if wind was a constant thing then dont you think that everywhere around the world the wind would be exactly the same???

(reminds you about warm and cold fronts)

Ultima_P2P 02-23-2002 07:49 PM

I have yet to see a Graalian Movie in a graal level.
I hope I get to see this sometime. :)

- Ultima

nyghtGT 02-23-2002 08:17 PM

Quote:

Originally posted by Ultima_P2P
I have yet to see a Graalian Movie in a graal level.
I hope I get to see this sometime. :)

- Ultima

it will be posted in the Main Graal forum in 1-2 weeks, i'm waiting on graphix ...

TDO2000 02-23-2002 09:01 PM

Re: Re: Re: Re: Clouds
 
Quote:

Originally posted by neomaximus2k


Someone didn't pay much attention in geography did they!!!
the wind is not a constant speed all over, clouds move at vary speeds due to their height in the atmosphere, i could go into it but there aint much point!
if wind was a constant thing then dont you think that everywhere around the world the wind would be exactly the same???

(reminds you about warm and cold fronts)

not around the world but here the clouds are at the same height and at the same place so => same speed

neomaximus2k 02-24-2002 07:47 AM

Re: Re: Re: Re: Re: Clouds
 
Quote:

Originally posted by TDO2000

not around the world but here the clouds are at the same height and at the same place so => same speed

OMG LOL clouds are not all at the same height

TDO2000 02-24-2002 08:29 AM

Re: Re: Re: Re: Re: Re: Clouds
 
Quote:

Originally posted by neomaximus2k

OMG LOL clouds are not all at the same height

:rolleyes:

In this level *hint hint* the clouds are at the same high. I do not mean th real world...

btedji 02-24-2002 10:43 AM

It does not have to be ultra complex, its just clouds!!

nyghtGT 02-24-2002 12:05 PM

Quote:

Originally posted by btedji
It does not have to be ultra complex, its just clouds!!
amen ...

toad1413 02-25-2002 03:49 PM

Re: Re: Re: Re: Re: Re: Re: Clouds
 
Quote:

Originally posted by TDO2000


:rolleyes:

In this level *hint hint* the clouds are at the same high. I do not mean th real world...

well, no, he's got you again.

You could have the level like this:

<cloud>
<cloud>
<cloud>

-----------------------------------

note the 'clouds' at different heights.

[edit]the clouds were at different spots, not ontop of each other in the text box. :( [/edit]

Saga2001 02-25-2002 10:23 PM

hahaha i have this ub3r l33t weather system, it has all 4 seasons, and it has cool things like in winter, snow can do flurries, where it does a quick circle and returns to its normal path, like its wind blown.

neomaximus2k 02-26-2002 03:09 PM

Re: Re: Re: Re: Re: Re: Re: Re: Clouds
 
Quote:

Originally posted by toad1413


well, no, he's got you again.

You could have the level like this:

<cloud>
<cloud>
<cloud>

-----------------------------------

note the 'clouds' at different heights.

[edit]the clouds were at different spots, not ontop of each other in the text box. :( [/edit]

MUWHAHAHAHAHAHAHAHAHAHAH
erm how did we get into an argument about clouds?
and dude you never said in the level at first so :P

nyghtGT 02-27-2002 05:06 AM

JEZUS !

This was just about clouds, it did not have to turn into a wrong/right contest ....

neomaximus2k 02-27-2002 08:00 PM

Quote:

Originally posted by nyghtGT
JEZUS !

This was just about clouds, it did not have to turn into a wrong/right contest ....

*points finger at you* I AM RIGHT YOU ARE WRONG
MUWHAHAHAHAHAHAHAHAH
thats a joke before you all find out where i live and try and beat me up
*hides*


All times are GMT +2. The time now is 05:59 AM.

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