Xarxee Posted July 1, 2016 Share Posted July 1, 2016 Alright, thanks for your help! Link to comment Share on other sites More sharing options...
Di0nysys Posted July 1, 2016 Share Posted July 1, 2016 Hey guys.I'm working on a combat script for an actor to teleport around dynamically instead of relying on hand placed xmarkers. Is there a way to spawn an objectreference at an offset coordinate from an actor, then mark that reference for self deletion? Link to comment Share on other sites More sharing options...
Elias555 Posted July 1, 2016 Author Share Posted July 1, 2016 Hey guys.I'm working on a combat script for an actor to teleport around dynamically instead of relying on hand placed xmarkers. Is there a way to spawn an objectreference at an offset coordinate from an actor, then mark that reference for self deletion? Explosions can place most things, including activators. I have a fire based explosion going off and attached to it is an enchantment magic effect with the keyword MagicDamageFire. It's not lighting oils, anyone know what the problem could be? Link to comment Share on other sites More sharing options...
Urtho Posted July 1, 2016 Share Posted July 1, 2016 I am trying to edit the Winterhold Improved mod to have a load door to the Archmage's quarters in the Hall of the Elements. However, when I go to place the door marker in the Archmage's quarters, there are so many markers it is hard to find where the computer initially placed the door marker so that I can move it. Is there a way to search for it or do I have to dig through all the markers? In addition to what IsharaMeradin said, you can also use the hide command on individual references that are blocking your view so you can get at an object that is blocked by a busy cell view. Select a reference and then press the 1 number pad key - the object will ghost and become see thru, pressing the key a second time will completely remove the reference from the render window view but the object is NOT deleted - it is merely hidden from view. You can do this for multiple items at once with a window drag selection box in the render window or via the cell view window with multiple objects selected. To get any hidden items to become visible again, hold down the ALT key and press 1 on the number pad and all hidden objects in the cell will unhide and be visible again and able to be interacted with. Link to comment Share on other sites More sharing options...
Surilindur Posted July 2, 2016 Share Posted July 2, 2016 (edited) Hey guys.I'm working on a combat script for an actor to teleport around dynamically instead of relying on hand placed xmarkers. Is there a way to spawn an objectreference at an offset coordinate from an actor, then mark that reference for self deletion? Have you tried it without a marker? Or is the marker a necessity? You can move refs to another ref with an offset using MoveTo, and there is the RandomFloat function in utility script. Function MoveToRandOffset(Actor akToMove, Actor akMoveTo, float afOffMin, float afOffMax, bool abMatchRot) ; the offset calculation float fOffX = Utility.RandomFloat(afOffMin, afOffMax) float fOffY = Utility.RandomFloat(afOffMin, afOffMax) float fOffZ = 0.0 ; if you use PapyrusUtil, the MiscUtil module allows printing stuff to console for easier debugging! MiscUtil.PrintConsole("MoveRandOff: toMove (" + akToMove + "), moveTo (" + akMoveTo + "), offset (" + fOffX + ", " + fOffY + ", " + fOffZ + "), matchRot (" + abMatchRot + ")") akToMove.MoveTo(akMoveTo, fOffX, fOffY, fOffZ, abMatchRot) EndFunctionHopefully that helps a little. Just an example, I have not tested if it compiles, but something of an idea, maybe. PapyrusUtil is handy if you want to print stuff to console for easier debugging (to avoid using messageboxes, messages and/or papyrus log). I myself only have one monitor, and am too lazy to switch to windowes mode, so it is lifesaver for me. Edited July 2, 2016 by Contrathetix Link to comment Share on other sites More sharing options...
Di0nysys Posted July 2, 2016 Share Posted July 2, 2016 Hey guys.I'm working on a combat script for an actor to teleport around dynamically instead of relying on hand placed xmarkers. Is there a way to spawn an objectreference at an offset coordinate from an actor, then mark that reference for self deletion? Have you tried it without a marker? Or is the marker a necessity? You can move refs to another ref with an offset using MoveTo, and there is the RandomFloat function in utility script. Function MoveToRandOffset(Actor akToMove, Actor akMoveTo, float afOffMin, float afOffMax, bool abMatchRot) ; the offset calculation float fOffX = Utility.RandomFloat(afOffMin, afOffMax) float fOffY = Utility.RandomFloat(afOffMin, afOffMax) float fOffZ = 0.0 ; if you use PapyrusUtil, the MiscUtil module allows printing stuff to console for easier debugging! MiscUtil.PrintConsole("MoveRandOff: toMove (" + akToMove + "), moveTo (" + akMoveTo + "), offset (" + fOffX + ", " + fOffY + ", " + fOffZ + "), matchRot (" + abMatchRot + ")") akToMove.MoveTo(akMoveTo, fOffX, fOffY, fOffZ, abMatchRot) EndFunctionHopefully that helps a little. Just an example, I have not tested if it compiles, but something of an idea, maybe. PapyrusUtil is handy if you want to print stuff to console for easier debugging (to avoid using messageboxes, messages and/or papyrus log). I myself only have one monitor, and am too lazy to switch to windowes mode, so it is lifesaver for me. Thanks for looking out man. This should help a bit.Nothing on the wiki on how to do something like this. Hate scripting lol. Link to comment Share on other sites More sharing options...
Surilindur Posted July 2, 2016 Share Posted July 2, 2016 No problem, happy to help, I love scripting. All the pieces of the puzzle are there in the Wiki, and I find it fascinating to try and think of ways to pick the correct pieces, so the final outcome will do what it should, as best as it could. And yes, sometimes finding the right pieces can be a bit frustrating if one has not been browsing the wiki on a regular basis just for fun, to see what there actually is. Call me nutters, but finding the relevant pieces and putting them together into a working solution is very, very fascinating. :laugh: Also, in case someone reads this and is wondering how to get an overall grasp of all the scripts and inheritance, there is this one extremely handy and invaluable page that lists all "script objects" in a sort of family tree: http://www.creationkit.com/index.php?title=Category:Script_Objects Link to comment Share on other sites More sharing options...
KunoMochi Posted July 2, 2016 Share Posted July 2, 2016 @Contrathetix:That in conjunction with this list of events that the game sends has always helped me out tons with scripting.http://www.creationkit.com/index.php?title=Category:Events As you said, it's quite fun piecing stuff together to make things coherently work together for something bigger. :) Link to comment Share on other sites More sharing options...
Methusael Posted July 3, 2016 Share Posted July 3, 2016 I'm writting my first modhttps://forums.nexus...rks/?p=40075795and I got stuck with using Utility.Waitwhenever i use this command (either in game or through a file thats read in) I getsyntax error. invalid referance 'Utility'why would that be? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted July 3, 2016 Share Posted July 3, 2016 Are you trying to use a papyrus command in the console? If so, that would be the problem. Link to comment Share on other sites More sharing options...
Recommended Posts