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



Immediate Actions - JetlinerX - 08-26-2011

Hey all!

So I am curious. Say I want to make the player laying on the ground, fade in, wait a while, then a monster comes bashing through the door. All this happens, when the player enters a new map. Do I just set the "PlayerStartArea" in another "ScriptArea" so that the second they enter the map, they trigger the area, and all this happens?

Or is there another way?


RE: Immediate Actions - DRedshot - 08-26-2011

you could do that, and I think it would work Smile

But I thnk it would be a lot easier to just call the function directly from void OnStart()

Wink


RE: Immediate Actions - Elven - 08-26-2011

If you don't want all that to start OnStart and want different area for your intro, just put into OnStart:

Code:
OnStart()
{
AddTimer("", 0, "intro")
}

And below it

Code:
void intro(string &in asTimer)
{
// Put your intro stuff here :)!
}



RE: Immediate Actions - Your Computer - 08-27-2011

OnEnter() is more appropriate for when the user enters the map.


RE: Immediate Actions - DRedshot - 08-27-2011

I think he wants a startup script, which would be only run once, judging by the fact that he wants a monster to smash through the door. If you do want it to be repeated, you would have to put it in void OnEnter() and you would have to use ResetProp to fix the door, and return the monster to it's original position.

Also, Elven, instead of
Code:
void OnStart()
{
AddTimer("" , 0 , "intro");
}
void intro(string &in asTimer)
{

}

you can just use

Code:
void OnStart()
{
intro();
}

void intro(){

}

Unless of course you want a delay between the OnStart() and the WakeUp Function.


RE: Immediate Actions - Elven - 08-27-2011

Woooh, I should have known Big Grin! I am now smarter, thx for telling me Big Grin!


RE: Immediate Actions - JetlinerX - 08-27-2011

Oh! Hm, I used the timer, but I am gona try this Big Grin

Either way, its all solved.