I know a point light is omnidirectional and bla bla, I just wanna know how to stop this from happening. Pointlight seems to be the only light entity that is useful for candles and torches.
I don't think there actually is a fix. I think point lights just aren't affected by the world and so it's an issue with the engine. You could try using a spot light instead with shadows enabled. Perhaps that would work better. I think you can get a similar result to a point light if you place more of them with different rotations.
(09-22-2015, 09:45 PM)Mugbill Wrote: [ -> ]Snip goes the scissors
I got an effect I liked by making a massive boxlight and making the pointlights smaller
how do i make something when the player looks at it their sanity goes down?
like in the story when you look at certain things your character gasps and the screen goes through some kind of fov change
GiveSanityDamage(25.0f, true); should do just that. The number is sanity damage amount and the boolean is the effect.
(09-22-2015, 10:25 PM)Mugbill Wrote: [ -> ]GiveSanityDamage(25.0f, true); should do just that. The number is sanity damage amount and the boolean is the effect.
So an examine area? where do i put this?
Who said anything about an examine area?
No, just run this line and it will happen to the player.
(09-22-2015, 10:48 PM)Mugbill Wrote: [ -> ]Who said anything about an examine area?
No, just run this line and it will happen to the player.
I want it to happen when they look in the general area of some decals I placed
How would I do that
You can add a script area with a StartPlayerLookAt callback. Basically start forcing them to look at it, but stop them immediately after. Use this opportunity to add a callback for when they look at it. Run the sanity script within the callback function.
PHP Code:
void OnStart()
{
StartPlayerLookAt("ScriptArea", 0.0f, 0.0f, "LookCallback");
StopPlayerLookAt();
}
void LookCallback()
{
GiveSanityDamage(25.0f, true);
}
I'm unsure if the stop line will also remove the callback. I'm also not sure if the callback is removed upon being called, so the event might happen continuously while looking at it. It has an easy fix though; just add a variable check.
Isn't there an entry in the script areas for lookat callbacks? You could put the title in there and just have
void LookCallback()
{
GiveSanityDamage(25.0f, true);
}
somewhere in the script itself. It probably won't end the command like Mugbill says, but if it does, give this a try.
(09-22-2015, 11:47 PM)Mugbill Wrote: [ -> ]Sniped
Does this force the player to look at it? thats not necessarily what i want
I'm looking for something for when the player looks at something it happens, like when they open the door and see the gore.