Page 1 of 1

Timing problem, please help.

Posted: Mon Jun 30, 2003 10:54 am
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

Re: Timing problem, please help.

Posted: Tue Jul 01, 2003 12:54 am
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


Posted: Tue Jul 01, 2003 10:54 am
by zenbreak
Thanks Temaperacl for your reading of my poor English and help.