What do you want to do with the player sanity? As Mr. Potter already stated, these are used to get a value and test it in for example an if-statement.
If you're interested in leaving a door slightly open at some point, I do have a video that might help. It is a bit lengthy though, and there are probably easier methods of doing so if you're not interested in the effect that I show here.
Not really. Since this is only a "getter" and not a "setter" script, it will only tell you what the door state is, not actually do anything to it.
One thing you could do is replace the door with one that is already open. In the level editor you can set the OpenAmount. Have one door with a value there being inactive, then use SetEntityActive and disable the locked, closed door, then enable the already opened door.
That's probably the easiest way to achieve this.
(07-19-2014, 04:55 PM)Mudbill Wrote: Not really. Since this is only a "getter" and not a "setter" script, it will only tell you what the door state is, not actually do anything to it.
One thing you could do is replace the door with one that is already open. In the level editor you can set the OpenAmount. Have one door with a value there being inactive, then use SetEntityActive and disable the locked, closed door, then enable the already opened door.
That's probably the easiest way to achieve this.
Aaaaach thanks man, clever idea, so easy to do , oh well i think reason i wasnt thinking about that is that i am too much into scripting... Thanks again!