WOTmodsproductions Posted February 9, 2012 Share Posted February 9, 2012 (edited) Could someone please write me a script (I really cant get my head around the scripting) I wanted it to activate ondeath of an npc with the code: 000Adventurer13 on their death I wanted another NPC called:000Adventurer25 to be placed at an Xmarker (with placeatme command) with the ref:XSP1 thanksAll credit will be given This is what I tried but it saves and succeeds just nothing happens on death of the npc Scriptname SIMAVventdeath13 {Scriptname SIMAVventdeath13 Event OnDeath 000Adventurer13test XSP1. placeatme 000Adventurer25 1 end} Edited February 9, 2012 by thelonewarrior Link to comment Share on other sites More sharing options...
Ocyris Posted February 9, 2012 Share Posted February 9, 2012 This script will need to be added to the actor 000Adventurer13. You'll need to add two properties, Click properties > add new property. Select Actor as the Type for the first one and name it 000Adventurer25 then OK. It may automatically fill in the value but if it doesn't you need to set the value, this will be fairly straight forward. For the next property, Select ObjectReference as the Type and name it XSP1. If the value doesn't fill in repeat what you did for the first using ObjectReference instead of Actor. Scriptname SIMAVventdeath13 Extends Actor Event OnDeath(Actor akKiller) XSP1.PlaceAtMe(000Adventurer25,1) endEvent If you have any problems you might try uploading your ESP or a screenshot to make it easier to see what's going on. Link to comment Share on other sites More sharing options...
WOTmodsproductions Posted February 9, 2012 Author Share Posted February 9, 2012 I tried that and it says it cant compile the script then when I make an objectreference it says this: Starting 1 compile threads for 1 files...Compiling "SIMTEST2"...c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\SIMTEST2.psc(4,14): no viable alternative at input 'Actor'c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\SIMTEST2.psc(4,20): mismatched input '000' expecting RPARENc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\SIMTEST2.psc(0,0): error while attempting to read script SIMTEST2: Object reference not set to an instance of an object.No output generated for SIMTEST2, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on SIMTEST2 I renamed the script SIMTEST2 by the way as it didnt work with the first script, it also does the same when I try and make an actor as the property Link to comment Share on other sites More sharing options...
Ocyris Posted February 9, 2012 Share Posted February 9, 2012 (edited) OK, Variables can't to be able to start with numbers so take the 000 off the front of those. Also it should be ActorBase for the property not actor. For the actor you want to spawn:Click Add PropertyType: ActorBaseName: Anything that doesn't start with a numberClick OKClick Edit ValueFind the actor you want to spawn For the place you want to spawn it at:Click Add PropertyType: ObjectReferenceName: XSP1Click OKClick Edit Valueif you have it in the render window just do the "Pick from Window" thing elseotherwise either select the cell it's in or just do "ANY"find the marker The script should end up something like this: Scriptname ocyondeath extends Actor ActorBase Property E3Soldier Auto ObjectReference Property XSP1 Auto Event OnDeath(Actor akKiller) XSP1.PlaceAtMe(E3Soldier ,1) endEvent Edited February 9, 2012 by Ocyris Link to comment Share on other sites More sharing options...
WOTmodsproductions Posted February 9, 2012 Author Share Posted February 9, 2012 Yes that worked thanks :-) Link to comment Share on other sites More sharing options...
Recommended Posts