Jump to content

[LE] Quick Questions, Quick Answers


Recommended Posts

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

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

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

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)
EndFunction

Hopefully 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 by Contrathetix
Link to comment
Share on other sites

 

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)
EndFunction

Hopefully 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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...