Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Making a scream play when player enters a room?
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#2
RE: Making a scream play when player enters a room?

For the scream, you would first put an AddTimer if you want to wait a few seconds before the scream is heard. So you would make a script area in your level, probably right on the door into the room. You would also put another script area around the same place for the player to look there after. Anyway, in your .hps script, you would put in a function which has the same name as the script area, say Scream. So you would put "void Scream" as your function. In there, you put a new line, AddTimer. The 3 parameters are the name (doesn't really matter what this is I don't think), the time waited, and the function name. What this does is wait a certain amount of time, and then call a new function (whatever name you put for function name). So in the new function, you would use StartPlayerLookAt to make the player look at a script area for a certain amount of time, and (I'm pretty sure, haven't used it yet) PlaySoundAtEntity to play the scream. Of course, you would need to know how to link a collide to your Scream function. A tutorial is here for it: http://wiki.frictionalgames.com/hpl2/tut...t_beginner

It's near the bottom. Timer is there as well.
(This post was last modified: 03-22-2011, 06:24 PM by MrBigzy.)
03-22-2011, 06:23 PM
Find


Messages In This Thread
RE: Making a scream play when player enters a room? - by MrBigzy - 03-22-2011, 06:23 PM



Users browsing this thread: 3 Guest(s)