SetPCcanUsePowerArmor error

Post » Mon Mar 14, 2011 7:20 pm

Hey all, i have this script

scriptname v18combatsimulationshort buttonshort capturebegin OnactivateShowmessage v18combatsimmenu; Shows the combat sim menuset capture to 1endBegin Gamemodeif capture == 1set button to getbuttonpressed if button > -1set capture to 0if button == 0          v18comsimroom01.lock 100  v18combatsimoppmarker.placeatme Raider2GunAM 1 3  player.equipitem ArmorPowerArmy 1  player.equipitem ArmorPowerHelmet 1  showmessage v18comsimstartedelseif button == 1   v18comsimroom01.lock 100   v18combatsimoppmarker.placeatme CrSuperMutant2GunC 1 3   player.equipitem ArmorPowerArmy 1   player.equipitem ArmorPowerHelmet 1   Showmessage v18comsimstartedelseif button ==  2if player.isincombat == 0  v18comsimroom01.unlockelseif player.isincombat == 1showmessage v18comsimerrorendifendifendifendifendifendifend


Now i want to add an IF statement.

if ( SetPCcanUsePowerArmor == 0 )SetPCcanUsePowerArmor 1Player.Additem [poweramor body]player.EquipItem [power armor pody]endifelseif ( SetPCcanUsePowerArmor == 1 )Player.Additem [poweramor body]player.EquipItem [power armor pody]endif

But of coarse that doesn't work.
If You Could Get Back to Me ASAP
Thanka Persidon
User avatar
Everardo Montano
 
Posts: 3373
Joined: Mon Dec 03, 2007 4:23 am

Post » Tue Mar 15, 2011 12:33 am

It should be GetPCcanUsePowerArmor, not SerPCcanUsePowerArmor.
User avatar
Wayland Neace
 
Posts: 3430
Joined: Sat Aug 11, 2007 9:01 am

Post » Tue Mar 15, 2011 4:18 am

what is that in FOSE coz it aint in the list of functions @ http://geck.gamesas.com/
User avatar
Cash n Class
 
Posts: 3430
Joined: Wed Jun 28, 2006 10:01 am

Post » Mon Mar 14, 2011 3:28 pm

what is that in FOSE coz it aint in the list of functions @ http://geck.gamesas.com/


Whoops! Nevermind me!

You could check if the player has the Power Armor training perk.
User avatar
Destinyscharm
 
Posts: 3404
Joined: Sun Jul 23, 2006 6:06 pm

Post » Tue Mar 15, 2011 5:19 am

What about this, will it work
scriptname v18combatsimulationshort buttonshort capturebegin OnactivateShowmessage v18combatsimmenu; Shows the combat sim menuset capture to 1endBegin Gamemodeif capture == 1set button to getbuttonpressed if button > -1set capture to 0if button == 0          v18comsimroom01.lock 100  v18combatsimoppmarker.placeatme Raider2GunAM 1 3      if ( player.HasPerk PowerArmorTraining )          player.additem ArmorPowerArmy 1 1          player.additem ArmorPowerHelmet 1 1          player.equipitem ArmorPowerArmy 1 1          player.equipitem ArmorPowerHelmet 1 1       endif           showmessage v18comsimstarted   elseif button == 1   v18comsimroom01.lock 100   v18combatsimoppmarker.placeatme CrSuperMutant2GunC 1 3   player.equipitem ArmorPowerArmy 1   player.equipitem ArmorPowerHelmet 1   Showmessage v18comsimstartedelseif button ==  2if player.isincombat == 0  v18comsimroom01.unlock         elseif player.isincombat == 1showmessage v18comsimerrorendif        endifendifendifend

User avatar
John N
 
Posts: 3458
Joined: Sun Aug 26, 2007 5:11 pm

Post » Mon Mar 14, 2011 9:23 pm

I see no errors in the script. This looks like it would work :)
User avatar
Stephani Silva
 
Posts: 3372
Joined: Wed Jan 17, 2007 10:11 pm

Post » Mon Mar 14, 2011 6:14 pm

Thanks alot, i got it lol, another problem, thats script is on a console, now i need some help with this one on the actual armor.
ScriptName v18comsimpowerarmorfloat PChealthBegin Gamemode  if ( player.IsInCombat == 1 ) ; just a fixed back door type thing      set PChealth to player.GetHealthPercentage                        if ( PChealth <= 0.01 )                            player.ModActorValue health 1000                        endif  endifEnd


Now i want that to set my health to that when my health is 1 (0.01), but the raider in the room kills me, its like the script wont work
User avatar
Manny(BAKE)
 
Posts: 3407
Joined: Thu Oct 25, 2007 9:14 am

Post » Mon Mar 14, 2011 9:25 pm

Thanks alot, i got it lol, another problem, thats script is on a console, now i need some help with this one on the actual armor.
ScriptName v18comsimpowerarmorfloat PChealthBegin Gamemode  if ( player.IsInCombat == 1 ) ; just a fixed back door type thing      set PChealth to player.GetHealthPercentage                        if ( PChealth <= 0.01 )                            player.ModActorValue health 1000                        endif  endifEnd


Now i want that to set my health to that when my health is 1 (0.01), but the raider in the room kills me, its like the script wont work


That's most likely because the raider kills you before the script checks how much health you have. I suggest you use http://geck.gamesas.com/index.php/GetHealthPercentage and around ten percent. There should be no way the raider can knock 10% of in one shot.
User avatar
Catherine N
 
Posts: 3407
Joined: Sat Jan 27, 2007 9:58 pm

Post » Tue Mar 15, 2011 12:12 am

ok, just ckecking now
User avatar
carley moss
 
Posts: 3331
Joined: Tue Jun 20, 2006 5:05 pm

Post » Tue Mar 15, 2011 4:06 am

Ok, thanks, that works
1. When the health bar refills to he set amout, the raider or other NPC only does about 0.05% damage, its like he uses 10 clips of ammo to kill 1 bar of the health bar.
2. When the player exits the simulation i have a script take the armor, when it collects, the player has no clothes on, is there away to add something from the inventory, like something random?
User avatar
Matthew Warren
 
Posts: 3463
Joined: Fri Oct 19, 2007 11:37 pm

Post » Tue Mar 15, 2011 2:23 am

Ok, thanks, that works
1. When the health bar refills to he set amout, the raider or other NPC only does about 0.05% damage, its like he uses 10 clips of ammo to kill 1 bar of the health bar.


You should use RestoreAV instead. You basically increased your players health by 1000.
User avatar
Eilidh Brian
 
Posts: 3504
Joined: Mon Jun 19, 2006 10:45 am

Post » Mon Mar 14, 2011 8:36 pm

It would probably be better to just use http://geck.gamesas.com/index.php/ResetHealth
User avatar
Bigze Stacks
 
Posts: 3309
Joined: Sun May 20, 2007 5:07 pm


Return to Fallout 3