Jump to content

scripts are hard, man


TheBlob2

Recommended Posts

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

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.isequipped

seems 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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...