Jump to content

SCRIPT to - Add / Remove perk when equip / unequip


jambonpaper

Recommended Posts

Can anyone help me create a script that when you wear an item it adds a perk, but when you unequip it the perk disappears as well.

 

Here is exactly what I'm talking about

I want Power Helmets to add the perk: Gray Matters (xx00d1fd)

player.addperk 00d1fd - when equipping a Power Helmet

player.removeperk 00d1fd when unequipping a Power Helmet

 

Thanks

 

Ps: I have an other similar thread going on, but the other one is not about perks, its just item effects but I think this is the more likely solution to work though.

Edited by jambonpaper
Link to comment
Share on other sites

Do you need the script on the player so that it detects if they're wearing any type of power helmet, or can it just be a script in the helmet itself? if the latter then it seems like you should just be able to put those commands into the equip and unequip blocks, like this

 

begin OnEquip player

player.addperk 00d1fd

end

 

begin OnUnequip player

player.removeperk 00d1fd

end

 

If you want it on the player though, I'd guess you'd have to use the ScriptEffectUpdate block and check if the player has any power helmets equipped. There might be a slight delay doing it that way though, and it would be a lot more cpu hungry since it would constantly be running. I'm not sure if there's any other way to do it.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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