Praxus9 Posted September 13, 2015 Share Posted September 13, 2015 I am attempting to write a script within the script box of an entry point for a perk. The script uses "DamageAV" (DamageActorValue). When I use a number (ex. player.DamageAV ActionPoints 5), the script works. However, whenever I use a variable to represent a number, the script doesn't work. For instance: float TestVar set TestVar to player.GetAV ActionPoints player.DamageAV ActionPoints TestVar activate player Does not work within that script box for the entry point (I have also used int, var, short & ref). Yet I have successfully used variables for DamageAV and RestoreAV in other scripting incidents outside of the script box (such as a regular script). Can I just not use variables to represent numbers for RestoreAV & DamageAV when using the script box for an entry point or is there a workaround? This is for regular Fallout 3 (no FOSE). Thank you. Link to comment Share on other sites More sharing options...
Praxus9 Posted September 15, 2015 Author Share Posted September 15, 2015 OK. I figured it out and I wanted to share the technique that I used: 1). Create Perk #1. Use the Entry Point -> activate -> script box. Write in the script box "player.addperk Perk #2" ("Perk #2" is whatever you want to call the second perk, which doesn't matter much because you will never see perk #2 anyway). 2). Create Perk #2. Leave it blank for now (but you will come back to it later). 3). Create a miscellaneous object. It could be ANYTHING - No weight, no value. We'll get back to this object later. 4). Create an effect script for the effect that you want. Write "player.additem [whatever the name of your miscellaneous object is] 1 1" (the 2nd '1' is to eliminate the 'added' message) into that script. 5). Create a base effect based upon that script. 6). Create an ability based upon that base effect. 7). Attach the ability to Perk #2. 8 ). Write an object script that removes perk #2 & also the miscellaneous object (use this pre-made script as a guideline): ref rContainer Begin OnAdd set rContainer to GetContainer rContainer.RemovePerk MyPerk RemoveMe End 9). Attach the object script to the miscellaneous object. You are now done. In brief, perk #1 calls perk #2. Perk #2 has a script-based ability that causes the effect that you want and, in that script, also adds an item to your inventory. That item is tied to an object script that removes perk #2 as well as the item in your inventory, leaving you with just the effect from perk #2. Granted, the script box in perk #1 can certainly do a lot but, whenever you reach a limitation with the script box that I did, this is an alternate around that limitation. I hope this helps anyone who has or will encounter this limitation. Link to comment Share on other sites More sharing options...
Recommended Posts