Frictional Games Forum (read-only)
Lanter, how do i set it to almost no oil on it? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Lanter, how do i set it to almost no oil on it? (/thread-15554.html)



Lanter, how do i set it to almost no oil on it? - stevenbocco - 05-22-2012

as the titel said, how do i set the lanter so when it will be picked up there will juste be a little drop of oil in there Smile!
i know you guys can solve this couse you guys are amazing Big Grin!


RE: Lanter, how do i set it to almost no oil on it? - Datguy5 - 05-22-2012

Put this to your OnEnter() SetPlayerLampOil(10);
The number means how much oil there is.


RE: Lanter, how do i set it to almost no oil on it? - stevenbocco - 05-22-2012

(05-22-2012, 03:40 PM)Datguy5 Wrote: Put this to your OnEnter() SetPlayerLampOil(10);
The number means how much oil there is.
As i said, these guys are just fantastic!
thank you so much!



RE: Lanter, how do i set it to almost no oil on it? - Putmalk - 05-22-2012

I would actually do it a different way (to make it seem more realistic).

At the start of your game, SetPlayerLampOil(0);

On your Lantern entity, set a CallbackFunc to something like "PickLantern" and then write very simply:

Code:
//run when lantern is picked up
void PickLantern(string &in asEntity, string &in Type)
{
    SetPlayerLampOil(25);
}



RE: Lanter, how do i set it to almost no oil on it? - Datguy5 - 05-22-2012

(05-22-2012, 03:44 PM)stevenbocco Wrote:
(05-22-2012, 03:40 PM)Datguy5 Wrote: Put this to your OnEnter() SetPlayerLampOil(10);
The number means how much oil there is.
As i said, these guys are just fantastic!
thank you so much!
Np