PLUGIN: Flashlight plugin v1.2

Started by a-v-o, Wed 21/09/2005 20:53:14

Previous topic - Next topic

Slasher

#20
I am using Flashlight plugin 1.2.1 by Andreas Vogel and I can't seem to turn it off.

I was ok, if I remember, with and older version.

After using it in a darkened room and then going back to previous room I have the room state set to background 1 and the player back to normal views. However at most I clear the follow character spotlight but the room looks 'washed'.

Tried
Code: AGS
SetFlashlightDarkness (GetFlashlightMaxLightLevel ());


Are you able to assist:

many thanks


Gilbert

#21
(Merged with the plugin's thread.)

I'm not sure as I have never used it, but since the plugin is rather old there may be some compatibility problems (people more familiar with the plugin may be able to share some light on this). You may also try the module version which is a bit newer.

Slasher

#22
Flashlight Version 1.2.1

I was having trouble turning it off.

For those that may come across my scenereo I have made 2 buttons: light on and light off which controls flashlight on and off. I can also switch it on via a light item in the inventory which i use on player. I have 2 backgrounds: black room (background 0) and the main room background 1.

This is what I used:

Code: AGS
function Blighton_OnClick(GUIControl *control, MouseButton button)
{
  SetBackgroundFrame(1);
  
  cELF.ChangeView(40);
  cELF.SpeechView=41;
  cELF.SetIdleView(42, 0);
  
  SetFlashlightDarkness (20);
  SetFlashlightBrightness (GetFlashlightMaxLightLevel ());
  SetFlashlightDarknessSize (50);
  SetFlashlightBrightnessSize (100);
  SetFlashlightFollowCharacter ( (1), 0, -20, 20, 10);
}

    function Blightoff_OnClick(GUIControl *control, MouseButton button)
   {
    cELF.ChangeView(3);
    cELF.SpeechView=4;
    cELF.SetIdleView(12, 0);

    SetBackgroundFrame(0);
    SetFlashlightBrightness (GetFlashlightMaxLightLevel ());
   }



sorted

Julius Dangerous

This is the best (and only) plugin for flashlight, i updated my game to AGS 3.4 and 3.5 and it doesn't works any more :sad: :cry:
___________________________________________________________

Cassiebsg

@Julius, what error does it give?
I'm not sure it works with plugins, but have you tried setting the compatibility to 3.4 version?
There are those who believe that life here began out there...

Crimson Wizard

#25
Quote from: Cassiebsg on Thu 02/01/2020 16:51:16
I'm not sure it works with plugins, but have you tried setting the compatibility to 3.4 version?

No, it does not affect plugins.
EDIT: the only way script version may affect plugin is if plugin's script function matches some of the new engine functions and there's naming conflict.

Julius Dangerous

#26
Quote from: Cassiebsg on Thu 02/01/2020 16:51:16
@Julius, what error does it give?
I'm not sure it works with plugins, but have you tried setting the compatibility to 3.4 version?

no error message, tried with other compatibility script version, but game starts and flash light not working
___________________________________________________________

Crimson Wizard

Quote from: Julius Dangerous on Thu 02/01/2020 22:13:12
no error message, tried with other compatibility script version, but game starts and flash light not working

Have you tried running in Software gfx mode? I have a thought this original plugin may only run with DirectDraw5 (called Software renderer now).

I don't remember how flashlight looks like in this plugin, but maybe it's possible to recreate with just a black GUI with a transparent hole?

Julius Dangerous

#28
Quote from: Crimson Wizard on Thu 02/01/2020 22:48:27
Quote from: Julius Dangerous on Thu 02/01/2020 22:13:12
no error message, tried with other compatibility script version, but game starts and flash light not working

Have you tried running in Software gfx mode? I have a thought this original plugin may only run with DirectDraw5 (called Software renderer now).

I don't remember how flashlight looks like in this plugin, but maybe it's possible to recreate with just a black GUI with a transparent hole?

Thanks for answer. Yes i tried with all modes and with all script compatibility/API version combinations, and 16/32 color depth.
So i made it with a GUI (double of the screen size) with an hole in the middle (png), and added script:

function room_RepExec()
{
gFlashlight.SetPosition(mouse.x-800, mouse.y-600);
}
:cheesy:
___________________________________________________________

SMF spam blocked by CleanTalk