The Daily Click ::. Forums ::. Klik Coding Help ::. Non-dynamic weather effects?
 

Post Reply  Post Oekaki 
 

Posted By Message

Benny Lindberg



Registered
  08/11/2010
Points
  54
6th November, 2011 at 16:34:58 -

Hi there! Is there a good way to implement non-dynamic weather effects? I mean, where each single raindrop is not an active object, but rather a big animation that loops straight down or at a slight angle? I thought about having an active object the size of the screen and having it move straight down and then wrap around the screen, but then it would go past the ground and it wouldn't look very good. Any thoughts?

 
n/a

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
6th November, 2011 at 18:01:47 -

I really like using separate active objects for this sort of thing. Raindrops, blood etc. You can make the motion appear totally random and create some really nice effects. Any reason why you wanna use 1 giant active?

Sorry, not a very helpful response

 
n/a

Benny Lindberg



Registered
  08/11/2010
Points
  54
6th November, 2011 at 18:33:17 -

The reason I wanted to use a giant active was because I thought it would save memory. Perhaps I was wrong?
The other approach I'd imagine would be to have several objects at the top that shoot the desired weather effect downwards at an angle, but the only way I thought of this was to

every 00.01
pick weathermaker at random:
weathermaker launches object in direction downleft

and then something like "if weathereffect overlaps leaves screen, destroy weathereffect.

The problem i get with this is that sometimes the same weathermaker gets chosen twice and it shoots two weathereffects, which looks very unsmooth. Also, the weathereffects arent destroyed even though they leave the frame.

 
n/a

Benny Lindberg



Registered
  08/11/2010
Points
  54
6th November, 2011 at 18:34:49 -

I really appreciate all the help you're giving me Chris!

 
n/a

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
6th November, 2011 at 20:05:39 -

Try this:

Make two objects: a Weathermaker and a Raindrop. The raindrop remains off-screen, while the Weathermaker object needs to be just above the top of the frame (like Y position -10 or so); move its action point to bottom-center. Here are three related events.

-Always
Set X Position of Weathermaker to Random(640)+1 [or whatever your screen width happens to be]
Add 1 to [Alterable Value A of Weathermaker]

-IF [Alterable Value A of Weathermaker] =/> 3
Launch Raindrop from Weathermaker at Speed 100 in [lower-left angle] direction
Set [Alterable Value A of Weathermaker] to 0

-IF Raindrop moves out of frame on the bottom
Destroy Raindrop

 
n/a

nivram



Registered
  20/07/2006
Points
  171
6th November, 2011 at 20:50:17 -

Benny. There is an example on my website:

http://www.castles-of-britain.com/mmf2examplespage11.htm

Marv

 
458 MMF2 & CTF 2.5 examples and games

http://www.castles-of-britain.com/mmf2examples.htm

The Chris Street

Administrator
Unspeakably Lazy Admin

Registered
  14/05/2002
Points
  48487

Game of the Week WinnerClickzine StaffAcoders MemberKlikCast StarVIP MemberPicture Me This Round 35 Winner!Second GOTW AwardYou've Been Circy'd!Picture Me This Round 38 Winner!GOTM December Third Place!!
I am an April FoolKliktober Special Award Tag
6th November, 2011 at 23:26:32 -

Background System Object will do what you want. I made a big tutorial on it a few years ago.

http://create-games.com/article.asp?id=1255



 
n/a

Benny Lindberg



Registered
  08/11/2010
Points
  54
7th November, 2011 at 00:11:50 -

Hey s-m-r that sounds like a good idea, except I don't stay in between certain coordinates since the map is larger than the frame, meaning that I can't use specific coordinates( it'd only rain in one spot).

The nivram example wasnt quite the rain type I was looking for ,but it was still a good one. Im going to check your tutorial Chris Street. Too bad the example files don't work.

 
n/a

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
7th November, 2011 at 01:56:09 -


Try this example:

Just made it then! http://www.whenthereisnoroominhellthedeadwalktheearth.com/MMF/rain.mfa

It also shows how to create bouncing shell projectiles. Press "shift" to fire weapon.

Image

 
n/a

Benny Lindberg



Registered
  08/11/2010
Points
  54
7th November, 2011 at 09:43:34 -

Thanks alot Chris!

 
n/a

Benny Lindberg



Registered
  08/11/2010
Points
  54
7th November, 2011 at 09:55:24 -

It was exactly what I needed, and it worked beautifully for the snow when I tried that!

 
n/a
   

Post Reply



 



Advertisement

Worth A Click