Frictional Games Forum (read-only)

Full Version: Custom Lantern Problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So i've been trying to convert the A Machine for Pigs Lantern into a Full Conversion for TDD and i've ran into quiet a few problems trying to do that.
I've tried using this tutorial on how to do said thing and i've done it like followed because there seemed to be a problem with doing it like the tutorial explained:

I copied over both lantern and hand model to my FC (redist/FC/models/...) and also the entitie (redist/FC/entities/item/lantern/...). then i have startet the game dev_user and it only seemed to work partly.

The problem is that both the halo light and the spotlight from the lantern don't seem to work correctly. It just looks like the light is coming from the player rather from the lantern. Also lantern spotlight and halo light do not seem to be attached to the lantern as they are not affected by the lantern swing physics. A last thing to note is that the lantern had another flicking light attached to it, but it was flicking all the time so i looked into the lantern.ho file and found some functions that i was not familiar with.

Code:
MinTimeBetweenFailures = "10"
MaxTimeBetweenFailures = "10"
    
ChanceOfFlickerFailure = "1.0"
MinTimeInFailureFlickering = "120"
MaxTimeInFailureFlickering = "150"
    
ChanceOfDeadFailure = "0"
MinTimeInFailureDead = "5"
MaxTimeInFailureDead = "15"
        
ChanceFlickerComesAfterDeadFailure = "0.3"
ChanceDeadComesAfterFlickerFailure = "0.3"


Maybe this has to do with the engine that got a bit updated but i'm now stuck on what to do. Hope you guys can help me fix it.
Ye , i have problem with perma flickering too ... but otherwise the lantern for me works fine i just deleted ATDD models and lantern from entities and gived there a new one from AAMFP , but that flickering is annoying.
(11-06-2013, 03:51 PM)Plazmater Wrote: [ -> ]Ye , i have problem with perma flickering too ... but otherwise the lantern for me works fine i just deleted ATDD models and lantern from entities and gived there a new one from AAMFP , but that flickering is annoying.

to get rid of the flickering you can simply open the entity (models/hand_object/lantern/xx.ent) in the model editor and delete the spotlight that does the flickering of just simply untick the "flicker active" option when you click on the spotlight and resave it. that's how i've got it working.
and NOW i have another question :
HOW can we make the lanter \ flashlight flicker if an enemy is nearby?
THIS function doesn't do anything to me : SetLightFlickerActive("Lantern", false);
Tis whole function doesn't work,...
(11-06-2013, 09:03 PM)DnALANGE Wrote: [ -> ]and NOW i have another question :
HOW can we make the lanter \ flashlight flicker if an enemy is nearby?
THIS function doesn't do anything to me : SetLightFlickerActive("Lantern", false);
Tis whole function doesn't work,...

False ?? , shouldn´t you make area script when you walk in that area , ("Lantern", true); ?
(11-06-2013, 09:03 PM)DnALANGE Wrote: [ -> ]and NOW i have another question :
HOW can we make the lanter \ flashlight flicker if an enemy is nearby?
THIS function doesn't do anything to me : SetLightFlickerActive("Lantern", false);
Tis whole function doesn't work,...

i'm not really into the scripting thing but i know a bit more than the basics i think. So my guess would be that you create a function along these lines

Code:
void SetEntityPlayerLookAtCallback(player_enemysight, SetLightFlickerActive, false)

and then you just have to set up an IF statement to combine those. But i'm really too lazy now to actually think of that :<. I'm going to tinker with that when i'm done with everything else i'm working on Tongue
Yes it is "True", sorry.
Was just to show the FUNCTIOn itself.
Does the flashligh\lantern work for someone? if you look\see an enemy?
(11-07-2013, 12:23 AM)DnALANGE Wrote: [ -> ]Yes it is "True", sorry.
Was just to show the FUNCTIOn itself.
Does the flashligh\lantern work for someone? if you look\see an enemy?

yeh i was able to now (reconfigured) import the lantern into the game. But i deleted every lightsource and applied new ones as the native AMFP ones seemd to not look so good in TDD.

Not sure how excectly the flickering works but the example code from above should work if the function does what it's suppost to do!
(11-07-2013, 05:08 PM)RaideX Wrote: [ -> ]
(11-07-2013, 12:23 AM)DnALANGE Wrote: [ -> ]Yes it is "True", sorry.
Was just to show the FUNCTIOn itself.
Does the flashligh\lantern work for someone? if you look\see an enemy?

yeh i was able to now (reconfigured) import the lantern into the game. But i deleted every lightsource and applied new ones as the native AMFP ones seemd to not look so good in TDD.

Not sure how excectly the flickering works but the example code from above should work if the function does what it's suppost to do!
-
That sounds amazing!
I think more people are interested in how it should work.
Please explane or maybe better with some poictures of what to do where.
thank you!
DnALANGE
Quote:-
That sounds amazing!
I think more people are interested in how it should work.
Please explane or maybe better with some poictures of what to do where.
thank you!
DnALANGE

I'll get back here if i'm into the scripting part for my FC. Shouldn't take too long, but the lantern itself works just fine without the flickering of course.

Stay tuned c;