I made this simple script and I have two problems:
a) minor one, push_p_proc worked, now does not work anymore
b) no matter what I try, floaters are not shown. What am I doing wrong? The simple dialogue works though.
/* Include Files */
#include "..\headers\define.h"
#define NAME SCRIPT_SPCHECK
#define TOWN_REP_VAR (GVAR_TOWN_REP_FLORENCE)
#include "..\headers\command.h"
#include "..\headers\Modreact.h"
/* Standard Script Procedures */
procedure start;
procedure use_p_proc;
procedure look_at_p_proc;
procedure description_p_proc;
procedure use_skill_on_p_proc;
procedure use_obj_on_p_proc;
procedure damage_p_proc;
procedure map_enter_p_proc;
procedure map_update_p_proc;
procedure talk_p_proc;
procedure p_push_proc;
procedure critter_p_proc;
/* Script Specific Procedure Calls */
procedure Node998; // This Node is Always Combat
procedure Node999; // This Node is Always Ending
//~~~~~~~~~~~~~~~~ DESIGNER TOOL STARTS HERE
procedure Node001;
procedure Node002;
procedure Node003;
//~~~~~~~~~~~~~~~~ DESIGN TOOL ENDS HERE
/*****************************************************************
Local Variables which are saved. All Local Variables need to be
prepended by LVAR_
*****************************************************************/
#define LVAR_Herebefore (4)
#define LVAR_Hostile (5)
#define LVAR_Personal_Enemy (6)
/*******************************************************************
Local variables which do not need to be saved between map changes.
*******************************************************************/
variable Only_Once:=0;
/*******************************************************************
******* PROCEDURES *******
*****************************************************/
procedure start begin
end
procedure map_enter_p_proc begin
Only_Once:=0;
critter_add_trait(self_obj,TRAIT_OBJECT,OBJECT_TEAM_NUM,TEAM_ARROYO);
critter_add_trait(self_obj,TRAIT_OBJECT,OBJECT_AI_PACKET,AI_COWARD);
end
procedure use_p_proc begin
end
procedure look_at_p_proc begin
script_overrides;
if (local_var(LVAR_Herebefore) == 0) then
display_msg(mstr(100));
else
display_msg(mstr(101));
end
procedure description_p_proc begin
script_overrides;
display_msg(mstr(102));
end
procedure p_push_proc begin
script_overrides; /also tried without this part/
end
procedure use_skill_on_p_proc begin
end
procedure use_obj_on_p_proc begin
end
procedure Node998 begin
set_local_var(LVAR_Hostile,2);
end
procedure critter_p_proc begin
if ((local_var(LVAR_Hostile) == 2) and (obj_can_see_obj(self_obj,dude_obj))) then begin
set_local_var(LVAR_Hostile,1);
attack(dude_obj);
end
end
procedure damage_p_proc begin
if (source_obj == dude_obj) then begin
set_local_var(LVAR_Personal_Enemy,1);
set_global_var(GVAR_ENEMY_ARROYO,1);
end
end
procedure map_update_p_proc begin
end
procedure Node003 begin
float_msg(self_obj, mstr(random(109, 112)), FLOAT_MSG_NORMAL);
end
procedure talk_p_proc begin
start_gdialog(NAME,self_obj,4,-1,-1);
gSay_Start;
call Node001;
gSay_End;
end_dialogue;
end
procedure Node999 begin
end
procedure Node001 begin
Reply(104);
NOption(105,Node002,004);
NOption(106,Node999,004);
end
procedure Node002 begin
Reply(107);
NOption(108,Node999,004);
end
a) minor one, push_p_proc worked, now does not work anymore
b) no matter what I try, floaters are not shown. What am I doing wrong? The simple dialogue works though.
/* Include Files */
#include "..\headers\define.h"
#define NAME SCRIPT_SPCHECK
#define TOWN_REP_VAR (GVAR_TOWN_REP_FLORENCE)
#include "..\headers\command.h"
#include "..\headers\Modreact.h"
/* Standard Script Procedures */
procedure start;
procedure use_p_proc;
procedure look_at_p_proc;
procedure description_p_proc;
procedure use_skill_on_p_proc;
procedure use_obj_on_p_proc;
procedure damage_p_proc;
procedure map_enter_p_proc;
procedure map_update_p_proc;
procedure talk_p_proc;
procedure p_push_proc;
procedure critter_p_proc;
/* Script Specific Procedure Calls */
procedure Node998; // This Node is Always Combat
procedure Node999; // This Node is Always Ending
//~~~~~~~~~~~~~~~~ DESIGNER TOOL STARTS HERE
procedure Node001;
procedure Node002;
procedure Node003;
//~~~~~~~~~~~~~~~~ DESIGN TOOL ENDS HERE
/*****************************************************************
Local Variables which are saved. All Local Variables need to be
prepended by LVAR_
*****************************************************************/
#define LVAR_Herebefore (4)
#define LVAR_Hostile (5)
#define LVAR_Personal_Enemy (6)
/*******************************************************************
Local variables which do not need to be saved between map changes.
*******************************************************************/
variable Only_Once:=0;
/*******************************************************************
******* PROCEDURES *******
*****************************************************/
procedure start begin
end
procedure map_enter_p_proc begin
Only_Once:=0;
critter_add_trait(self_obj,TRAIT_OBJECT,OBJECT_TEAM_NUM,TEAM_ARROYO);
critter_add_trait(self_obj,TRAIT_OBJECT,OBJECT_AI_PACKET,AI_COWARD);
end
procedure use_p_proc begin
end
procedure look_at_p_proc begin
script_overrides;
if (local_var(LVAR_Herebefore) == 0) then
display_msg(mstr(100));
else
display_msg(mstr(101));
end
procedure description_p_proc begin
script_overrides;
display_msg(mstr(102));
end
procedure p_push_proc begin
script_overrides; /also tried without this part/
end
procedure use_skill_on_p_proc begin
end
procedure use_obj_on_p_proc begin
end
procedure Node998 begin
set_local_var(LVAR_Hostile,2);
end
procedure critter_p_proc begin
if ((local_var(LVAR_Hostile) == 2) and (obj_can_see_obj(self_obj,dude_obj))) then begin
set_local_var(LVAR_Hostile,1);
attack(dude_obj);
end
end
procedure damage_p_proc begin
if (source_obj == dude_obj) then begin
set_local_var(LVAR_Personal_Enemy,1);
set_global_var(GVAR_ENEMY_ARROYO,1);
end
end
procedure map_update_p_proc begin
end
procedure Node003 begin
float_msg(self_obj, mstr(random(109, 112)), FLOAT_MSG_NORMAL);
end
procedure talk_p_proc begin
start_gdialog(NAME,self_obj,4,-1,-1);
gSay_Start;
call Node001;
gSay_End;
end_dialogue;
end
procedure Node999 begin
end
procedure Node001 begin
Reply(104);
NOption(105,Node002,004);
NOption(106,Node999,004);
end
procedure Node002 begin
Reply(107);
NOption(108,Node999,004);
end