Timing problem, please help.

Discuss the creation and scripting of new fan-made games and mods for the Fallout series of games.
Post Reply
zenbreak
SDF!
SDF!
Posts: 4
Joined: Sat Jun 28, 2003 5:55 am

Timing problem, please help.

Post by zenbreak »

I encounter a problem that when i want to make an NPC move from position A to position B, or use float_msg() to display a dialogue and then next dialogue as below, how can i add a "time blank" between those 2 actions?


procedure start;

procedure start
begin
float_msg(self_obj,"test1", FLOAT_MSG_BLUE);

//I inserted a line "add_timer_event(self_obj, game_ticks(13), 3);" but didn't succeed.
float_msg(self_obj,"test2", FLOAT_MSG_BLUE);
end
Temaperacl
Vault Veteran
Vault Veteran
Posts: 292
Joined: Fri Apr 19, 2002 11:51 am

Re: Timing problem, please help.

Post by Temaperacl »

zenbreak wrote:I encounter a problem that when i want to make an NPC move from position A to position B, or use float_msg() to display a dialogue and then next dialogue as below, how can i add a "time blank" between those 2 actions?
What you should do to trigger the second action is have the add_timer_event- and then you have to put the second action in the timed_event_p_proc .

So what you would have is something like this (using your example):


procedure start
begin
float_msg(self_obj,"test1", FLOAT_MSG_BLUE);
add_timer_event(self_obj, game_ticks(13), 3);
end

procedure timed_event_p_proc
begin
if (fixed_param == 3) then
begin
float_msg(self_obj,"test2", FLOAT_MSG_BLUE);
end
end

zenbreak
SDF!
SDF!
Posts: 4
Joined: Sat Jun 28, 2003 5:55 am

Post by zenbreak »

Thanks Temaperacl for your reading of my poor English and help.
Post Reply