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
How do you make a monster spawn and then he leaves and you can hear a door opened.
BubbleTroll Offline
Junior Member

Posts: 30
Threads: 6
Joined: Aug 2011
Reputation: 0
#11
RE: How do you make a monster spawn and then he leaves and you can hear a door opened.

also how do i make like that if the player walks into an area he starring at a area?
(This post was last modified: 08-22-2011, 03:07 PM by BubbleTroll.)
08-22-2011, 03:02 PM
Find
narutohokager Offline
Member

Posts: 149
Threads: 28
Joined: Jan 2011
Reputation: 0
#12
RE: How do you make a monster spawn and then he leaves and you can hear a door opened.

LookAt you want say ?

Here the command :

void StartPlayerLookAt(string& asEntityName, float afSpeedMul, float afMaxSpeed, string& asAtTargetCallback);
void StopPlayerLookAt();

Forces the player to look at a certain entity until StopPlayerLookAt is used.

asEntityName - the entity to look at
afSpeedMul - how fast should the player look at the entity
afMaxSpeed - maximum speed allowed
asAtTargetCallback - function to call when player looks at target

Said to me if you want help to put Wink

Sorry for my bad english
Amnesia The Revenge - Chapter 1
(This post was last modified: 08-22-2011, 06:42 PM by narutohokager.)
08-22-2011, 06:41 PM
Website Find
BubbleTroll Offline
Junior Member

Posts: 30
Threads: 6
Joined: Aug 2011
Reputation: 0
#13
RE: How do you make a monster spawn and then he leaves and you can hear a door opened.

i already know what to do ^-^
i create another area and use the AddEntityCollideCallback
then im going to create a function called LookAt.
And add a timer that chances the function LookAt
cause i need to deactivate or else his just going to look at that point.
I think thats it.
Also is there a script function that turns off the lights?
(This post was last modified: 08-23-2011, 06:13 AM by BubbleTroll.)
08-23-2011, 06:05 AM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#14
RE: How do you make a monster spawn and then he leaves and you can hear a door opened.

void SetLightVisible(string& asLightName, bool abVisible);

Enables/disables lights.

asLightName - internal name
abVisible - determines the state of the light

http://wiki.frictionalgames.com/hpl2/amn..._functions
That page is your best friend when scripting.
08-23-2011, 06:18 AM
Find
narutohokager Offline
Member

Posts: 149
Threads: 28
Joined: Jan 2011
Reputation: 0
#15
RE: How do you make a monster spawn and then he leaves and you can hear a door opened.

If I understand you want to after look the target LookAt, automatically stops the watch ?

Ex: Player look automatically at Door_1, when player look Door_1, Look automatically stop immediately.

If that :

void LookDoor()
{
StartPlayerLookAt("AreaLookDoor", 3.0f, 3.5f, "StopLook");
}
void StopLook()
{
    StopPlayerLookAt();
}

When player look at AreaLookDoor, he run the fonction "StopLook"

Sorry for my bad english
Amnesia The Revenge - Chapter 1
08-23-2011, 12:54 PM
Website Find
BubbleTroll Offline
Junior Member

Posts: 30
Threads: 6
Joined: Aug 2011
Reputation: 0
#16
RE: How do you make a monster spawn and then he leaves and you can hear a door opened.

Wow thats actully alot less scripting Big Grin
and thanks for the light function i actully knew the webside already but didnt really search before posting Tongue
Also is there a function where the player is like sleeping or something.
Like if your sanity is really bad your like collapsing on the ground.
I wanted that effect but without losing sanity.
08-23-2011, 01:43 PM
Find
narutohokager Offline
Member

Posts: 149
Threads: 28
Joined: Jan 2011
Reputation: 0
#17
RE: How do you make a monster spawn and then he leaves and you can hear a door opened.

Mhh it is a bit more difficult...

I have never done these things but I saw a topic to talk about the beginning of the game when you get up.

http://www.frictionalgames.com/forum/thr...light=wake

Look the code in first post.

If it is the same as yours, except that the one is to get up, you may be changing a few lines to his to do the opposite...

FadeOut(0);     // Instantly fades the screen out. (Good for starting the game)
     FadeIn(20);      // Amount of seconds the fade in takes

FadeOut (0) means that it is directly on the screen to black.

Sorry for my bad english
Amnesia The Revenge - Chapter 1
08-23-2011, 02:06 PM
Website Find
BubbleTroll Offline
Junior Member

Posts: 30
Threads: 6
Joined: Aug 2011
Reputation: 0
#18
RE: How do you make a monster spawn and then he leaves and you can hear a door opened.

kk thanks Big Grin
if theres anything else i want to ask i will just do a reply :3
Wow ffs the editor crashed when i was nearly done with the first map -.-
(This post was last modified: 08-23-2011, 03:08 PM by BubbleTroll.)
08-23-2011, 02:25 PM
Find
BubbleTroll Offline
Junior Member

Posts: 30
Threads: 6
Joined: Aug 2011
Reputation: 0
#19
RE: How do you make a monster spawn and then he leaves and you can hear a door opened.

also what means &string?
and btool?

(edit)nvm found it out Big Grin
(This post was last modified: 08-23-2011, 04:27 PM by BubbleTroll.)
08-23-2011, 04:05 PM
Find
narutohokager Offline
Member

Posts: 149
Threads: 28
Joined: Jan 2011
Reputation: 0
#20
RE: How do you make a monster spawn and then he leaves and you can hear a door opened.

Thats... I dont know Rolleyes

But I think it's the two small "" Big Grin

btool... Dont know

But if I dont know how to use the command.
I look for in a script already done that contains this command Tongue

Sorry for my bad english
Amnesia The Revenge - Chapter 1
08-23-2011, 05:02 PM
Website Find




Users browsing this thread: 1 Guest(s)