Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Immediate Actions
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#1
Immediate Actions

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?

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

(This post was last modified: 08-26-2011, 11:28 PM by JetlinerX.)
08-26-2011, 11:27 PM
Website Find
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#2
RE: Immediate Actions

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

08-26-2011, 11:30 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#3
RE: Immediate Actions

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

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

And below it

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

The Interrogation
Chapter 1

My tutorials
08-26-2011, 11:33 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Immediate Actions

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

Tutorials: From Noob to Pro
08-27-2011, 12:06 AM
Website Find
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#5
RE: Immediate Actions

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
void OnStart()
{
AddTimer("" , 0 , "intro");
}
void intro(string &in asTimer)
{

}

you can just use

void OnStart()
{
intro();
}

void intro(){

}

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

(This post was last modified: 08-27-2011, 12:33 AM by DRedshot.)
08-27-2011, 12:32 AM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#6
RE: Immediate Actions

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

The Interrogation
Chapter 1

My tutorials
08-27-2011, 12:38 AM
Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#7
RE: Immediate Actions

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

Either way, its all solved.

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

08-27-2011, 03:53 PM
Website Find




Users browsing this thread: 2 Guest(s)