I'm not sure. I do know that ever drop can leave a decal. But after a few hundred decals the game begins to slow down. I tried it with blood. Looked very apocalyptic.Timbles wrote:Is it possible to make each rain particle make a splash effect when they reach the ground?
[Scripts] Rain and Snow
Re: [Scripts] Rain and Snow
Re: [Scripts] Rain and Snow
I tried that to, even tried rain that leaves blood lines on you when the particle hits you, it looked really cool.Gyrth wrote:I'm not sure. I do know that ever drop can leave a decal. But after a few hundred decals the game begins to slow down. I tried it with blood. Looked very apocalyptic.Timbles wrote:Is it possible to make each rain particle make a splash effect when they reach the ground?
Problem with decals are that we need to delete the decals over time somehow to free up some memory for better performance.
It may be possible to make splash particle appear once the rain hit the ground, but i don't know how, at least right now.
Re: [Scripts] Rain and Snow
It's pretty simple. Just put two <Script></Script> in the xml file. Although the order does seem to matter. First the level script and then the rain or snow script. Only then do they both work.Timbles wrote:If I ever make a Therium-2, I'm gonna have it snow.
Or rain.
Or have it just do both.
Gyrth, can you give us an example of what 2 level scripts would look in the level .xml?
-
Roter_Fuchs
- Posts: 5
- Joined: Mon Dec 31, 2012 3:26 pm
Re: [Scripts] Rain and Snow
Not really. I've tried the rain mod in Stucco Courtyard Arena. Added the script tags to the xml file. Apart from the fact that the script does not work there because in your code you assume that the character number is 0 (it actually varies), the order is imporant, but doesn't really fix any problems. If your script comes before the test_custom_level.as it does not rain.Gyrth wrote:It's pretty simple. Just put two <Script></Script> in the xml file. Although the order does seem to matter. First the level script and then the rain or snow script. Only then do they both work.Timbles wrote:If I ever make a Therium-2, I'm gonna have it snow.
Or rain.
Or have it just do both.
Gyrth, can you give us an example of what 2 level scripts would look in the level .xml?
If your script comes after the test_custom_level.as, it rains. But the test_custom_level.as is not being loaded (thus breaking the logic).
My guess is whatever script comes last overwrites the Init, HasFocus, DrawGUI and Update functions and is the only one being executed.
A possible solution is taking the code from your update function and adding it the update function of the test_custom_level.as, but that's just messing up the core code.
I have just very recently started taking a look into modding this game, so there are probably a lot of better ways to determine the player character, but this is a quick fix I have found:
Code: Select all
int num_chars = GetNumCharacters();
for(int i=0; i<num_chars; ++i){
MovementObject@ char = ReadCharacter(i);
...
}/€dit: Just tested it with Grass Beach (versus). Everything is working there if you include the rain.as last. Double checked on Stucco Courtyard Arena, still broken. I really love weird and inconsistent behaviour in programming, always so fun to debug that stuff.
Re: [Scripts] Rain and Snow
I've added these to the community content browser.
However, I did get some errors on the rain one:
They aren't even referring to your own scripts, so I don't know what the issue is.
Otherwise, nice work.
However, I did get some errors on the rain one:
They aren't even referring to your own scripts, so I don't know what the issue is.
Otherwise, nice work.
Re: [Scripts] Rain and Snow
Sorry for being such a noob, but what do I exactly need to add to the .xml files? Cuz I tried adding the files but it didn't work, It's probably me doing shit though.
Re: [Scripts] Rain and Snow
Nevermind, I know what to do, but the rain takes out the music from the map, Is that supposed to happen?Ogaito wrote:Sorry for being such a noob, but what do I exactly need to add to the .xml files? Cuz I tried adding the files but it didn't work, It's probably me doing shit though.
Re: [Scripts] Rain and Snow
It probably stops because your computer can't handle to play so much sound effectd at the same time
-
Thomason1005
- Posts: 712
- Joined: Sat Apr 20, 2013 7:44 am
- Location: GerMany
Re: [Scripts] Rain and Snow
theres some priority thing for sounds that should avoid this, s.o. Might have to change the priority of the drop soundslast wrote:It probably stops because your computer can't handle to play so much sound effectd at the same time
i cant help as it doesnt run at all for me..
Re: [Scripts] Rain and Snow
Hmm.... If you're talking about setup, I'm pretty sure my computer is not the problem, so I have no idea how to solve thislast wrote:It probably stops because your computer can't handle to play so much sound effectd at the same time
Re: [Scripts] Rain and Snow
Ok, i may have been wrong. It looks like when there isn't this script line in the level then there isn't any background music either.
It's explained here.
Code: Select all
<Script>Data/Scripts/challengelevel.as</Script>It's explained here.
And looks like there can't be 2 different scripts running side by side.I've tried the rain mod in Stucco Courtyard Arena. Added the script tags to the xml file. Apart from the fact that the script does not work there because in your code you assume that the character number is 0 (it actually varies), the order is imporant, but doesn't really fix any problems. If your script comes before the test_custom_level.as it does not rain.
If your script comes after the test_custom_level.as, it rains. But the test_custom_level.as is not being loaded (thus breaking the logic).
My guess is whatever script comes last overwrites the Init, HasFocus, DrawGUI and Update functions and is the only one being executed.
A possible solution is taking the code from your update function and adding it the update function of the test_custom_level.as, but that's just messing up the core code
Re: [Scripts] Rain and Snow
Two ideas for this:
1. Constant loop sound effect for the rain instead of individual drops
2. Snow particles to stick on the ground for 2 seconds, then fade
Otherwise, I wonder if someone can make assets for snow to be placed (other then decals)?
1. Constant loop sound effect for the rain instead of individual drops
2. Snow particles to stick on the ground for 2 seconds, then fade
Otherwise, I wonder if someone can make assets for snow to be placed (other then decals)?
-
Thomason1005
- Posts: 712
- Joined: Sat Apr 20, 2013 7:44 am
- Location: GerMany
Re: [Scripts] Rain and Snow
i still had errors when loading the map (compiling the glsl shader)
is it by david or you?
it used min(float, vec3) and max(float, vec3), but my graphics card or whatever doesnt allow different var types in there
i fixed it to make it work on my pc:
4. rendering more distant/more snowflakes with some kind of moving texture
i think 2. requires collision detection, if it was there, these were nice too:
5. splashes from drops hitting the ground
7. not falling through objects
6. changed albedo on wet surfaces (maybe with some kind of decal)
it should be possible, as blood basically does the same
is gyrth still working on this or is it up to us to make updates?
is it by david or you?
it used min(float, vec3) and max(float, vec3), but my graphics card or whatever doesnt allow different var types in there
i fixed it to make it work on my pc:
3. snowflakes not being circlesTimbles wrote:Two ideas for this:
1. Constant loop sound effect for the rain instead of individual drops
2. Snow particles to stick on the ground for 2 seconds, then fade
Otherwise, I wonder if someone can make assets for snow to be placed (other then decals)?
4. rendering more distant/more snowflakes with some kind of moving texture
i think 2. requires collision detection, if it was there, these were nice too:
5. splashes from drops hitting the ground
7. not falling through objects
6. changed albedo on wet surfaces (maybe with some kind of decal)
it should be possible, as blood basically does the same
is gyrth still working on this or is it up to us to make updates?
Re: [Scripts] Rain and Snow
Haha! Sweet! Thanks Thomason1005 for that fix, it worked for me too. 
Re: [Scripts] Rain and Snow
Snow update 24 December 2013
When the character runs, the velocity changes the spawnpoint of the particles.
When the character falls, the spawnpoint is under the character.
1 in 2 particles leaves a decal of snow. They remove every 5 seconds.
Only controlled player characters have snow fall on them.
When the character runs, the velocity changes the spawnpoint of the particles.
When the character falls, the spawnpoint is under the character.
1 in 2 particles leaves a decal of snow. They remove every 5 seconds.
Only controlled player characters have snow fall on them.