kieranfoy Posted December 27, 2009 Share Posted December 27, 2009 I've been working on a spell to decapitate enemies, and I think I've gotten it figured out. I just need a way for the severed head I've got it adding to be name (Victim's Name)'s Severed Head, like in the trophy soul gems mod. Does anyone know how I could do this? Oh, BTW, here's the script. I'd be obliged if you didn't steal it, although I really can't stop you: scriptname 1111decap begin scripteffectstart if isSpellTarget 11decap == GetIsPlayableRace triggerhitshader 10 player.additem headcut 1 pickidle playsound PHYDamageFlesh playsound ENDDagonRoarDeath01 playsound NPChumangaspmale ForceAV Health 0 equipitem decaphead message "You struck your enemy's head clean off!" endifend Link to comment Share on other sites More sharing options...
BEArbiter Posted December 28, 2009 Share Posted December 28, 2009 You can't, the name of an item is Static. You could make an object which show a message like:" name's head "But it would involve a lot of scripting and could also Corrupt savegames (because each name is memorized into a var) Link to comment Share on other sites More sharing options...
grmblf Posted December 28, 2009 Share Posted December 28, 2009 It requires OBSE:ref object; the head ref victim; the guy before loosing his head object.setNameEX "%n's Severed Head", victimYou need to use a reference variable for both the item and the actor (it coud not work with IDs). Link to comment Share on other sites More sharing options...
BEArbiter Posted December 28, 2009 Share Posted December 28, 2009 NoSetNameEx - sets the name of the base object. with your script, you change the name of all the heads, not one. Link to comment Share on other sites More sharing options...
grmblf Posted December 29, 2009 Share Posted December 29, 2009 SetNameEx - sets the name of the base objectah, you're right! damn, I'd forgot that. Were you planning on cutting out a lot of heads, Kieran? I'd say you could create a bunch of heads in the CS and play with a limit (ie, make a showroom with room for 20 heads, and once it's full if you want to place another head it has to replace one of the existing ones) but I see the fun of carrying a bag full of heads and spreading them in the market district or somewhere else. Maybe you could try placing the head in an empty container and then DuplicateAllItems. If the head is scripted it will create a new copy of the base object, wich you can rename afterwards (you might want to try with a blank script, no vars, no code, just a name). The major problem I see here is handling with respawnable actors, I mean, how to tell if certain head has been already created? Maybe storing a copy of that object in a container, or storing an array of created heads? Good luck with it, I hope I can start soon to collect my enemies' heads :D Link to comment Share on other sites More sharing options...
Recommended Posts