Spell: if in this location do this, else do that?

Post » Mon Jun 18, 2012 10:17 pm

Im trying to make a teleport spell which a recall function, i got the teleport to work but now i want to go more advanced by a script that when the caster is in a certain place eg. a player house it teleports them to where they teleported from but if they are not in the 'player house' then it teleports them to the 'player house', basically;

A spell that if your in a certain place it does something, but if your anywhere but this place it does something else.


the script so far....

it doesn't include the recall code yet as i just want to get this to work, if you know a decent recall code please post :P


Scriptname DweHomeTeleport extends activemagiceffect ObjectReference property DweHouseStargavvenTPRm autoObjectReference property CellName? auto ; will i need this?if (Game.GetPlayer().getCurrentLocation().IsSameLocation(CellName?)) ; do i even put the cell name hereEvent OnEffectFinish(Actor target, Actor Caster)target.MoveTo(someplaceelse) ; will change obv....EndEventelseEvent OnEffectFinish(Actor target, Actor Caster)target.MoveTo(DweHouseStargavvenTPRm)EndEventendif
User avatar
John N
 
Posts: 3458
Joined: Sun Aug 26, 2007 5:11 pm

Post » Tue Jun 19, 2012 1:19 am

A good question i should have asked is; is it actually possible?
User avatar
LuBiE LoU
 
Posts: 3391
Joined: Sun Jun 18, 2006 4:43 pm


Return to V - Skyrim