Jump to content

Recommended Posts

Posted

I am working on my horror mod wip, and thought of a great way to add some surprises for the player by having things appear and disappear BEHIND the player only so what I need is a command which will only enable a initially disabled object when the player is looking 180 degrees in the opposite direction.

 

I have no problem setting up the environment and general script layout but not how to set this up, however I have seen it done in a HL2 horror mod...which actually gave me the idea to implement it in my mod.

 

So can anyone help me out with this or point me in the right direction?

Posted (edited)

You could use player.getlos on an object near the enable point. Like this

Scn <name>

int Ready
int DoOnce

Begin Gamemode
 If ( Ready == 1 ) && ( Player.GetLOS == 0 ) && (DoOnce == 0 ) 
   spook.Enable ;replace spook with the creatures/objects REF
   Set DoOnce to 1
 Endif
End



Then put the object somewhere near the thing you want to spawn, like on a wall behind it or on the floor. Have a trigger somewhere set the ready var to 1. Then as soon as the player looks away from this object the thing will spawn. At least I believe that this will work.

 

On an unrelated note you're working on a horror mod as well?

 

EDIT: Whoops I misread what you wrote, let me adjust the script.

EDIT 2: Okay I think I have what you requested now.

Edited by Hopper31
Posted

Cool thanks i'll test that out later tonight and let you know if it works :)

 

Yea i'm picking away at a large horror quest mod with a couple of new worldspaces and dungeons, I started a thread for it here :)

Posted

Well if you need any more help with it feel free to ask. I've released a small scale horror mod so feel free to take anything from that if necessary. :D

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...