Set Scale Script and no knockdown

Post » Thu Jul 22, 2010 7:33 am

At one time there was and may still be a mod that made Power Armour scale to be a bit bigger than a normal sized npc. Making how Power Armour should of been at least to some. So my question is since I can't seem to find that mod anymore. How would the Script go for making the Armour Scale to about 1.15 or 1.2 in size when equipped? And for my other question is it possible to make a script as to where I can't be knocked down say by a super Mutant or does that deal with Agility, Strength or, Endurance Or something else?
User avatar
Ben sutton
 
Posts: 3427
Joined: Sun Jun 10, 2007 4:01 am

Post » Thu Jul 22, 2010 4:05 am

So my question is since I can't seem to find that mod anymore. How would the Script go for making the Armour Scale to about 1.15 or 1.2 in size when equipped?



ScriptName ArmorSizeIncreaseSCRBegin OnEquip  SetScale 1.2EndBegin OnUnequip  SetScale 1.0End


Add the script to only ONE custom piece of that armor suit in the geck.
There's an odd bug related to using setscale in which on rare occasions the player/NPC gets stretched out with long arms and whatnot. Removing and reequipping the armor should fix it, or SetScale 1 from the console.
User avatar
Dewayne Quattlebaum
 
Posts: 3529
Joined: Thu Aug 30, 2007 12:29 pm

Post » Wed Jul 21, 2010 5:47 pm

You shouldn't be using http://geck.gamesas.com/index.php/GetSelf there - you should be using http://geck.gamesas.com/index.php/GetContainer.

http://geck.gamesas.com/index.php/GetSelf should never be used in that way anyway, as you can just call a function on the scripted reference by omitting reference syntax, i.e.
SetScale; Instead ofSelf.SetScale
Using http://geck.gamesas.com/index.php/GetSelf needlessly will just make a script slower and make it break if it's run on a dynamically created reference, as http://geck.gamesas.com/index.php/GetSelf seems to return 0 when called on references stored in the save game (such as those created via http://geck.gamesas.com/index.php/PlaceAtMe, or dropped from the player's inventory).

Cipscis
User avatar
victoria gillis
 
Posts: 3329
Joined: Wed Jan 10, 2007 7:50 pm

Post » Thu Jul 22, 2010 9:33 am

You shouldn't be using http://geck.gamesas.com/index.php/GetSelf there - you should be using http://geck.gamesas.com/index.php/GetContainer.

Ahh yup.. thanks. Old habits are hard to break.

