Frictional Games Forum (read-only)
wait time script possible ? - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: wait time script possible ? (/thread-6136.html)

Pages: 1 2 3


RE: wait time script possible ? - Tottel - 01-10-2011

Code:
void Collide_Area(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("cross_small_metal_1", 20, 50, "");
SetEntityActive("servant_grunt_2" , true);
SetEntityActive("servant_grunt_1" , true);
SetEntityActive("servant_brute_1" , true);
}

In this block you do the actions like letting the player look at something and enable 3 grunts.

Code:
void action_step1(string &in asTimer)
{
FadeIn(20);
FadeOut(10);
CompleteQuest("Quest01", "Quest01");
AddTimer("delay_timer", 5, "action_step2");
}

Here you do some fading, put the quest to completed and you will go to action_step2 in 5 seconds. The only problem is that you will NEVER get to this in-game since 'action_step1' is never called.
To make that work, you should do something like:
AddTimer("Blah", 5, "action_step1"); in your very first function, namely: Collide_Area(). This will trigger the fades and the rest, 5 seconds after the grunts show up.

Code:
void action_step2(string &in asTimer)
{
ChangeMap("Paranoid.map", "PlayerSpawn1", "", "");
}

Here you will finally change map, and this will happen 5 seconds after you call action_step1, but since action_step1 isn't called, it won't change map.


RE: wait time script possible ? - sassix - 01-10-2011

Quote:void Collide_Area(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("cross_small_metal_1", 20, 50, "");
AddTimer("delay_timer", 5, "action_step1");
}

void action_step1(string &in asTimer)
{
SetEntityActive("servant_grunt_2" , true);
SetEntityActive("servant_grunt_1" , true);
SetEntityActive("servant_brute_1" , true);
CompleteQuest("Quest01", "Quest01");
AddTimer("delay_timer", 5, "action_step2");
}

void action_step2(string &in asTimer)
{
ChangeMap("Paranoid.map", "PlayerSpawn1", "", "");

so this is what u mean right ?


RE: wait time script possible ? - Tottel - 01-10-2011

If you want those enemies to show up 5 seconds after that look event, than yes. If you want them to appear instantly, then place those 3 lines in the Collide_Area function.

EDIT: Also, I'm not sure if you can make 2 timers with the same name (delay_timer). Could anyone confirm?


RE: wait time script possible ? - sassix - 01-10-2011

(01-10-2011, 07:53 PM)Tottel Wrote: If you want those enemies to show up 5 seconds after that look event, than yes. If you want them to appear instantly, then place those 3 lines in the Collide_Area function.

EDIT: Also, I'm not sure if you can make 2 timers with the same name (delay_timer). Could anyone confirm?


IT DOES !!!! OMG IT FINALY WORKS !!! OMG THX TO U ALL MAN I LOVE U GUYS !!!!

thats my script right now

Quote:void Collide_Area(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("cross_small_metal_1", 20, 50, "");
AddTimer("delay_timer", 3, "action_step1");
}

void action_step1(string &in asTimer)
{
SetEntityActive("servant_grunt_2" , true);
SetEntityActive("servant_grunt_1" , true);
SetEntityActive("servant_brute_1" , true);
CompleteQuest("Quest01", "Quest01");
AddTimer("delay_timer", 3, "action_step2");
}

void action_step2(string &in asTimer)
{
ChangeMap("paranoid.map", "PlayerSpawn1", "", "");
}
im gonna reupload the map again, pls give me some feedback and inspirations to make it better / scaryer !!! i know its not perfect because im noob like u see the whole time , but for my FIRST map its awsome !


RE: wait time script possible ? - Tottel - 01-10-2011

Hehe, but I already know what's going to happen! :>

I will try it when I have some time. And don't worry, everyone starts small. Smile


RE: wait time script possible ? - sassix - 01-10-2011

(01-10-2011, 08:08 PM)Tottel Wrote: Hehe, but I already know what's going to happen! :>

I will try it when I have some time. And don't worry, everyone starts small. Smile

y u know what happen, sure, but the map is playing big role Tongue
but i have to do some more stuff before the first map is finished , i need to let the player freezes so he cant move after the las collide area i wont let him escape from the brutes Tongue

heres the thread !

http://www.frictionalgames.com/forum/thread-6149.html


RE: wait time script possible ? - DIGI Byte - 01-11-2011

well I was under the impression you wanted the monsters to kill the player and move them to a new map, and that's what I was working on doing for you


RE: wait time script possible ? - sassix - 01-11-2011

(01-11-2011, 04:24 AM)DIGI Byte Wrote: well I was under the impression you wanted the monsters to kill the player and move them to a new map, and that's what I was working on doing for you

nope , just wanted the player to a new map ^^ theres no sence in porting enemys to another map Tongue


RE: wait time script possible ? - Frontcannon - 01-11-2011

(01-10-2011, 07:53 PM)Tottel Wrote: EDIT: Also, I'm not sure if you can make 2 timers with the same name (delay_timer). Could anyone confirm?

Nope, that doesn't work. asTimer can only refer to one and not two timers.


RE: wait time script possible ? - sassix - 01-11-2011

(01-11-2011, 05:30 PM)Frontcannon Wrote:
(01-10-2011, 07:53 PM)Tottel Wrote: EDIT: Also, I'm not sure if you can make 2 timers with the same name (delay_timer). Could anyone confirm?

Nope, that doesn't work. asTimer can only refer to one and not two timers.

so ?? but this script is still working with the same timer and without remove timer :/