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
Timing problem, please help.
-
- Vault Veteran
- Posts: 292
- Joined: Fri Apr 19, 2002 11:51 am
Re: Timing problem, please help.
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 .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?
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