I want to do it so the when you try to open a locked door it will display a message only when you have a certain item. For example, you try to open door. It says "it's locked" when you pick up a key and try to open the door again it would say "try using the key to open the door" instead. It would say "try using the key to open the door" only when you have the key. What script would you type for that? (I'm a newbie with scripting).
(04-28-2012, 04:27 AM)GetHimNotMe Wrote: [ -> ]I want to do it so the when you try to open a locked door it will display a message only when you have a certain item. For example, you try to open door. It says "it's locked" when you pick up a key and try to open the door again it would say "try using the key to open the door" instead. It would say "try using the key to open the door" only when you have the key. What script would you type for that? (I'm a newbie with scripting).
You describe exactly what happens when you try to open a door in the first hub. Have you checked out how Frictional Games did it?
You can't except us to write an entire script for you, though. At least write as much of the script as you can, and we'll fill in the gaps.
(HasItem("KEYNAME") == true) should be (HasItem("KEYNAME")) since with the == true it will say if true then true
(04-28-2012, 09:32 AM)SilentStriker Wrote: [ -> ](HasItem("KEYNAME") == true) should be (HasItem("KEYNAME")) since with the == true it will say if true then true
Don't you mean "if true == true"? It's small matter of fewer characters versus readability. You're making it sound like an error.
(04-28-2012, 01:49 PM)Cranky Old Man Wrote: [ -> ] (04-28-2012, 09:32 AM)SilentStriker Wrote: [ -> ](HasItem("KEYNAME") == true) should be (HasItem("KEYNAME")) since with the == true it will say if true then true
Don't you mean "if true == true"? It's small matter of fewer characters versus readability. You're making it sound like an error.
Well my english isn't flawless so I may have used the wrong words ^^ What I meen is that you don't need the == true since the if(HasItem("NAMEOFKEY")) already is a true statement
Normally and in all of my pascal programs I'm doing it also that way (if HasItem then), but I thought Amnesia would need it in that way (if HasItem == true).
Well thanks for telling. No I can save time :p