Jump to content

[LE] Quick Questions, Quick Answers


Recommended Posts

I gave that a shot and had no luck... I have tried a lot of variations at this point, some that killed me on cell load and some that did nothing. My suspicion based on a lot of trial and error is that it doesn't like "Actor SelfActor" any more than "Armor SelfObject." I could try using a property for the actor as well, and I imagine that would mean adding more properties and ElseIf lines if I give this power to anybody else. Is there a way to not have it specify an actor at all? Or just say, anybody who's not the player? There should be no wrong door here; you should be toast if anybody or any thing equips this.

It's funny, I've been looking at examples of scripts for a few days, and I've seen a hundred ways to make scripts fire when the player equips something, but NPC's get neglected.

 

I might have to go back to the drawing board, maybe try to add this effect to an item enchantment instead of the item itself?

Link to comment
Share on other sites

Maybe it is working as intended. If the object is on multiple NPCs, it could be possible that an NPC out of sight but in a cell newly loaded has it equipped. If that is the case, the player dies on cell load.

 

It is not that NPCs get neglected, the scripting for player and NPCs is almost the same. The problem comes that if you aren't working with specific NPCs, you have to figure out some dynamic way of applying the script to the NPCs. That is where it gets tricky and where it can open the door for other issues.

 

Even if you were to put an enchantment on the item to perform the task, it would most likely still kill the player on cell load should some NPC in a newly loaded cell have it equipped. This is why there has to be the check to ensure that the object is still equipped prior to killing the player after having waited a bit.

 

If you haven't, make your tests on a new game or save that hasn't seen the mod. Could be script data baked into the save that is preventing the changes from working. If you haven't done that, do that first before changing how you do it.

Link to comment
Share on other sites

Is it ever correct for an ENCH reference to be directly referenced in a cell like in the Morrowloot SE version? SSEEdit lists this as an error. Can't give specifics right now because I just have my phone with me right now. There also seems to be a "default gauntlet" reference in the Master file. So is it possible that the enchantment is then applied to whatever that variable equipment is changed?

Possibly. Those sorts of errors from SSEEdit are based on the types of things that have been used in the game's own ESM files. The warning is there for those people who don't follow the xEdit team's advice and try to create mods without using the Creation Kit. But the Creation Kit will sometimes allow things that are fine but just never got used in the game. When modders discover those the team eventually updates those error messages. So as long as Morrowloot was made using the Creation Kit it's fine.

Link to comment
Share on other sites

Very short question: I want to integrate in a spell script the reset of the npc AI. The spell teleports the npc to the player. EvaluatePackage doesn't reset the AI.

As I'm not a skilled scripter, I don't grab the explanation of the ck site:

 

function EvaluatePackage (bool abResetAI=true) native

Eldrid.EvaluatePackage()

endFunction

 

gives me a fault: no viable alternative at input '.'

 

Thank you for helping.

 

 

Link to comment
Share on other sites

The CK wiki show how the function is laid out on the source script and then has an example usage as it could be in your script. What you want is:

Eldrid.EvaluatePackage()

assuming of course that Eldrid is a variable pointing to an actor.

 

Of course since the script is on a magic effect, you'll need more than just that to have a full script. But that is how the function call should look like no matter where you would use it.

Link to comment
Share on other sites

Hi Ishara, thank you for replying.

 

The CK wiki show how the function is laid out on the source script and then has an example usage as it could be in your script. What you want is:

 

Eldrid.EvaluatePackage()

That's what I've done. But it doesn't reset AI:

 

EvaluatePackage will not modify any other AI behavior (combat, pathing). If you want to reset all AI on an actor, use the ResetAI command.

My companion doesn't exit an animation, that was played with a dialogue line. Edited by Tasheni
Link to comment
Share on other sites

I see. I was under the impression that you were confused by the CK wiki.

 

I don't think resetting AI (if possible outside of the console) will halt an animation. If you used PlayAnimation in the dialogue, then that's most likely the culprit as PlayAnimation is not intended for actors. You'd want to use SendAnimationEvent instead.

Link to comment
Share on other sites

I was using PlayIdle with a property to IdleStop. But that doesn't work, Eldrid is drunk all the time until I'm teleportimg somewhere. That's sometimes funny, but she needs a lot of time to get on her horse or just follow me outside somewhere, so it would be better to end that drunkness :)
Link to comment
Share on other sites

Have you tried testing on a new game or a save that hasn't seen the mod? If you haven't been, it might be possible that old data baked into the save is blocking the new data.

 

Worse comes to worse, make sure the actor is out of view and disable then enable. That might reset things.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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