Frictional Games Forum (read-only)
Script is just... broken? - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Script is just... broken? (/thread-5060.html)

Pages: 1 2


RE: Script is just... broken? - Kyle - 10-16-2010

This is crap... the scripting functions must not be complete or it's just that this game doesn't let you do it.


RE: Script is just... broken? - Entih - 10-16-2010

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.


RE: Script is just... broken? - Kyle - 10-17-2010

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


RE: Script is just... broken? - Entih - 10-17-2010

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.


RE: Script is just... broken? - Kyle - 10-17-2010

Nope... didn't work for -1. I'll try 0.

Edit: 0 obviously didn't work.


RE: Script is just... broken? - Equil - 10-17-2010

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. <.<


RE: Script is just... broken? - Kyle - 10-17-2010

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.