as GetSelf seems to return 0 when called on references stored in the save game (such as those created via PlaceAtMe, or dropped from the player's inventory).

Double thanks. That just explains one of the issues that's been making my hair fallout.
User avatar
lauren cleaves
 
Posts: 3307
Joined: Tue Aug 15, 2006 8:35 am

Post » Thu Jul 22, 2010 9:07 am

Thanks to both of you for the script. Now if only I can find a script as to where I can't be knocked down by a super mutant when fighting them hand to hand lol. And to get cloak sound to properly play. I kinda went and copied and pasted my online script but now it plays constantly. So I'm gonna see if I can get it to run properly.

This is the script I tried and made the Cloak engaged sound loop constantly before the sound was even finished playing.
begin GameMode
if DoOnce == 0
if player.isSneaking == 1
playsound Cloak
set DoOnce to 1
endif
end
User avatar
Lewis Morel
 
Posts: 3431
Joined: Thu Aug 16, 2007 7:40 pm

Post » Thu Jul 22, 2010 8:35 am

Well I changed 1.2 to 1.35 for OnEquip and 1.0 to 1.15 OnUnequip as that's my Pc's scale I set him to. But when I equip the Armour the game stops responding & when it finally does the game crashes some reason. I put the script below my Playsound Online.wave. Should I put the Setscale above my Playsound script? Or on another piece of Armour?
User avatar
Sylvia Luciani
 
Posts: 3380
Joined: Sun Feb 11, 2007 2:31 am

Post » Wed Jul 21, 2010 11:07 pm

Well I changed 1.2 to 1.35 for OnEquip and 1.0 to 1.15 OnUnequip as that's my Pc's scale I set him to. But when I equip the Armour the game stops responding & when it finally does the game crashes some reason. I put the script below my Playsound Online.wave. Should I put the Setscale above my Playsound script? Or on another piece of Armour?

Its placing above and or below that should not matter. You made a sound object called Online.wave? You have to create a sound object for it, and direct it to your sound file, then tell it to play the sound OBJECT that you made in the geck. So its probably crashing because of that. Also note since you made it set scale to 1.15 no other plays can use your armor, should you release it, since it would mess up their scale. Well they could, but it would be at their own risk, so let them know it does that.
User avatar
Jennifer May
 
Posts: 3376
Joined: Thu Aug 16, 2007 3:51 pm

Post » Wed Jul 21, 2010 9:01 pm

Oh I don't plan on releasing it I just mess with stuff in game like set scale & such. I have MMM so npcs and mobs are random sizes some 1.05 or smaller & some times they are 1.12 or bigger. So I figured I'd set my Pc's scale to be a bit bigger than the rest. About the sound file it runs fine in game no problems what so ever it's just when I tried to put on the Armour with the Setscale script my game acted like it wanted to lock up when I equipped the Armour. Then finally the game unlocked & then it CTD'd I had to restart my pc because of it.
User avatar
Kyra
 
Posts: 3365
Joined: Mon Jan 29, 2007 8:24 am

Post » Thu Jul 22, 2010 9:57 am

Do you have any other things running on that armor? Or is it just custom armor you made yourself with nothing but the setscale commands (script) on it?
User avatar
Stu Clarke
 
Posts: 3326
Joined: Fri Jun 22, 2007 1:45 pm

Post » Thu Jul 22, 2010 4:07 am

Thanks to both of you for the script. Now if only I can find a script as to where I can't be knocked down by a super mutant when fighting them hand to hand lol. And to get cloak sound to properly play. I kinda went and copied and pasted my online script but now it plays constantly. So I'm gonna see if I can get it to run properly.

This is the script I tried and made the Cloak engaged sound loop constantly before the sound was even finished playing.
begin GameMode
if DoOnce == 0
if player.isSneaking == 1
playsound Cloak
set DoOnce to 1
endif
end


Not sure what the whole context of all this is, but noticed you were missing an endif, had the player sneaking check buried, and had nothing to set DoOnce back to 0 for the next time.
begin GameMode  if player.isSneaking == 1	if DoOnce == 0	  playsound Cloak	  set DoOnce to 1	endif  elseif player.IsSneaking == 0	if DoOnce == 1	  set DoOnce to 0	endifend


Edit: Added a 2nd conditional so you don't constantly hammer doonce to 0 all the time, and because I know someone's gonna call me on it :P
User avatar
Jack
 
Posts: 3483
Joined: Sat Oct 20, 2007 8:08 am

Post » Thu Jul 22, 2010 4:00 am

If you want to play some code once when a piece of armour is equipped, it'd be easiest to use a scripted object effect with a condition of "target http://geck.gamesas.com/index.php/IsSneaking != 0". That way, the script just needs to be this:
Begin ScriptEffectStart player	PlaySound CloakEnd
The same concept applies for running code when armour is equipped or unequipped to change the player's scale:
Begin ScriptEffectStart	SetScale 1.2EndBegin ScriptEffectFinish	SetScale 1End

If you want to use a http://geck.gamesas.com/index.php/GameMode block in an object script though, it would be more efficient to use a structure like this:
int bSneakingBegin GameMode	if player.IsSneaking != bSneaking		set bSneaking to player.IsSneaking		if bSneaking			PlaySound Cloak		endif	endifEnd
If the item can be in an inventory without being equipped by the player, you'll need extra checks for that as well.

Cipscis
User avatar
James Shaw
 
Posts: 3399
Joined: Sun Jul 08, 2007 11:23 pm

Post » Thu Jul 22, 2010 9:03 am

Thanks Cipscis & Bonedog, Also not sure if you can really see the Armour in my new Display pic but that's the Armour I've been using & it kinda reminds me of Mech Armour so I've been trying to get it to play sounds once it's equipped and when I enter sneak mode. If I could find a non annoying cool sounding interface mod that's similar to AleXa Interface found on PlanetFallout. I'd have that as well.

Edit to Gunmaster: I didn't make the Armour it's from a Fallout mod site and Only other script I had on it at the time is the Playsound Online.wav so when I equip the Armour A computer voice will say systems initiated stabilizing stabilizing all systems online.
User avatar
Nancy RIP
 
Posts: 3519
Joined: Mon Jan 29, 2007 5:42 am


Return to Fallout 3