MaskedpENGUiN Posted August 24, 2018 Share Posted August 24, 2018 I need some help to develop a blink-like teleport spell, (teleport player to cursor) So I have the syntax for basic teleportation: Scriptname TeleportScript extends activemagiceffect ObjectReference Property Loc autoActor Property Caster auto Event OnEffectStart(Actor Target, Actor Caster)Caster.MoveTo(Loc)EndEvent And I know that you need an ObjectReference. So I tried to make the spell archetype as Spawn Scripted Ref, then the spell "Explosion" is empty (Empty.nif) and I created an Empty Static Object that is spawned by the explosion. The problem is I can't seem to reference the static object.... And I have no idea where to go. If anyone could help me that would be appreciated. Thanks. Link to comment Share on other sites More sharing options...
FrankFamily Posted August 25, 2018 Share Posted August 25, 2018 (edited) Have your script in the spawned reference and move the player to the ref when it loads instead. Something like this: Scriptname TeleportScript extends objectreference Event OnLoad()Game.GetPlayer().MoveTo(self)EndEvent Edited August 25, 2018 by FrankFamily Link to comment Share on other sites More sharing options...
MaskedpENGUiN Posted August 25, 2018 Author Share Posted August 25, 2018 (edited) YOU HAVE NO IDEA HOW MUCH I APPRECIATE YOU RIGHT NOW!!! I have been trying to make additions to my nexus mod, all my ideas require scripts and so far this is the only one working. Thank you SO much!! It's been an absolute headache, I am new to scripting so I am getting used to it all. I have so many annoying scripts that I need to get working Edited August 25, 2018 by MaskedpENGUiN Link to comment Share on other sites More sharing options...
MaskedpENGUiN Posted August 25, 2018 Author Share Posted August 25, 2018 Speaking of which can you possibly help me with this issue? I am trying to make a quest stage that has multiple objectives, like for example killing 4 specific npcs, then the stage advances.So far I've tried to make a Global variable and for each Actor have a script that adds 1 to the variable like so: GlobalVariable Property count auto Event OnDeath()count.Mod(1)EndEvent Now I want to have an If statement that checks when the Global variable is = to 4,then it advances the stage. here is the script but when I compile I get an error say missing EOF at 'If' Scriptname AAA1TestScript extends Quest GlobalVariable Property counter autoQuest Property akQuest auto If counter.GetValue() == 4akQuest().SetStage(30)akQuest().SetObjectiveDisplayed(30,1)EndIf Once again help is appreciated and excuse my terrible programming :) Link to comment Share on other sites More sharing options...
FrankFamily Posted August 25, 2018 Share Posted August 25, 2018 (edited) Thing is when does AAA1TestScript run? It isn't clear in your post. I'd put all that within the OnDeath in the script that goes in the actors, as in: Scriptname IncreaseVarAndCheck extends Actor GlobalVariable Property counter autoQuest Property akQuest auto Event OnDeath() count.Mod(1) ;also complete the objective relative to this actor? If counter.GetValue() == 4 akQuest().SetStage(30) akQuest().SetObjectiveDisplayed(30,1) EndIfEndevent Alternatively if you are completing objectives as each one dies you could get rid of the global and just check that all objectives are completed right after, and if so advance the stage. With: https://www.creationkit.com/index.php?title=IsObjectiveCompleted_-_Quest Scriptname CompleteObjectiveAndCheck extends Actor Quest Property akQuest autoInt Property ThisActorsObjective auto; to be filled in ck in the actors with their objective Event OnDeath() akQuest.SetObjectiveCompleted(ThisActorsObjective, true) If akQuest.IsObjectiveCompleted(1) && akQuest.IsObjectiveCompleted(2) && akQuest.IsObjectiveCompleted(3) ; etc, replace with the relevant numbers akQuest().SetStage(30) akQuest().SetObjectiveDisplayed(30,1) EndIfEndevent Edited August 25, 2018 by FrankFamily Link to comment Share on other sites More sharing options...
MaskedpENGUiN Posted August 26, 2018 Author Share Posted August 26, 2018 Thank you so much once again! you have no Idea how much you've helped. Really appreciate it! Absolute legend mate. Link to comment Share on other sites More sharing options...
Recommended Posts