Chilton
Member
Posts: 138
Threads: 9
Joined: Sep 2010
Reputation:
0
|
Making a timed room transition
Ok
To go into more detail, im trying to make a script for a map in which you are transitioned into the map (Irrelevant), then after a set time, you automatically move to a new map.
------
void OnStart()
{
AddTimer("Countdown", 500f, "CountdownHallucination");
}
void CountdownHallucination(string &in asTimer)
{
ChangeMap("map 3.map", "PlayerStartArea_1", "player_climb.snt", "player_crouch.snt");
}
------
^^ Is what i currently have, and the script is accepted, but after the 500f, nothing happens. I even left it for longer and nothing happens.
What am i not doing here?
As usual, any guidance is much appreciated.
|
|
10-02-2010, 06:08 AM |
|
Alexander
Junior Member
Posts: 22
Threads: 2
Joined: Sep 2010
Reputation:
0
|
RE: Making a timed room transition
(10-02-2010, 06:08 AM)Chilton Wrote: Ok
To go into more detail, im trying to make a script for a map in which you are transitioned into the map (Irrelevant), then after a set time, you automatically move to a new map.
------
void OnStart()
{
AddTimer("Countdown", 500f, "CountdownHallucination");
}
void CountdownHallucination(string &in asTimer)
{
ChangeMap("map 3.map", "PlayerStartArea_1", "player_climb.snt", "player_crouch.snt");
}
------
^^ Is what i currently have, and the script is accepted, but after the 500f, nothing happens. I even left it for longer and nothing happens.
What am i not doing here?
As usual, any guidance is much appreciated.
Well I just tested something and it worked for me. Try this.
void CountdownHallucination(string &in asTimer)
{
ChangeMap("map3.map", "PlayerStartArea_1", "", "");
}
OnStart
AddTimer("Countdown", 10.0, "CountdownHallucination");
I noticed you have a space in your map name "map 3.map". It's probably best to not have any spaces, underscore would be a better option. Also.. I'm not sure why it would work using "500f", since I get an error with that. "500.0f" is what it should be, or "500" or "500.0" (without the quotation marks of course ^_^).
This is coming from someone with no other scripting experience other than Amnesia. So don't take my word for it
|
|
10-02-2010, 07:38 AM |
|
Chilton
Member
Posts: 138
Threads: 9
Joined: Sep 2010
Reputation:
0
|
RE: Making a timed room transition (SOLVED)
(10-02-2010, 07:38 AM)Alexander Wrote: (10-02-2010, 06:08 AM)Chilton Wrote: Ok
To go into more detail, im trying to make a script for a map in which you are transitioned into the map (Irrelevant), then after a set time, you automatically move to a new map.
------
void OnStart()
{
AddTimer("Countdown", 500f, "CountdownHallucination");
}
void CountdownHallucination(string &in asTimer)
{
ChangeMap("map 3.map", "PlayerStartArea_1", "player_climb.snt", "player_crouch.snt");
}
------
^^ Is what i currently have, and the script is accepted, but after the 500f, nothing happens. I even left it for longer and nothing happens.
What am i not doing here?
As usual, any guidance is much appreciated.
Well I just tested something and it worked for me. Try this.
void CountdownHallucination(string &in asTimer)
{
ChangeMap("map3.map", "PlayerStartArea_1", "", "");
}
OnStart
AddTimer("Countdown", 10.0, "CountdownHallucination");
I noticed you have a space in your map name "map 3.map". It's probably best to not have any spaces, underscore would be a better option. Also.. I'm not sure why it would work using "500f", since I get an error with that. "500.0f" is what it should be, or "500" or "500.0" (without the quotation marks of course ^_^).
This is coming from someone with no other scripting experience other than Amnesia. So don't take my word for it
Removed 500f, and renamed the maps a bit, and now it magically works.
Im not even going to read in to how such tiny things made a difference, but the important thing is that it wont happen again
Thankyou very much
|
|
10-02-2010, 07:41 AM |
|
Alexander
Junior Member
Posts: 22
Threads: 2
Joined: Sep 2010
Reputation:
0
|
RE: Making a timed room transition (SOLVED)
Wow! That was quick. Glad to hear you have it working now
|
|
10-02-2010, 07:44 AM |
|
Chilton
Member
Posts: 138
Threads: 9
Joined: Sep 2010
Reputation:
0
|
RE: Making a timed room transition (SOLVED)
(10-02-2010, 07:44 AM)Alexander Wrote: Wow! That was quick. Glad to hear you have it working now
Oh, Alexander, ok... Well, i dont know how to say this, but could you wait a moment, i need to kill you if you dont mind. Its ok. Death on swift wings will come for you, and by my hand you will be rendered whole again... Wait, this is a forum
|
|
10-02-2010, 09:03 AM |
|
|