Frictional Games Forum (read-only)
Questions - 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: Questions (/thread-25442.html)

Pages: 1 2 3 4 5


RE: OnLeave() where to locate - Romulator - 06-07-2014

Post your code from the hps which returns an error please.


RE: OnLeave() where to locate - Amnesiaplayer - 06-07-2014

first i had

void OnLeave()
{
void OnStart()
{
AddEntityCollideCallback("Player", "Teleport", "jumpscare", true, 1);
}

void jumpscare(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("jumpscare", true);
AddPropForce("jumpscare", 10000, 0, 0, "world");
PlaySoundAtEntity("", "24_iron_maiden.snt", "jumpscare", 0, false);

and it says unexpected 1,1 or something liek that and if i place it on the end it says Unexpected end of file. Sad


RE: OnLeave() where to locate - Romulator - 06-07-2014

There seems to be a few errors..

Remember that:
- EVERY void opens and closes with the respective braces.
- A void CANNOT be within a void.

This should fix it

PHP Code:
void OnLeave()
{

}

void OnStart()
{
AddEntityCollideCallback("Player""Teleport""jumpscare"true1);
}

void jumpscare(string &in asParentstring &in asChildint alState)
{
SetEntityActive("jumpscare"true);
AddPropForce("jumpscare"1000000"world");
PlaySoundAtEntity("""24_iron_maiden.snt""jumpscare"0false);



Edit: I have evidence of you that suggests that all you do copy and paste code. You should try to understand what you are coding, whether you're watching a YouTube video or not. While lengthy, try checking out some of Mudbill's tutorials on Amnesia CS development. While he won't cover teleporting naked guys, he does explain coding and how to perform some cool stuff.

And too, look at the FrictionalGames wiki. It's a nuisance to read, I know, but there is some very helpful stuff there.


RE: OnLeave() where to locate - Amnesiaplayer - 06-07-2014

Thankss Big Grin

i have a question! again :S
what must i type in the script if i want
a naked guy BEHIND the door and the area On the OTHER side of the door.. so if it activates the naked man breaks the door...
so short : a guy breaks a door and the "player"is screaming :S


RE: (picking key) *steve comes* - DnALANGE - 06-07-2014

Grezt. You can give ppl reputation for being helpfull..
not meaning me or now..
just saying, for fun give ppl some thumbs up.


RE: Where ?! - PutraenusAlivius - 06-07-2014

On both. But that depends on what you want.


RE: Where ?! - Straxedix - 06-07-2014

1st:void OnLeave()
2nd:Use it on the both as SomethingRidiculous said,it's really easy go on the end of .hps file you want and add
Spoiler below!
PHP Code:
void OnLeave()
{





RE: OnLeave() where to locate - Straxedix - 06-07-2014

About second question make a grunt (Steve) click on it and check box "Activate"
Then add the some pathnodes in Level Editor
Then type the script
Spoiler below!
PHP Code:
void OnStart 
{
SetEntityPlayerInteractCallback("NAMEOFAREA""NAMEOFACTION"true);



and

Spoiler below!
PHP Code:
void NAMEOFACTION(string &in asEntity)
{
SetEntityActive("NAMEOFMONSTER"true);
AddEnemyPatrolNode("NAMEOFMONSTER""NAMEOFPATHNODE"0"idle");



Yep you have to do some work two and you are like me you make question what will other solve for you,and as many said you WON'T learn by that. Not attacking you i know you are new but give some try Smile

And really if someone helps you (not telling me) you can give some feedback +reputation

By clicking a little box with some green + (plus) under a Profile

About pathnodesBig Grinon't make them to far and if wanna make monster breake door then just put pathnode forward door (Don't make pathnodes where can monster glitch)


RE: Questions - plutomaniac - 06-07-2014

Merged. Keep this one topic for all your development questions in the same period of time.