Jump to content
⚠ Known Issue: Media on User Profiles ×

Jerevalaron

Members
  • Posts

    2
  • Joined

  • Last visited

Nexus Mods Profile

About Jerevalaron

Jerevalaron's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In
  • Conversation Starter

Recent Badges

0

Reputation

  1. I was attempting to get that to work, but no luck. Don't know what I'm missing there. The code you gave me compiled fine, but the teleport just isn't happening. If I instead do something like this code below for each trigger box, how would I edit this code so that the teleport only happens after the player casts the spell while within the trigger area: ObjectReference Property teleDest Auto Spell Property TeleportSpell Auto ObjectReference Player Event OnTriggerEnter (ObjectReference akActionRef) TeleportSpell.Cast(self, akActionRef) Utility.Wait(2.5) akActionRef.MoveTo(teleDest) EndEvent So in this case I want to be able to point to a specific location for each trigger box to teleport the player to, but only after the player casts the specific Teleport Spell while within that trigger area. I don't know how to get the trigger box script to wait for when the player casts the specific spell before performing the teleportation.
  2. I'm attempting to create a spell that the player can cast to teleport himself to a particular location based on what trigger box he is currently in. So, for example, if the player casts the spell while within triggerArea1, then teleport the player to Destination1. If the player casts the spell within triggerArea2, then teleport the player to Destination2. And vice versa. As part of my intended level design, I need it to work this way. I have two different scripts, one for trigger box and one for the spell. However, since one is an object reference and the other is an active magic effect, I'm having trouble getting one script to access properties declared in the other. I know some of the code shown below probably has a lot of issues (and if anyone knows a better way to handle this, please help). My triggerbox script: Scriptname Area1 extends ObjectReference ObjectReference Location1 Actor Property PlayerREF Auto Bool Property EnableTeleport Auto Function TeleportEnable() EnableTeleport = True return EndFunction Function TeleportDisable() EnableTeleport = False return EndFunction Event OnTriggerEnter(ObjectReference akActionRef) If akActionRef == PlayerREF TeleportEnable() EndIf EndEvent Event OnTriggerLeave(ObjectReference akActionRef) If akActionRef == PlayerREF TeleportDisable() EndIf EndEvent My spell script (partial): Scriptname JR_Teleportation extends activemagiceffect {Teleports the caster to a different domain.} ObjectReference property teleDest auto ObjectReference property teleBegin auto Bool Property EnableTeleport Auto Event OnEffectFinish(Actor target, Actor caster) if EnableTeleport = True target.MoveTo(teleDest) EndIf EndEvent What I want to do is pass the boolean value for "EnableTeleport" from the trigger box script to the spell script. But I've been unable to figure out a way to do this. I read somewhere that property values can only be passed between scripts if those scripts are attached to objects that are linked. However, I can't use a linked ref between my two scripts because my active magic effect is not something that can be dragged into the render window (like a trigger can). I would appreciate any help in getting my code to work for my idea.
×
×
  • Create New...