Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Rataime's Water Reflection Script

I noticed a lot of the posts were hacked, so searching didn't really help me. I checked the scripts archive and couldn't find it. Does anyone have this script? If you do, can you please post it with instructions. Thanks!
 
It's in the demos/tutorial archive in the downloads section, as uploaded by Berserker. Multi-script demo or something, with shadows, reflections, etc.

I couldn't find any instructions though. If you find any, lemme know :)
 
Right. Well, reflections are triggered by

"comment: r"

But I don't know how it knows what to put reflections IN. It's something to do with how the tile is placed, it seems - like the same tile on top of the exact same tile, somehow does it, or something.

Shadows are easier to understand. If you check the comments of the character events, it says something like

comment: shadows

And if you check the events of the lights themselves (like the lamps or the campfires) it has three variables written in the comments - I think they're distance, arc width and something else I forget. Basically you just copy those comments and experiment with them. I keep meaning to do it, but I'm worried it'll conflict with Dubealex's Advanced Message Script (I haven't tested it yet).

Let me know how it goes.
 
In the event you want your light source to be, your comments are:

begin Shadow Source
anglemin(x)
anglemax(x)
distancemax(y)
x = any number between 0 and 360, i think you can do neg. numbers too.
y = the distance you want your shadows to go. Default is 300.
 
1.) For the Reflection, first insert the script. I forgot to do that and I got really ticked off! :D
2.) You set the terrain of the water tile to 7.
3.) Make an event on each map with water with the comment "hero_r". Make that event a Parallel Process. This makes the hero's reflection.
4.) For every event with a reflection, put a comment as the first command saying "r".

That should be it!
There's an autotile in the demo that improves the effect of the reflection. It's settings in the database are no passiblity, and it's Priority 1. Hope that helps!
 
Awesome :) when I looked through at all the terrain tiles, I just didn't see "7" - I kept looking but must've seen right through it! Doh, I was looking at Marsh instead of Dark Forest :P hehe.

What about if you want to have reflections in mirrors? There was this weird extra bit of the tileset that I didn't understand which seemed to be related to mirrors.

Oh wait, there's Dynamic Shadows, Sun Effect, Mirror Effect, Reflection Effect - they're each a different script? So... reflections are for water. Dynamic Shadows are for lights... and Sun Effects would be more for outdoor sun effect to hold a shadow steady, I suppose? Have you put in the Sun Effect and Mirror Effect as well?

Anyway, awesome! Shadows are working! Not sure how to stop them going through walls. Weaker effects maybe. Heh. And I see how to get water reflections working now and all. That's fantastic. :)

I wonder how to make the reflections weaker. Eh, I can fuss about that later, this is just great. Thanks!

Edit: Heh, it's a real shame how it works for some things... like a side view of a ship on water, that reflects just fine. But go head to head, and the thing inverts entirely! *laughs* As do shadows. But whatever, it has so many other uses :)
 

creiz

Member

Hmmm, yes... nice scripts indeed.

i was wondering, the mirror script is broken, eh? i can't get the mirrors reflect my party members, with the caterpillar script. is there a way to make it work?
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top