Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Immediate Actions
Author Message
JetlinerX Offline
Senior Member

Posts: 601
Joined: Jun 2011
Reputation: 19
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
DRedshot Offline
Senior Member

Posts: 373
Joined: Jun 2011
Reputation: 11
Post: #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 all posts by this user Quote this message in a reply
Elven Offline
Posting Freak

Posts: 868
Joined: Aug 2011
Reputation: 26
Post: #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 all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,268
Joined: Jul 2011
Reputation: 223
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
DRedshot Offline
Senior Member

Posts: 373
Joined: Jun 2011
Reputation: 11
Post: #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 all posts by this user Quote this message in a reply
Elven Offline
Posting Freak

Posts: 868
Joined: Aug 2011
Reputation: 26
Post: #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 all posts by this user Quote this message in a reply
JetlinerX Offline
Senior Member

Posts: 601
Joined: Jun 2011
Reputation: 19
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)