Frictional Games Forum (read-only)
Warnings Thanks for helpers! - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Warnings Thanks for helpers! (/thread-16021.html)



Warnings Thanks for helpers! - Putkimato - 06-10-2012

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?


RE: Warnings - SilentStriker - 06-10-2012

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.


RE: Warnings - Datguy5 - 06-10-2012

(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.


RE: Warnings - Ermu - 06-10-2012

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>