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
Warnings Thanks for helpers!
Putkimato Offline
Junior Member

Posts: 25
Threads: 8
Joined: Jun 2012
Reputation: 0
#1
Warnings Thanks for helpers!

How do i make warinings? I run to area, then there spawns 4 brutes. Then there reads "Run, RUN!"

void OnEnter()

{

AddEntityCollideCallback("Player", "morspa4", "morspa4", true, 1);

}

void morspa4(string &in asParent, string &in asChild, int alState)

{
SetEntityActive("1", true);
SetEntityActive("2", true);
SetEntityActive("3", true);
SetEntityActive("4", true);
AddTimer("Scare", 0.01f, "Scare1");
}

void Scare1(string &in asTimer)

{

GiveSanityDamage(60, true);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);

}

could you add it in this?
(This post was last modified: 06-10-2012, 01:57 PM by Putkimato.)
06-10-2012, 11:07 AM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#2
RE: Warnings

you use SetMessage:

SetMessage(string& asTextCategory, string& asTextEntry, float afTime);

Displays a message on the screen.

asTextCategory - the category in the .lang file
asTextEntry - the entry in the .lang file
afTime - determines how long the message is displayed. If time is < =0 then the life time is calculated based on string length.

(This post was last modified: 06-10-2012, 11:09 AM by SilentStriker.)
06-10-2012, 11:08 AM
Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#3
RE: Warnings

(06-10-2012, 11:10 AM)Robosprog Wrote:
(06-10-2012, 11:07 AM)Putkimato Wrote: How do i make warinings? I run to area, then there spawns 4 brutes. Then there reads "Run, RUN!"

void OnEnter()

{

AddEntityCollideCallback("Player", "morspa4", "morspa4", true, 1);

}

void morspa4(string &in asParent, string &in asChild, int alState)

{
SetEntityActive("1", true);
SetEntityActive("2", true);
SetEntityActive("3", true);
SetEntityActive("4", true);
AddTimer("Scare", 0.01f, "Scare1");
}

void Scare1(string &in asTimer)

{

GiveSanityDamage(60, true);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);

}

could you add it in this?
Might not be my place, but why not just have one or two brutes? Four just seems unrealistic.
This guy asked for help not for opinions...Besides there were 3 grunts in amnesia at the same time in that one place.

(This post was last modified: 06-10-2012, 12:19 PM by Datguy5.)
06-10-2012, 12:18 PM
Find
Ermu Offline
Member

Posts: 86
Threads: 13
Joined: Jan 2012
Reputation: 2
#4
RE: Warnings

void OnEnter()

{

AddEntityCollideCallback("Player", "morspa4", "morspa4", true, 1);

}

void morspa4(string &in asParent, string &in asChild, int alState)

{
SetEntityActive("1", true);
SetEntityActive("2", true);
SetEntityActive("3", true);
SetEntityActive("4", true);
AddTimer("Scare", 0.01f, "Scare1");
}

void Scare1(string &in asTimer)

{

GiveSanityDamage(60, true);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
SetMessage("Warnings", "Run_1", 0);
}

Then add this to your .lang
<CATEGORY Name="Warnings">
<Entry Name="Run_1"> Run, RUN! </Entry>
</CATEGORY>
06-10-2012, 12:38 PM
Find




Users browsing this thread: 1 Guest(s)