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
wait time script possible ?
Tottel Offline
Senior Member

Posts: 307
Threads: 9
Joined: Nov 2010
Reputation: 0
#11
RE: wait time script possible ?

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.

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.

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.
(This post was last modified: 01-10-2011, 07:06 PM by Tottel.)
01-10-2011, 07:04 PM
Find Reply
sassix Offline
Member

Posts: 56
Threads: 13
Joined: Jan 2011
Reputation: 0
#12
RE: wait time script possible ?

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 ?
01-10-2011, 07:46 PM
Find Reply
Tottel Offline
Senior Member

Posts: 307
Threads: 9
Joined: Nov 2010
Reputation: 0
#13
RE: wait time script possible ?

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?
(This post was last modified: 01-10-2011, 07:54 PM by Tottel.)
01-10-2011, 07:53 PM
Find Reply
sassix Offline
Member

Posts: 56
Threads: 13
Joined: Jan 2011
Reputation: 0
#14
RE: wait time script possible ?

(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 !
01-10-2011, 07:58 PM
Find Reply
Tottel Offline
Senior Member

Posts: 307
Threads: 9
Joined: Nov 2010
Reputation: 0
#15
RE: wait time script possible ?

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
01-10-2011, 08:08 PM
Find Reply
sassix Offline
Member

Posts: 56
Threads: 13
Joined: Jan 2011
Reputation: 0
#16
RE: wait time script possible ?

(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
(This post was last modified: 01-10-2011, 08:11 PM by sassix.)
01-10-2011, 08:10 PM
Find Reply
DIGI Byte Offline
Senior Member

Posts: 376
Threads: 20
Joined: Dec 2010
Reputation: 1
#17
RE: wait time script possible ?

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
01-11-2011, 04:24 AM
Find Reply
sassix Offline
Member

Posts: 56
Threads: 13
Joined: Jan 2011
Reputation: 0
#18
RE: wait time script possible ?

(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
01-11-2011, 05:27 PM
Find Reply
Frontcannon Offline
Senior Member

Posts: 538
Threads: 10
Joined: Jul 2010
Reputation: 2
#19
RE: wait time script possible ?

(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.


╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
01-11-2011, 05:30 PM
Find Reply
sassix Offline
Member

Posts: 56
Threads: 13
Joined: Jan 2011
Reputation: 0
#20
RE: wait time script possible ?

(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 :/
(This post was last modified: 01-11-2011, 06:03 PM by sassix.)
01-11-2011, 06:03 PM
Find Reply




Users browsing this thread: 1 Guest(s)