Working on a Nightvision Mode. Objects not tinting?

Started by Loslem, Wed 06/09/2017 22:34:06

Previous topic - Next topic

Loslem

Hi Guys,

I'm not much of a scripter, so I work mostly with workarounds and creative stuff I fuddle together.
So, here's what I have in mind:
I want acharacter to be able to use a Nightvision Mode.
Until now I managed to do this (I fuddled around with Abstaubers Tumbleweed Demogame, I mostly do this when just trying out stuff):

Code: ags

// Push
    else if(Verbs.UsedAction(eGA_Push)) {
     gGui1.Visible=true;
    gGui1.LockView(VIEW4);
  gGui1.Transparency = 0;
  gGui1.Animate(0, 1, eOnce, eBlock);
  SetBackgroundFrame(1);
  gGui1.Transparency = 25;
  gGui1.Animate(1, 1, eRepeat, eNoBlock);
  SetAmbientTint(0, 155, 0, 100, 100);


Video Example:
https://www.youtube.com/watch?v=hlHwBXSVnEY

Basically I created a GUI over the whole screen and animated it with the Gui Animation Module. Loop 0 is the startup (think of turning on an old TV), Loop 1 is the grainy flickering overlay to give this atmosphere. I wasn't satisfied with the TintScreen command, so I decided to alter the BackgroundFrame in GIMP and call this when turning nightvision on. (though I'd like to avoid this I think it's won't be much of extra work, the Nightvision should only be needed in certain rooms) The character is tinted all green via SetAmbientTint. I thought the object should be tinted to, but somehow this does not work until now. Maybe I'll just have to alter the Object sprites to and set animations there..though this could be really a lot of work...


Question: so far, do you like the idea?
And how could I improve. For example I don't know how to pack the commands in one line of script so that I could call it with one line like "nightvision_on();" or so.
Also the objects not tinting with the ambient tint. The manual says it should tint all objects and characters.

Oh, forgot to mention: I used the newest AGS beta (3.4. Beta 7)


EDIT: OKay, I solved the Object Issue. "Use Ambient Light Level" was set to false. Everything cool now.

Khris

Glad you were able to fix it.
The effect looks really cool by the way, but I think you should tone it down a bit. Right now it's pretty straining on the eyes, almost seizure-inducing :-D

Loslem

Thanks Khris, I know you're very experienced so to me as a newbie that means a lot :)
And you're right, I've heard more than one time that the effect is to crass. I'll alter the sprites so it will flicker less.
And maybe in a year or so you'll see it in a gane ;)

SMF spam blocked by CleanTalk