Jump to content

[LE] My Blink/Teleport script does not work


demnish

Recommended Posts

Hey guys, I tried to make a blink/teleport ability.

The spell has FF and Target Location and this is the script:

Scriptname zeebTeleportTestScript extends activemagiceffect  

Event OnEffectFinish(Actor akTarget, Actor akCaster)
	akCaster.MoveTo(akTarget)
EndEvent

However, it does nothing.

Link to comment
Share on other sites

While not going deep into this because my methods might be more complicating than others out there, yours is not working because akTarget is looking for an actor. Target Location can be anything, including an actor, but that also doesn't mean it'll work as intended. You need a marker to be spawned at the target location, and then have it teleport you to it.

Link to comment
Share on other sites

Oh okay, I thought papyrus along with CK handled this internally automatically.
Do you know the name of dynamic marker creation that I can look up on the CK wiki?

EDIT: I didn't manage to find out how to create a dynamic marker anywhere on the CK wiki or Google so I tried something else called GetCurrentCrosshairRef.
However that function was not working, only gave me errors.

Edited by demnish
Link to comment
Share on other sites

Inigo's summoning spell uses the "Spawn Scripted Ref" magic effect type to place an explosion object that then places an XMarker with a script that moves Inigo to the marker. (I don't know if it's because the "Spawn Scripted Ref" doesn't accept markers or the explosion is there because Gary was originally thinking of using it for some visual effects.) The other interesting piece is that the magic effect has the "Snap to Navmesh" flag set so that Inigo doesn't get summoned into inappropriate places. (If you target a bad spot, the game will simply choose a reasonable nearby location with that flag set.)

Link to comment
Share on other sites

Inigo's summoning spell uses the "Spawn Scripted Ref" magic effect type to place an explosion object that then places an XMarker with a script that moves Inigo to the marker. (I don't know if it's because the "Spawn Scripted Ref" doesn't accept markers or the explosion is there because Gary was originally thinking of using it for some visual effects.) The other interesting piece is that the magic effect has the "Snap to Navmesh" flag set so that Inigo doesn't get summoned into inappropriate places. (If you target a bad spot, the game will simply choose a reasonable nearby location with that flag set.)

Very nice, I actually didn't know there was such a spell, but some reverse engineering and I'll guess I'll be good to go!

Appreciate the help from both of you, I'ma go at it, thanks. :)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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