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
#21
RE: How do you make a monster spawn and then he leaves and you can hear a door opened.

so btool is always after any entity that can chanced by true or false.
thats what i found out x3
also im trying to get three lanterns to slowly turn off
anyone knows a better function for that?
08-23-2011, 05:17 PM
Find
narutohokager Offline
Member

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

Mhh I do not think there is an order for its...

Maybe this command :

void FadeLightTo(string& asLightName, float afR, float afG, float afB, float afA, float afRadius, float afTime);

Changes the properties of a light.

asLightName - internal name
afR - red value
afG - green value
afB - blue value
afA - alpha value
afRadius - radius of the light. -1 means keeping the radius
afTime - time in seconds until change is done

If the three lamp are in a dark room, you can change the colors for the changes to black. But I do not think it will work ...

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

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

well i kinda make the function more smoother.
like when the player collides into an area a function is going to start.
the function makes the player look up for 4-5 sec and also the lamps turns off to lit false.
and used sanity damage and it plays a react_pan to play.
08-24-2011, 01:21 PM
Find
narutohokager Offline
Member

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

This should probably help you Wink

void OnStart()
{
     AddEntityCollideCallback("Player", "[NAME AREA]", "[FUNCTION RUN]", true, 1);
}

void [FUNCTION RUN](string &in asParent, string &in asChild, int alState)
{
     StartPlayerLookAt("[AREA LOOK]", 3.0f, 3.5f, "");
     AddTimer("StopLook", 4.5f, "StopLook");
     SetLightVisible("[NAME OF THE LAMP]", false);
     GiveSanityDamage(10, true);
     PlaySoundAtEntity("scare", "react_pant.snt", "Player", 0.5f, false);
}
void StopLook(string &in asTimer)
{
     StopPlayerLookAt();
}

Explain :

AddEntityCollideCallback = Add Collide for Object/player, replace Name Area, Function Run
StartPlayerLookAt = Automatically look at object, replace Area Look
AddTimer = Timer for stop look, nothing to replace
SetLightVisible = Set light visible or not, replace Name of the lamp and test if working, i never use this, if you have many other lamp, added another SetLightVisible.
GiveSanityDamage = Give sanity damage to the player, 10 is the number damage
PlaySoundAtEntity = Play a sound, i already put react_pant
StopPlayerLookAt = Stop the automatically look.

Thats all.

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

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

setlightvisible didnt really work :/
08-25-2011, 01:31 PM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#26
RE: How do you make a monster spawn and then he leaves and you can hear a door opened.

SetLampLit(string& asName, bool abLit, bool abEffects);

[Image: mZiYnxe.png]


08-25-2011, 02:26 PM
Find
narutohokager Offline
Member

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

I just tested, it is true setlightvisible didnt work Undecided

Acies Can you give an example with the command setlamplit ?

Sorry for my bad english
Amnesia The Revenge - Chapter 1
08-26-2011, 06:17 PM
Website Find
narutohokager Offline
Member

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

SetLampLit works perfectly well Big Grin

Here a example :

SetLampLit("candlestick_wall_2", false, false);


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

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

thats what im using.
also what kind of effects can i add to the function?
08-28-2011, 11:10 AM
Find




Users browsing this thread: 1 Guest(s)