I's just so simple, but ok, here You have:The hook works, you are doing something wrong. Nobody can help you if you don't post your script.
procedure my_item_desc begin
display_msg("Item new desc");
end
...
procedure start begin
variable who, cur_dmg_thresh, cur_dmg_resist, color, msg, m;
if(game_loaded) then begin
register_hook_proc(HOOK_DESCRIPTIONOBJ, my_item_desc);
end
...
end
I's just so simple
procedure my_item_desc begin
variable
item := obj_pid(get_sfall_arg),
description;
if (item == PID_MyItem) then begin
description := get_string_pointer(message_str(SCRIPT_FARMPART, 101));
set_sfall_return(description);
end
end
And now when i click on an scenery object, say a pot and select "examine" nothing happens...I's just so simple, but ok, here You have:
Code:procedure my_item_desc begin display_msg("Item new desc"); end ... procedure start begin variable who, cur_dmg_thresh, cur_dmg_resist, color, msg, m; if(game_loaded) then begin register_hook_proc(HOOK_DESCRIPTIONOBJ, my_item_desc); end ... end
I'm running it in a global script. Testing ingame.You give way too little details of what you actually want to do. Also where are you running the hook? Item script or global script? Are you testing ingame or in the mapper?
procedure look_at_p_proc begin
script_overrides;
display_msg("my text on mouse over");
end
procedure description_p_proc begin
script_overrides;
display_msg("my text on binocular");
end
Ok, thxAre you serious? Is this still about changing the message log text? There is no hook needed for that. Just look at the Fallout 2 scripts, that stuff is everywhere.
Code:procedure look_at_p_proc begin script_overrides; display_msg("my text on mouse over"); end procedure description_p_proc begin script_overrides; display_msg("my text on binocular"); end
// print
SetFont(103);
overlay_create(WINTYPE_IFACEBAR);
interface_print("Hello World!", WINTYPE_IFACEBAR, 10, 10, 105);
// clear
overlay_clear(WINTYPE_IFACEBAR);
Sorry, but getting: Unknown name identifier overlay_create...Code:// print SetFont(103); overlay_create(WINTYPE_IFACEBAR); interface_print("Hello World!", WINTYPE_IFACEBAR, 10, 10, 105); // clear overlay_clear(WINTYPE_IFACEBAR);
![]()
Oh, I forgot I use a new function in the coming release.Sorry, but getting: Unknown name identifier overlay_create...
SetFont(103);
interface_print("Hello World!", WINTYPE_INVENTORY, 10, 10, 105);
Ok, thx, that's workOh, I forgot I use a new function in the coming release.
Just ignore overlay_create/clear for now, the two lines can print the text as well.
Code:SetFont(103); interface_print("Hello World!", WINTYPE_INVENTORY, 10, 10, 105);
![]()