Frictional Games Forum (read-only)

Full Version: Script is just... broken?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
This is crap... the scripting functions must not be complete or it's just that this game doesn't let you do it.
Eh? I just used the diary page pickup callback myself, it works perfectly fine (aside from the fact that it triggers and never opens the diary in journal automatically, not quite sure how Amnesia worked that).

Can't get angry every time the game doesn't let you do something specific, because that will happen a lot.
It's okay, I found a thing that goes around it... I just made an area right around the note so then it gets triggered when you collide with it...

BUT WAIT! Wouldn't it work if I set it when the note leaves the collide area, it causes the stuff to happen? Smile
Alright, now you're thinking in terms of scripting! That should actually work, but you'd have to make sure the note was physics-static so it wouldn't move when bumped, and when you add the callback, the last parameter would either be 0 (check for entering and exiting both) or -1 (check only for exit) (that is, if I recall properly the function's callback add).

I did not even think of that.
Nope... didn't work for -1. I'll try 0.

Edit: 0 obviously didn't work.
Try moving "SetPlayerLampOil(0);" into the OnEnter() area. It works for me and that's where it is.

Er, never mind, didn't read the previous posts thoroughly enough. <.<
I seems as if I need to do something else about my script... I think I need to find a way for the script to activate when the note is in my journal.
Pages: 1 2