Adding a small delay to a script?

Post » Tue Feb 18, 2014 1:07 pm

Is it possible to add a 0.5-1 second delay in a script before the actual event happens?

I have this script that a kindly sir gave me the the other day..

Scriptname A0TeleportRecallSCRIPT extends activemagiceffect  Actor Property PlayerRef AutoCell Property kSanctuary AutoObjectReference Property kSanctuaryMarker AutoObjectReference Property kWorldMarker AutoEvent OnEffectStart(Actor akTarget, Actor akCaster)If(akCaster == PlayerRef)If(PlayerRef.GetParentCell() == kSanctuary)PlayerRef.MoveTo(kWorldMarker)ElsekWorldMarker.MoveTo(PlayerRef)PlayerRef.MoveTo(kSanctuaryMarker)EndIfEndIfEndEvent

I have this attached to a spell and I put a pretty effect on it, but because I have it set to equip as Voice, the player teleports as soon as I hit the button. Is it possible to add a minor delay so the spell effect has a chance to play before the teleportation?

Thanks for any replies.

User avatar
Cameron Garrod
 
Posts: 3427
Joined: Sat Jun 30, 2007 7:46 am

Post » Tue Feb 18, 2014 4:03 pm

Just add a "Utility.Wait(0.5)" statement. You can choose a value works best to see the effect.
User avatar
Claire Vaux
 
Posts: 3485
Joined: Sun Aug 06, 2006 6:56 am

Post » Tue Feb 18, 2014 12:58 pm

Thanks I will see what I can do :)

User avatar
Jade Barnes-Mackey
 
Posts: 3418
Joined: Thu Jul 13, 2006 7:29 am


Return to V - Skyrim