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

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


RE: My problems - naseem142 - 10-27-2012

(10-26-2012, 01:00 PM)The chaser Wrote:
(10-26-2012, 11:34 AM)naseem142 Wrote: Is this is how to add mementos?

.hps file:


void OnStart()
{
AddEntityCollideCallback("Player", "Quest1", "Quest_func_1", true, 1);
}


void Quest_func_1(string &in asItem, string &in asEntity)
{
AddQuest("Quest1" , "Quest_1");
}

extra_lang file:




The memento text in here
Wrong syntax:


void OnStart()
{
AddEntityCollideCallback("Player", "Quest1", "Quest_func_1", true, 1);
}


void Quest_func_1(string &in asParent, string &in asChild, int alState)
{
AddQuest("Quest1" , "Quest_1");
}

Plus:


The memento text in here
A NOTE
This is a note. If you can see the text in it, it means the .lang file is working.

Thank you , also i used the fade in and fade out function but i get an error at the lines where the fade out and in script are placed.


void ScriptArea_1_dram(string &in asChild, string &in asParent, int alState)
{
GiveSanityDamage(80.0f, true);
PlaySoundAtEntity("", "insanity_monster_roar01.snt", "Player", 0.0f, true);
FadeOut("3");
AddTimer("", 2, "dra_fade_1");
}

void dra_fade_1(string &in asTimer)
{
FadeIn("2");
}


EDIT: Oh and the memento still didn't work


RE: My problems - Adny - 10-27-2012

You can't declare numerical arguments (i.e. integer/float). Try removing the quotation marks from around the bolded numbers.


RE: My problems - naseem142 - 10-27-2012

(10-27-2012, 10:46 AM)andyrockin123 Wrote: You can't declare numerical arguments (i.e. integer/float). Try removing the quotation marks from around the bolded numbers.
Okay thank you


RE: My problems - naseem142 - 10-28-2012

I know how to make a player stare at a certain point.
But is it possible to make the player keep staring at the monster while its moving for a few seconds?

EDIT: Nvm , found what i need on the wiki.


RE: My problems - naseem142 - 10-28-2012

Everything is working fine with the script , but there is one problem.
The player only looks at the place where the grunt spawned and doesn't look at it the whole time.

Here's my script:


void ScriptArea_1_dram(string &in asChild, string &in asParent, int alState)
{
GiveSanityDamage(99.0f, true);
PlaySoundAtEntity("", "insanity_monster_roar01.snt", "Player", 0.0f, true);
FadeOut(3);
AddTimer("", 2, "dra_fade_1");
SetEntityActive("servant_grunt_2", true);
StartPlayerLookAt("servant_grunt_2", 2, 2, "");
}

void ScriptArea_2_grunt(string &in asChild, string &in asParent, int alState)
{
SetEntityActive("servant_grunt_2", false);
StopPlayerLookAt();
}

( The grunt is scripted to walk to a certain point and there he collides with a script area , which activates ScriptArea_2_grunt. )


RE: My problems - Robby - 10-28-2012

You'll need to constantly call a timer that triggers the "Look" script. If the timer recalls itself every 0.25 seconds, it may be enough.

Otherwise, try coming up with a different situation.


RE: My problems - naseem142 - 10-28-2012

(10-28-2012, 09:09 AM)Nemet Robert Wrote: You'll need to constantly call a timer that triggers the "Look" script. If the timer recalls itself every 0.25 seconds, it may be enough.

Otherwise, try coming up with a different situation.
The timer is the best choice :/
I'll use it


RE: My problems - The chaser - 10-28-2012

Remain removing the timer when you don't want it to look.


RE: My problems - naseem142 - 10-29-2012

Another problem;

I have a male body corpse which i want it to jump a little bit up when the player takes the oil bottle placed near him.


void Pickup1(string &in asEntity, string &in type)
{
AddBodyForce("corpse_male_8", 0.0f , 50.5f, 0.0f , "world");
GiveSanityDamage(5.0f, true);
PlaySoundAtEntity("", "react_pant.snt", "Player", 0.0f, true);
}

There are no errors at all and the sanity damage and the sound work perfectly , but the body is not even moving a little.


RE: My problems - Adny - 10-29-2012

You'll need a lot of prop force, use this function and place the value anywhere from the hundreds to the thousands:

AddPropForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem);


You have to experiment a lot with prop force; it can vary greatly from one object to the next.