Author Topic: PLUGIN: Flashlight plugin v1.2  (Read 14042 times)

Slasher

  • slasher
    • I can help with AGS tutoring
    • Lifetime Achievement Award Winner
    • I can help with scripting
    • I can help with story design
    • Slasher worked on one or more games that won an AGS Award!
    •  
    • Slasher worked on one or more games that was nominated for an AGS Award!
SOLVED: Turn off Flashlight 1.2.1
« Reply #20 on: 27 Sep 2012, 06:31 »
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: Adventure Game Studio
  1. SetFlashlightDarkness (GetFlashlightMaxLightLevel ());

Are you able to assist:

many thanks

« Last Edit: 27 Sep 2012, 19:41 by slasher »

Gilbert

  • Local Moderator
  • * KILL* * KILL * * KILL *
    • Lifetime Achievement Award Winner
Re: PLUGIN: Flashlight plugin v1.2
« Reply #21 on: 27 Sep 2012, 06:43 »
(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.
« Last Edit: 27 Sep 2012, 06:47 by Iceboty V7000a »

Slasher

  • slasher
    • I can help with AGS tutoring
    • Lifetime Achievement Award Winner
    • I can help with scripting
    • I can help with story design
    • Slasher worked on one or more games that won an AGS Award!
    •  
    • Slasher worked on one or more games that was nominated for an AGS Award!
Re: PLUGIN: Flashlight plugin v1.2
« Reply #22 on: 27 Sep 2012, 13:50 »
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: Adventure Game Studio
  1. function Blighton_OnClick(GUIControl *control, MouseButton button)
  2. {
  3.   SetBackgroundFrame(1);
  4.  
  5.   cELF.ChangeView(40);
  6.   cELF.SpeechView=41;
  7.   cELF.SetIdleView(42, 0);
  8.  
  9.   SetFlashlightDarkness (20);
  10.   SetFlashlightBrightness (GetFlashlightMaxLightLevel ());
  11.   SetFlashlightDarknessSize (50);
  12.   SetFlashlightBrightnessSize (100);
  13.   SetFlashlightFollowCharacter ( (1), 0, -20, 20, 10);
  14. }
  15.  
  16.     function Blightoff_OnClick(GUIControl *control, MouseButton button)
  17.    {
  18.     cELF.ChangeView(3);
  19.     cELF.SpeechView=4;
  20.     cELF.SetIdleView(12, 0);
  21.  
  22.     SetBackgroundFrame(0);
  23.     SetFlashlightBrightness (GetFlashlightMaxLightLevel ());
  24.    }


sorted
« Last Edit: 27 Sep 2012, 19:40 by slasher »

Re: PLUGIN: Flashlight plugin v1.2
« Reply #23 on: 01 Jan 2020, 22:27 »
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

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
Re: PLUGIN: Flashlight plugin v1.2
« Reply #24 on: 02 Jan 2020, 16:51 »
@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...

Re: PLUGIN: Flashlight plugin v1.2
« Reply #25 on: 02 Jan 2020, 18:49 »
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.
« Last Edit: 02 Jan 2020, 18:50 by Crimson Wizard »

Re: PLUGIN: Flashlight plugin v1.2
« Reply #26 on: 02 Jan 2020, 22:13 »
@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
« Last Edit: 02 Jan 2020, 22:38 by Julius Dangerous »
_______________________________________ ____________________

Re: PLUGIN: Flashlight plugin v1.2
« Reply #27 on: 02 Jan 2020, 22:48 »
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?

Re: PLUGIN: Flashlight plugin v1.2
« Reply #28 on: 13 Jan 2020, 17:03 »
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:
« Last Edit: 13 Jan 2020, 21:03 by Julius Dangerous »
_______________________________________ ____________________