Better (heavier + new) Weather - Printable Version +- Save-Point (https://www.save-point.org) +-- Forum: Archives (https://www.save-point.org/forum-105.html) +--- Forum: Creation Asylum Archives (https://www.save-point.org/forum-90.html) +---- Forum: Scripts & Code Snippets (https://www.save-point.org/forum-92.html) +----- Forum: RPG Maker XP Code (https://www.save-point.org/forum-93.html) +----- Thread: Better (heavier + new) Weather (/thread-6959.html) |
Better (heavier + new) Weather - Derk-Jan - 05-24-2005 This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss. No support is given. Copy and paste this above Game_Temp p.s. i combined 2 topics so you have all the info in one topic... (instead of 9 pages diveded over 2 topics...) Code: module RPG Then go to Game_Screen and replace this line: Code: @weather_max_target = (power + 1) * 4.0 with (something like...): #this wil change the *4 sprites to *50 sprites Code: @weather_max_target = (power + 1) * 50.0 This is how many sprites will appear at each power level. So currently, 100 sprites at level 1 and 500 sprites at level 9. Changes are preceded by #**** ccoa ****, so if it's too heavy (or too light), then you can find them to fiddle with them. Hope that helped! ----------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- 1. If you want too let the rain fall straight... Look at this code: Code: if @type == 1 remove the line changing the x coordinates of the rain, like so: Code: if @type == 1 And the rain should fall straight down. ----------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- 2.Example how too created NEW weathers or make others different... Code: ...@snow_bitmap.fill_rect(2, 1, 2, 4, color1) Here's a very simple cherry blossom petal: Code: color3 = Color.new(255, 167, 192, 255) # light pink Should make: <---It's tiny, but there's an image there... Now look at this case statement: Code: case @type add a new case, like so: Code: case @type Under this: Code: if @type == 3 add: Code: if @type == 4 Now, to call a sakura shower, do a Call Script with the following: Code: $game_screen.weather(4, intensity, transition_time) Where intensity is a number from 0 to 9 (0 is no weather), and transition_time is the transition, in frames, between the current weather and the new weather. ----------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- 3. To add lighting too storm... search for Code: if @type == 2 replace with Code: #============== ----------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- 4.mixed weather Now, to mix weather effect, you'll need to set it up so that some of the sprites' bitmaps are set to one type, and one to another. To make mixed rain and snow, for example, add a new case to the switch statement, and edit it like so: Code: case @type Now go to this for statement: Code: for i in 1..500 The 500 may be a different number, depending on if you've changed this line. Rewrite it like this: Code: count = 0 This will produce half rain and half snow. For 1/3 rain, 2/3 snow, change the line Code: if count % 2 == 0 # every other sprite is rain. to: Code: if count % 3 == 0 # every third sprite is rain. This is just hard-coded for rain and snow, but hopefully it gives you an idea for other things. Now, to call mixed rain and snow, do a Call Script with the following: Code: $game_screen.weather(4, intensity, transition_time) ----------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- Mr. DJ |