Hello, thanks for visiting GameML, if you are a Game Maker user, this is the site for you, please sign up, or login if you are already a member, or just browse the site! Welcome to GameML!

ATTENTION MEMBERS!!! USERS CAN NOW SIGN UP AGAIN!
Log in

I forgot my password

Search
 
 

Display results as :
 


Rechercher Advanced Search

Site Hits
Free hit counter
These stats started at 0 on July 7th 2009
GameML File Sharing
USERNAME: gamemladmin@gmail.com PASSWORD: gamemlsite Upload Here: http://gameml.iowoi.org/GameML-File-Sharing-h3.htmPlease add only games.
Create A GAMEML BLOG!
Make a Blog on GameML:http://gamemlblogs.wetpaint.com
Keywords


Simple 2D Rain Code-Lite

View previous topic View next topic Go down

Simple 2D Rain Code-Lite

Post by -js1210- on Sun Jul 05, 2009 8:55 pm

This is actually in my tutorial that I created, but it is not in code format there. First you need to have only 2-3 objects for this. An rain object and an object that creates the rain, also might need an object for the rain particle hitting the ground.

Rain creator step code:
Code:
instance_create(random(roomwidth+30),0,rainparticle) //This creates rain randomly across the room

Now the rainparticle's object creation code:
Code:
motion_set(-110,35.5) //So simple just change 1st # to change direction, 2nd # to change speed

The rainparticle's collision(with ground) code. There are 2 options here you can:
Code:
instance_destroy() //This is if there is no animation for the rain hitting the ground(not suggested as it makes the game look cheap)
OR

Code:
instace_change(rainsplash,1) // changes into rain animation

If you choose the second option, then you will need a object for the rain splash, so here it is.

Creation code:
Code:
action_sprite_set(spr_rainsplash,0,0.2) //just adjust the speed(3rd #) until there are satisfactory results

Animation End code:
Code:
instance_destroy()

So that's that Smile Hope this help's out beggining Game Makers. If you need any help understanding this then ask.


Last edited by -js1210- on Wed Jul 22, 2009 7:02 pm; edited 1 time in total (Reason for editing : Stated that it was Lite compatable)
avatar
-js1210-
Super 500 GML
Super 500 GML

Posts : 1298
Points : 32122
GameML Reputation : 27
Join date : 2009-06-02
Age : 22
Location : United States

View user profile http://www.yoyogames.com/members/js1210

Back to top Go down

Re: Simple 2D Rain Code-Lite

Post by Vision123 on Wed Jul 22, 2009 5:33 pm

does this need Pro?
avatar
Vision123
GameML Noob
GameML Noob

Posts : 40
Points : 29723
GameML Reputation : 1
Join date : 2009-07-09
Age : 21
Location : dancin in the desert blowin up the sunshine

View user profile http://www.yoyogames.com/members/Vision123

Back to top Go down

Re: Simple 2D Rain Code-Lite

Post by -js1210- on Wed Jul 22, 2009 7:01 pm

No Pro is not needed at all
avatar
-js1210-
Super 500 GML
Super 500 GML

Posts : 1298
Points : 32122
GameML Reputation : 27
Join date : 2009-06-02
Age : 22
Location : United States

View user profile http://www.yoyogames.com/members/js1210

Back to top Go down

Re: Simple 2D Rain Code-Lite

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum