teleport trigger box sxript now working

Post » Thu Jun 21, 2012 7:15 am

Hi I made this teleport script attached to the trigger box but , it does nothing when I cross init why ?

Scriptname Pitfall extends ObjectReference  ObjectReference Property TeleportMarker autoEvent OnActivate(ObjectReference akActionRef)    Game.GetPlayer().MoveTo(TeleportMarker)EndEvent
User avatar
electro_fantics
 
Posts: 3448
Joined: Fri Mar 30, 2007 11:50 pm

Post » Thu Jun 21, 2012 3:58 am

OnTriggerEnter instead of activate (will automatically run when you enter the volume). you also need a condition filter to only allow the action to happen if the akActionRef is the player, or else any NPC that strolls through it will force you to move even if you arent in it

if you want it to work like a door with a prompt, you would use OnActivate, but you would then need to select Player Activation in the "primitive" tab, and your trigger activator has to have a name or else it wont appear selectable.
User avatar
Cayal
 
Posts: 3398
Joined: Tue Jan 30, 2007 6:24 pm

Post » Thu Jun 21, 2012 3:48 am

Sorry I didn't understood much , what should I do exactly?
I created the reference marker and selected in the relative cell , it just does nothing when I enter the box..
User avatar
Lil'.KiiDD
 
Posts: 3566
Joined: Mon Nov 26, 2007 11:41 am

Post » Thu Jun 21, 2012 3:31 pm

change Event OnActivate to Event OnTriggerEnter

Scriptname Pitfall extends ObjectReference  ObjectReference Property TeleportMarker autoEvent OnTriggerEnter(ObjectReference akActionRef)	If akActionRef == Game.GetPlayer()		akActionRef.MoveTo(TeleportMarker)	EndIfEndEvent
User avatar
Bee Baby
 
Posts: 3450
Joined: Sun Jun 18, 2006 4:47 am

Post » Thu Jun 21, 2012 2:33 am

nothing happens ....
User avatar
sam
 
Posts: 3386
Joined: Sat Jan 27, 2007 2:44 pm

Post » Thu Jun 21, 2012 2:21 pm

Nvm I had to relink the marker nw worked fine thanks.....
User avatar
Kayla Keizer
 
Posts: 3357
Joined: Tue Dec 12, 2006 4:31 pm

Post » Thu Jun 21, 2012 3:47 am

You should add a check if the player is riding on a horse too... (if you teleport from/to a exterior cell)

I made something similiar in my mod, teleportation on entering the trigger. Worked fine unless I was riding on my horse... after teleportation the game went nuts everytime. Sometime even freezes and CTDs!!
User avatar
Cayal
 
Posts: 3398
Joined: Tue Jan 30, 2007 6:24 pm

Post » Thu Jun 21, 2012 9:06 am

how I add this?
User avatar
Mari martnez Martinez
 
Posts: 3500
Joined: Sat Aug 11, 2007 9:39 am

Post » Thu Jun 21, 2012 2:42 pm

This should work:

Scriptname Pitfall extends ObjectReference  ObjectReference Property TeleportMarker autoEvent OnTriggerEnter(ObjectReference akActionRef)	int isRider = Game.GetPlayer().GetSitState ()		If ((akActionRef == Game.GetPlayer()) && (isRider == 0))				akActionRef.MoveTo(TeleportMarker)		EndIfEndEvent
User avatar
loste juliana
 
Posts: 3417
Joined: Sun Mar 18, 2007 7:37 pm

Post » Thu Jun 21, 2012 10:03 am

thanks I 'll try that ...
User avatar
Carolyne Bolt
 
Posts: 3401
Joined: Mon Jul 10, 2006 4:56 am


Return to V - Skyrim