TheBlob2 Posted January 23, 2015 Share Posted January 23, 2015 for those of you who are good with scripts, I made this script but 1 part of it doesn't work like it should and if someone can help me out that would be just dandy scn AAAslowdrawVarmintRifle ref weapon ref user begin gamemode set user to GetContainer set weapon to GetBaseObject end ;(this is the part i was talking about, this part doesnt work and i dont know why) begin onstartcombat user if weapon.isequipped unequipme equipme endif end ;(^^^this part right here) begin onequip if user.getav agility==2 user.damageav agility 1 endif if user.getav agility==3 user.damageav agility 2 endif if user.getav agility==4 user.damageav agility 3 endif if user.getav agility==5 user.damageav agility 3 endif if user.getav agility==6 user.damageav agility 3 endif if user.getav agility==7 user.damageav agility 3 endif if user.getav agility==8 user.damageav agility 3 endif if user.getav agility==9 user.damageav agility 3 endif if user.getav agility==10 user.damageav agility 3 endif unequipme equipme user.restoreav agility 10 end Link to comment Share on other sites More sharing options...
tomm434 Posted January 24, 2015 Share Posted January 24, 2015 1) Begin OnStartCombat won't work inside item's script. It works only for NPC object script 2)Also set weapon to GetBaseObject if weapon.isequippedseems wrong. weapon becomes an Form ID and you use reference syntax in the second lines (which won't work on Form IDs)If you want to do this replace second line to if User.GetItemEquipped weapon == 1 Link to comment Share on other sites More sharing options...
TheBlob2 Posted January 24, 2015 Author Share Posted January 24, 2015 (edited) is there a way to check if user is in combat? also when i put if User.GetItemEquipped weapon == 1 in the geck it wont compile Edited January 24, 2015 by TheBlob2 Link to comment Share on other sites More sharing options...
Fallout2AM Posted January 24, 2015 Share Posted January 24, 2015 I think User.IsInCombat should make the trick But I don't know GetItemEquipped. GetEquippedObject wants a slot number and not a ref as parameter Link to comment Share on other sites More sharing options...
tomm434 Posted January 24, 2015 Share Posted January 24, 2015 I meant User.getEquipped Weapon == 1 Link to comment Share on other sites More sharing options...
Recommended Posts