Robert B
Kitty's got some rads!
Okay, so forgive me as I work my way through creating my first more complex mod. I've decided to test out script snippets in the existing game files before I go creating my own from scratch. I've had no problem with more complex commands (like manipulating player inventory, updating stats, etc.); but this simple one appears to stump me.
Say I want to have a message come up in the dialog screen every time someone comes into a specific map location. In this case, I'm editing ARTEMPLE.SSL for the sake of simplicity. I have written the following lines of code...
procedure start
begin
display_msg("start test");
end
So that's good. It works in the start procedure and the message is displayed.
Now for where things break. If I put the same command display_msg("start test"); into one of the other procedures, it doesn't work. For example, I put it in procedure Initial_Inven, I no longer get the text to come up, but the rest of the commands in that procedure execute.
What inanely simple thing am I missing?
Thanks in advance!
RB.-
Ah, okay, to refine the situation... The display message command works before I do my inventory adjustment; but not afterward. Here's how the procedure looks...
procedure Initial_Inven
begin
variable LVar0 := 0;
display_msg("Initial_Inven"); <-- This one works
LVar0 := create_object_sid(1, 0, 0, -1);
add_mult_objs_to_inven(dude_obj, LVar0, 1);
display_msg("Initial_Inven End"); <-- This one doesn't
end
Ugh! Nevermind. It's suddenly working and I didn't change the code at all. Is this an indication that FO2 scripting is glitchy?
Say I want to have a message come up in the dialog screen every time someone comes into a specific map location. In this case, I'm editing ARTEMPLE.SSL for the sake of simplicity. I have written the following lines of code...
procedure start
begin
display_msg("start test");
end
So that's good. It works in the start procedure and the message is displayed.
Now for where things break. If I put the same command display_msg("start test"); into one of the other procedures, it doesn't work. For example, I put it in procedure Initial_Inven, I no longer get the text to come up, but the rest of the commands in that procedure execute.
What inanely simple thing am I missing?
Thanks in advance!
RB.-
Ah, okay, to refine the situation... The display message command works before I do my inventory adjustment; but not afterward. Here's how the procedure looks...
procedure Initial_Inven
begin
variable LVar0 := 0;
display_msg("Initial_Inven"); <-- This one works
LVar0 := create_object_sid(1, 0, 0, -1);
add_mult_objs_to_inven(dude_obj, LVar0, 1);
display_msg("Initial_Inven End"); <-- This one doesn't
end
Ugh! Nevermind. It's suddenly working and I didn't change the code at all. Is this an indication that FO2 scripting is glitchy?
Last edited by a moderator: