IsharaMeradin Posted May 15, 2016 Posted May 15, 2016 If I read the wiki correctly both MarkForDelete and Delete simply set the flag to tell the game to delete the object in question. So calling only one should be sufficient. Avoid using DeleteWhenAble if you can. The big difference between MarkForDelete (MFD) and Delete is that MFD waits till the game does normal clean up for the cell in question while Delete does it as soon as the object is no longer needed (which could be sooner or later). Either way an object that is still in use somewhere in the game (i.e. assigned to a property, assigned to an alias, waiting to run an update event, or being watched for an animation event) will not be deleted.
ZippyDSMlee Posted May 16, 2016 Author Posted May 16, 2016 Dose this look about right ?I am making notes and putting it everywhere so I do not lose it LOL Note I assume you still use the trifecta of disable,delete and markfordelete ( er doesn't markfordelete come before delete? 0-o) Scriptname zippyreanimateXmarkerscript extends Extends ObjectReference ;= the name of the script and what parent class it extends=======/ ;======================================================================================;; PROPERTIES /;=============/ ;======================================================================================;; VARIABLES /;=============/ objectReference property refmyrefrence auto ;======================================================================================;; EVENTS /;=============/ Event OnInit() refmyrefrence = Slef.PlaceAtMe = SELF.PlaceAtMe(Game.GetForm(IDNUMBDER)) ;xMarker position, sameIDNUMBER = name RegisterForSingleUpdate(5.0) ;0.5s delay EndEvent Even OnUpdate() refmyrefrence.enable refmyrefrence.damageobject(05) ;Makes oil start to burn SELF.DISABLE() ;Disables xMarker SELF.Delete() ;Destroys xMarker SELF.MarkForDelete() ;removes xMarker from saves EndEvent ; activator,ect this is attached to to summon your dynamic location explosion ;,needs to have "on local map" and "Collision Geometry" ;and "Is Marker" and has the nif "MarkerX.nif"
IsharaMeradin Posted May 16, 2016 Posted May 16, 2016 You don't have to use GetForm. You can create a property for the base object if you would rather. I think you just need to use either Delete or MarkForDelete. You don't need both. Disable before delete is correct. Try both if you want. If you get papyrus log errors that the object cannot be deleted because there is no 3D when whichever one is set to run second gets processed, then you only need the one. It may work. Clean up any typos and try it out.
ZippyDSMlee Posted May 16, 2016 Author Posted May 16, 2016 On 5/16/2016 at 4:36 AM, IsharaMeradin said: You don't have to use GetForm. You can create a property for the base object if you would rather. I think you just need to use either Delete or MarkForDelete. You don't need both. Disable before delete is correct. Try both if you want. If you get papyrus log errors that the object cannot be deleted because there is no 3D when whichever one is set to run second gets processed, then you only need the one. It may work. Clean up any typos and try it out.Tried a few things but I am getting no where. This script calls to the explosion I want to place right? Null Explosion> Activator> Placeatme Xmarker script> Effect Explosion generated on the fly.I might be doing things in reverse I will try again some more tomorrow.
IsharaMeradin Posted May 16, 2016 Posted May 16, 2016 After looking at the tutorial I linked, it should be null explosion which places the xmarker which runs a script which does whatever additional stuff you want. There is no activator. That tutorial called the xmarker an activator but in truth it is just an xmarker with an attached script which runs stuff when initiated rather than when activated. An activator is typically an object that is interacted with by either clicking on or walking in/out of.
ZippyDSMlee Posted May 16, 2016 Author Posted May 16, 2016 On 5/16/2016 at 11:35 AM, IsharaMeradin said: After looking at the tutorial I linked, it should be null explosion which places the xmarker which runs a script which does whatever additional stuff you want. There is no activator. That tutorial called the xmarker an activator but in truth it is just an xmarker with an attached script which runs stuff when initiated rather than when activated. An activator is typically an object that is interacted with by either clicking on or walking in/out of.Ya but its all a type of activator LOL===========Can you spot anything out of place in this? I mean once working I can chop it down to size but eh 0-oScriptname zippytestscriptreanimate1 extends ObjectReference ;======================================================================================; ; PROPERTIES / ;=============/ ;======================================================================================; ; VARIABLES / ;=============/ objectReference property refBurningoil auto ;======================================================================================; ; EVENTS / ;=============/ Event OnInit() refBurningoil = Self.PlaceAtMe = Self.PlaceAtMe(Game.GetForm(0x000862CC)) ;xMarker position, IDNUMBER of the object to be placed RegisterForSingleUpdate(0.5) ;0.5s delay EndEvent Even OnUpdate() refBurningoil.enable refBurningoil.damageobject(05) ;Makes oil start to burn SELF.DISABLE() ;Disables xMarker SELF.Delete() ;Destroys xMarker SELF.MarkForDelete() ;removes xMarker from saves EndEvent ; activator,ect this is attached to to summon your dynamic location explosion ;,needs to have "on local map" and "Collision Geometry" ;and "Is Marker" and has the nif "MarkerX.nif"Compiling "zippytestscriptreanimate1"...D:\Games\Steam\steamapps\common\Skyrim\Data\Scripts\Source\temp\zippytestscriptreanimate1.psc(20,27): no viable alternative at input 'PlaceAtMe'D:\Games\Steam\steamapps\common\Skyrim\Data\Scripts\Source\temp\zippytestscriptreanimate1.psc(24,17): required (...)+ loop did not match anything at input '('No output generated for zippytestscriptreanimate1, compilation failed.===============================I'm missing something ><
IsharaMeradin Posted May 16, 2016 Posted May 16, 2016 refBurningoil = Self.PlaceAtMe = Self.PlaceAtMe(Game.GetForm(0x000862CC)) ;xMarker position, IDNUMBER of the object to be placedIf this isn't a typo from posting in the forum, then you have an extra Self.PlaceAtMe. Cut it out along with the extra = and you should be okay. At least okay for the compiler to get past that issue. :P
ZippyDSMlee Posted May 16, 2016 Author Posted May 16, 2016 On 5/16/2016 at 6:49 PM, IsharaMeradin said: refBurningoil = Self.PlaceAtMe = Self.PlaceAtMe(Game.GetForm(0x000862CC)) ;xMarker position, IDNUMBER of the object to be placedIf this isn't a typo from posting in the forum, then you have an extra Self.PlaceAtMe. Cut it out along with the extra = and you should be okay. At least okay for the compiler to get past that issue. :tongue: Oy seeing double(not knowing if its real or not) and scripting in reverse is what I do best. >< Scriptname zippytestscriptreanimate1 extends ObjectReference objectReference property refBurningoil Event OnInit( ) refBurningoil = Self.PlaceAtMe(Game.GetForm(0x000862CC)) ;xMarker position, IDNUMBER of the object to be placed RegisterForSingleUpdate(0.5) ;0.5s delay EndEvent Event OnUpdate( ) refBurningoil.enable refBurningoil.damageobject(05) ;Makes oil start to burn SELF.DISABLE() ;Disables xMarker SELF.Delete() ;Destroys xMarker SELF.MarkForDelete() ;removes xMarker from saves EndEvent ; activator,ect this is attached to to summon your dynamic location explosion ;,needs to have "on local map" and "Collision Geometry" ;and "Is Marker" and has the nif "MarkerX.nif"Compiling "zippytestscriptreanimate1"...D:\Games\Steam\steamapps\common\Skyrim\Data\Scripts\Source\temp\zippytestscriptreanimate1.psc(8,0): mismatched input 'Event' expecting FUNCTIOND:\Games\Steam\steamapps\common\Skyrim\Data\Scripts\Source\temp\zippytestscriptreanimate1.psc(0,0): error while attempting to read script zippytestscriptreanimate1: Object reference not set to an instance of an object.No output generated for zippytestscriptreanimate1, compilation failed.=========================It's off on the Event OnInit( ) call but its how it is in the darn picture ><Minus the stuff I double typed even LOLI wonder if I need to reload my compiler and source stuff? 0-o
IsharaMeradin Posted May 16, 2016 Posted May 16, 2016 (edited) You have a space between the parenthesis on both the OnInit() and OnUpdate() events. There should be no spaces there unless the event uses parameters. I would have said something earlier except that the spaces were not there on the previous code you posted. EDIT: Just noticed that you left off the auto from the property line. That is more likely the cause of compiler failure than the spaces. But hey, better to be safe than sorry on the spaces. Never know when it will want to be picky about that sort of thing. Edited May 16, 2016 by IsharaMeradin
ZippyDSMlee Posted May 16, 2016 Author Posted May 16, 2016 Nix that I got it working with some help over at the AFK chat!!! Scriptname zippytestscriptreanimate1 extends ObjectReference ;======================================================================================; ; PROPERTIES / ;=============/ ;======================================================================================; ; VARIABLES / ;=============/ objectReference refBurningoil ; remove property and auto ;======================================================================================; ; EVENTS / ;=============/ Event OnInit() refBurningoil = Self.PlaceAtMe(Game.GetForm(0x000862CC)) ;xMarker position, IDNUMBER of the object to be placed= name RegisterForSingleUpdate(0.5) ;0.5s delay EndEvent Event OnUpdate() refBurningoil.enable() ;do not forget the () refBurningoil.damageobject(5.0) ;Makes oil start to burn SELF.DISABLE() ;Disables xMarker SELF.Delete() ;Destroys xMarker, replaces mark for delete EndEvent ; activator,ect this is attached to to summon your dynamic location explosion ;,needs to have "on local map" and "Collision Geometry" ;and "Is Marker" and has the nif "MarkerX.nif"
Recommended Posts