PDA

View Full Version : MCE rain?


lorenaustin
May 9, 2020, 01:27 AM
I saw in a level, a medivo level if it helps someone, i played, and when i got onto a point, it suddenly started to rain; i was running in there, got onto another point and it stopped raining. How is that possible? I want to make that in the level i'm preparing and i don't remember how, or where did i get the 3 levels. Can someone help?

PurpleJazz
May 9, 2020, 03:18 AM
I assume you're probably referring to the level Sommerdamm (https://i.imgur.com/IMID8aM.png) by Loon (ab22ctf08.j2l (https://www.jazz2online.com/downloads/8062/anniversary-bash-22-levels/)).

If this is the case, then the rain effect is actually achieved by using AngelScript as opposed to MCEs.


void onFunction0(jjPLAYER@ play) {
jjIsSnowing = true;
}
void onFunction1(jjPLAYER@ play) {
jjIsSnowing = false;
}
This level uses Text events with the JJ2+ parameter "AngelScript" set 1 so that different TextIDs can correspond with functions in the level script file. In this instance, the level places AS-enabled Text events with ID 0 and 1 in the appropriate locations to enable and disable the rain respectively when the player touches them. jjIsSnowing (https://www.jazz2online.com/jj2plus/plus-angelscript.html#jjIsSnowing) is the name given to the global property determining if the level should currently have a weather effect or not.

Additionally worth noting that the level uses a custom rain effect as opposed to the default "bubble" rain that comes built into JJ2+. The script snippet for the more realistic-looking rain can be found here (https://www.jazz2online.com/snippets/162/realistic-rain/).

Violet CLM
May 9, 2020, 09:51 AM
It's also possible to achieve this without the use of angelscript, provided you're making a linear level and don't want the rain to turn on and off again freely as you go back and forth between the two spots.

The "JCS Events" section of the JJ2+ documentation (https://docs.jj2.plus/#jcsevents) describes (under "Feb 14 2015 Additions") some parameters you can add to the Snow event, which lets you cause rain instead of snow using the "Type" parameter, and which lets you use the Snow event to turn rain off using the "Off" parameter. (Or if you're using MLLE, those parameters are already available for you.) The snow event activates when you get near it, not when you cross over the exact tile it's on.