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!

Join the forum, it's quick and easy

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!
Would you like to react to this message? Create an account in a few clicks or log in to continue.
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: https://gameml.forumotion.com/GameML-File-Sharing-h3.htmPlease add only games.
Create A GAMEML BLOG!
Make a Blog on GameML:http://gamemlblogs.wetpaint.com

Simple 2D Rain Code-Lite

2 posters

Go down

Simple 2D Rain Code-Lite Empty Simple 2D Rain Code-Lite

Post by -js1210- 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)
-js1210-
-js1210-
Super 500 GML
Super 500 GML

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

http://www.yoyogames.com/members/js1210

Back to top Go down

Simple 2D Rain Code-Lite Empty Re: Simple 2D Rain Code-Lite

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

does this need Pro?
Vision123
Vision123
GameML Noob
GameML Noob

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

http://www.yoyogames.com/members/Vision123

Back to top Go down

Simple 2D Rain Code-Lite Empty Re: Simple 2D Rain Code-Lite

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

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

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

http://www.yoyogames.com/members/js1210

Back to top Go down

Simple 2D Rain Code-Lite Empty Re: Simple 2D Rain Code-Lite

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

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