[Fallout 1] Critter_Action vs critter_p_proc in scripts

Sduibek

Creator of Fallout Fixt
Moderator
Modder
The command/check "obj_can_see_obj(self_obj, dude_obj)" -- checks to see if you're in the Line-of-Sight of the NPC -- does not work at all for Gizmo, at least on the JUNKCSNO map. It's not really worth making a test map just to see if it's 100% broken :P

Anyway, my theory: He's so fat he can't see anything over his double-chin! Seems legit.

8-) :mrgreen:


EDIT:
This is a script system bug apparently, and applies to other critters as well:
http://www.nma-fallout.com/forum/viewtopic.php?p=971038#971038
 
Re: Found something funny in Gizmo's scripting

Sduibek said:
The command/check "obj_can_see_obj(self_obj, dude_obj)" -- checks to see if you're in the Line-of-Sight of the NPC -- does not work at all for Gizmo, at least on the JUNKCSNO map. It's not really worth making a test map just to see if it's 100% broken :P

Anyway, my theory: He's so fat he can't see anything over his double-chin! Seems legit.

8-) :mrgreen:

Indeed, sounds legit, but on the technical level, this may be caused by the fact that Gizmo has only one direction, or to be more precise - on each of the six usual critter directions, he's got the same art displayed. Maybe the developers didn't think about it and placed Gizmo with the NE rotation (rotation 0), thereby, he "sees" in another direction, than the player approaches him. Try to see if anything changes if you rotate Gizmo to rotation 2 (SE).
 
Re: Found something funny in Gizmo's scripting

Ardent said:
Sduibek said:
The command/check "obj_can_see_obj(self_obj, dude_obj)" -- checks to see if you're in the Line-of-Sight of the NPC -- does not work at all for Gizmo, at least on the JUNKCSNO map. It's not really worth making a test map just to see if it's 100% broken :P

Anyway, my theory: He's so fat he can't see anything over his double-chin! Seems legit.

8-) :mrgreen:

Indeed, sounds legit, but on the technical level, this may be caused by the fact that Gizmo has only one direction, or to be more precise - on each of the six usual critter directions, he's got the same art displayed. Maybe the developers didn't think about it and placed Gizmo with the NE rotation (rotation 0), thereby, he "sees" in another direction, than the player approaches him. Try to see if anything changes if you rotate Gizmo to rotation 2 (SE).
The obj_dist(dude to self) doesn't work either, so I think his PRO is just configured all wacky. Mapper is giving me troubles right now but when I get it working I'll play around and see if i can find what's up.
 
This resolved the issue:

* Interesting to note, is that I ran several searches, and I'm pretty sure Gizmo did NOT begin having Critter_Action in his script, but rather critter_p_proc. So I'm not sure why this breaks some critters' scripts and doesn't for others.

-----

Fallout 1 scripts using the older version of critter_p_proc (critter_proc for you Fallout 2 folks), aka Critter_Action, actually DO NOT WORK if you rename every instance of "Critter_Action" in the script file to "critter_p_proc". You can literally leave everything else the same, but after that renaming, things like tile_distance_objs and obj_can_see_obj don't work anymore.

:crazy:

The only reason I discovered this is due to a bug report on my mod. I found out that the conversation Harry starts with the character when he sees the character, is NEVER triggered on its own (i.e. just from walking up to him) because critter_p_proc never triggers.

I'd changed the verbiage on those older-style scripts a few version ago in my mod to make everything tidy and "standards compliant" (there are no standards per se but that's fun to type :mrgreen:) so now I gotta change them all back. lulz. Thank goodness for Windows Grep, Sadman Search and Beyond Compare.

Code:
						if (obj_can_see_obj(self_obj, dude_obj) and (tile_distance_objs(self_obj, dude_obj) < 8) and (global_var(306) < 1)) then begin
							if (local_var(4) == 0) then begin
								dialogue_system_enter;
							end
							else begin
								call Critter_Action;
							end
						end
						else begin
							call Critter_Action;
						end
^ example
 
Back
Top