Jump to content

Help with scripting plz, am I doing this right?


cobalt262

Recommended Posts

Hi all, If some resident guru / scripting genius / god-of-modding could help me out I'd appreciate it.

 

Just ran into a problem with my Lil Critters mod - Radscorpion Kings spawning inside Hamilton's Hideaway. I need help in confirming if I've gotten this scripting done properly (still learning). The idea behind the script is to check if a RadscorpionKing is inside Hamiltons Hideaway/Friendship Sewer and resize it to 0.5 if it is still in it's 2.0 scale. (or would it be 1.0 since that is it's default size when spawned??)

 

GECK creature id: CrRadscorpion2Huge (01000EAA)

GECK creature scale: 2.0

interior cells to check: HamiltonsHideaway01 , zFriendshipSewer

 

begin Gamemode

 if (CrRadscorpion2Huge.GetInCell HamiltonsHideaway01 == 1 && CrRadscorpion2Huge.getscale == 2) 
	   CrRadscorpion2Huge.setscale 0.5
 elseif (CrRadscorpion2Huge.GetInCell zFriendshipSewer == 1 && CrRadscorpion2Huge.getscale == 2)
	   CrRadscorpion2Huge.setscale 0.5
 endif
end

 

GetInCell command came from GECK site but was referenced as a TES4 command, any confirmation it still works in Fallout 3?

 

Haven't tried this out yet - won't have access to my Fallout3 PC for today or tomorrow - if someone could tell me if this will even possibly work would be great.

Link to comment
Share on other sites

Hi all, If some resident guru / scripting genius / god-of-modding could help me out I'd appreciate it.

 

Just ran into a problem with my Lil Critters mod - Radscorpion Kings spawning inside Hamilton's Hideaway. I need help in confirming if I've gotten this scripting done properly (still learning). The idea behind the script is to check if a RadscorpionKing is inside Hamiltons Hideaway/Friendship Sewer and resize it to 0.5 if it is still in it's 2.0 scale. (or would it be 1.0 since that is it's default size when spawned??)

 

GECK creature id: CrRadscorpion2Huge (01000EAA)

GECK creature scale: 2.0

interior cells to check: HamiltonsHideaway01 , zFriendshipSewer

 

begin Gamemode

 if (CrRadscorpion2Huge.GetInCell HamiltonsHideaway01 == 1 && CrRadscorpion2Huge.getscale == 2) 
	   CrRadscorpion2Huge.setscale 0.5
 elseif (CrRadscorpion2Huge.GetInCell zFriendshipSewer == 1 && CrRadscorpion2Huge.getscale == 2)
	   CrRadscorpion2Huge.setscale 0.5
 endif
end

 

GetInCell command came from GECK site but was referenced as a TES4 command, any confirmation it still works in Fallout 3?

 

Haven't tried this out yet - won't have access to my Fallout3 PC for today or tomorrow - if someone could tell me if this will even possibly work would be great.

I wouldn't consider myself an expert, but it looks generally ok, assuming setscale can be read like that.

 

For the code, though, might I suggest something like this:

short ScaleChecked

begin Gamemode
if scalechecked == 0
	set scalechecked to 1
; no need to check if it's big, it is guaranteed to be right now
	if CrRadscorpion2Huge.GetInCell HamiltonsHideaway01 == 1
		CrRadscorpion2Huge.setscale 0.5
	elseif CrRadscorpion2Huge.GetInCell zFriendshipSewer == 1
		CrRadscorpion2Huge.setscale 0.5
 	endif
endif
end

This way we only ever check its scale the once. I haven't tested this but it should in principle work, and use a lot less cycles.

 

Getincell does work, I've used it.

Link to comment
Share on other sites

Thanks ar13 :thanks:

 

Will try out both scripts when I get my main PC back - had thought the scale would need to be checked multiple times seeing as it's being used in conjunction with a spawn point which can be triggered again and again (I think there are about 6 spawns in Hamilton's Hideaway)

 

Never really got into modding Oblivion and the only script-type mod experience I've got is as old as OperationFlashpoint, so this is all new to me. Thanks for the response.

Link to comment
Share on other sites

Er, yeah, I admit I don't know the scope of the script. Does every single CrRadscorpion2Huge get its own version of that script - in which case mine is good - or do they all share the same one, in which case yours works better.

--------------

I've had to use refid's to do things like set scale. (ie in Mika's "Attack of the 50 Foot Woman" script I use MikaSniperREF.setscale 8.35.) I suspect you will need to also.

Link to comment
Share on other sites

Every CrRadscorpion2Huge that is spawned would be running it's own copy of the same script. Just adding the script to the Creature Reference should do that right? So your script example sounds like the way to go.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...