For some reason the global script stops when it has to check for variables, or maybe i have the syntax wrong.
the ring script
begin Mf_ringscriptshort OnPcEquipIf ( OnPcEquip == 1 ) set OnPcEquip to 0 startscript, "Mf_torchtoggle"endifend Mf_ringscript
the global script
Spoiler begin Mf_TorchToggleplayer->removeItem, "mf_ring" 1player->additem, "mf_ring" 1if ( player->HasItemEquipped "torch" > 0 ) player->additem, "BM_Ice minion_Shield1" 1 player->equip, "BM_Ice minion_Shield1" player->removeitem, "BM_Ice minion_Shield1" 1else player->equip, "torch"endifstopscript mf_torchtoggleendifend Mf_TorchToggle
this does nothing, but if I simplify it,,,
Spoiler begin Mf_TorchToggleplayer->removeItem, "mf_ring" 1player->additem, "mf_ring" 1stopscript mf_torchtoggleendifend Mf_TorchToggle
this one works, it will remove/add the ring when ever i equip it.
When ever it gets to that first "if" line it just stops.
ps. btw, I don't loose the hot-key when the ring is removed/added. At least that works I guess.
EDIT:
I found out that "if ( player->HasItemEquipped "torch" > 0 )" doesnt work, or it doesn't work like i'm using it. If morrowind had a "GetItemEquipped" function, it would work.
LAST EDIT: solved (yay i can go to bed now)added this script to torch
Spoiler begin Mf_torchequippedshort OnPcEquipIf ( OnPcEquip == 1 ) set OnPcEquip to 0 set Mf_torch_global to 1endifend Mf_torchequipped
added this to the ring
Spoiler begin Mf_ringscriptshort OnPcEquipIf ( OnPcEquip == 1 ) set OnPcEquip to 0 startscript, "Mf_torchtoggle"endifend Mf_ringscript
and finnaly added this global script
Spoiler begin Mf_TorchToggleplayer->removeItem, "mf_ring" 1player->additem, "mf_ring" 1if ( Mf_torch_global > 0 ) player->additem, "BM_Ice minion_Shield1" 1 player->equip, "BM_Ice minion_Shield1" player->removeitem, "BM_Ice minion_Shield1" 1 set Mf_torch_global to 0 else player->equip, "torch"endifstopscript mf_torchtoggleendifend Mf_TorchToggle
Now, if the torch burns out while the global var is still set to 1 you just have to hit the hot-key 1 more time, no big deal. And there is a mild studder on all animations (lasts for a millisecond) when the script is ran. I spammed the hell out of the hot-key to see if it would crash but it didn't. Now I just need to make this compatible with TLM.
Thank you PK for the help!