Hi, I'm using the IKAROS androids mod, and tweaking it to my own preference. I've created a battle damaged chassis/body as a wearable item, and then I thought, how cool would it be for the game to auto change my characters appearance based on health, to make it look like my character has been damaged.
This would need to be done with a script to add/equip/remove wearable items, but my scripting skills are a little rusty. I haven't done scripting since FO3, and I spent all day yesterday looking at tutorials and going through Wiki, but I'm still totally stumped on the FO4 script language.
What I'm trying to get the script to do is:
1) Check the players health percentage every say, 10 seconds. If the players health is above 50%, then add and equip ArmorA, and remove ArmorB. If the players health is below 50%, then add and equip ArmorB, and remove ArmorA.
2) I need it to add/remove items silently (no message at top left of screen).
3) I also need it to check for duplicates/extras of the armors, (as a precaution) and remove them. The player should only have 1 of ArmorA, or 1 of Armor B at any time.
That's it. If this was FO3 then the script I would write would look something like this, and I would attach it to a quest. (again, a little rusty):
----------------------
Scn callitwhateverscript
StartOn/Event
If getplayer.ref.gethealthpercentage >=50 && getplayer.ref.getitemcount ArmorA ==0
player.removeitem ArmorB 2 1 1
player.additem ArmorA 1 1 1
player.equipitem ArmorA 1
elseif getplayer.ref.gethealthpercentage <50 && getplayer.ref.getitemcount ArmorB ==0
player.removeitem ArmorA 2 1 1
player.additem ArmorB 1 1 1
player.equipitem ArmorB 1
elseif getplayer.ref.getitemcount ArmorA >1
player.removeitem ArmorA 1 1 1
elseif getplayer.ref.getitemcount ArmorB >1
player.removeitem ArmorB 1 1 1
endif
end
----------------------
Could someone please help me rewrite this to work for F04. Much appreciated.