Ghaunadaur Posted July 1, 2012 Share Posted July 1, 2012 Scriptname TeleportMoveToLocation extends ObjectReference ObjectReference Property MyReturnMarker auto {Set this to the XMarkerHeading that is to be used as a return point} Event OnActivate(ObjectReference triggerRef) ; Move the player to the previously saved location Game.GetPlayer().moveto(MyReturnMarker) EndEvent If this is your script, there should be a property MyReturnMarker. If not, try to re-compile it: Right-click the script -> Edit Source -> File -> Save. I tried it and it compiles without errors. Link to comment Share on other sites More sharing options...
JakubDaviau Posted July 1, 2012 Author Share Posted July 1, 2012 (edited) Scriptname TeleportMoveToLocation extends ObjectReference ObjectReference Property MyReturnMarker auto {Set this to the XMarkerHeading that is to be used as a return point} Event OnActivate(ObjectReference triggerRef) ; Move the player to the previously saved location Game.GetPlayer().moveto(MyReturnMarker) EndEvent If this is your script, there should be a property MyReturnMarker. If not, try to re-compile it: Right-click the script -> Edit Source -> File -> Save. I tried it and it compiles without errors. It works fine now and i did this property thing but when I actually test it in game object with this script, activator, is inactive, I cant activate it in any way :( perhaps its because that object is not supposed to be activator in first place? its that portal thingy that dwemer spheres come form hmm EDIT: LOL! I linked it to actual activator, imperial button thingy to see what would happen and it WORKS! I wouldn't actually think it would work like that haha but its acceptable, now I only need to add animation lines to that script and it should be fine I guess Edited July 1, 2012 by JakubDaviau Link to comment Share on other sites More sharing options...
JakubDaviau Posted July 1, 2012 Author Share Posted July 1, 2012 (edited) Something is wrong, script works in simple terms as it moves player to place I designated but I wanted the teleporting object to play animation and now my script looks like that: ObjectReference Property MyReturnMarker autoEvent OnActivate(ObjectReference triggerRef)gotoState("done"); playAnimation("open"); wait(2); Move the player to the previously saved location Game.GetPlayer().moveto(MyReturnMarker); playAnimation("close")EndEvent And as I said it works but it don't do other stuff than teleporting, I wanted the script to first play this "open" animation then wait a moment teleport player and then to play animation "close" to close it up but it just moves the player immediately for some reason, what did I do wrong in that script? EDIT: I added line "gotoState("done")" later when I discovered animations didn't work but it didn't help at all :( Edited July 1, 2012 by JakubDaviau Link to comment Share on other sites More sharing options...
Ghaunadaur Posted July 1, 2012 Share Posted July 1, 2012 Yeah, you're right, that dwemer sphere thing is not supposed to be activated. What you can do, is to place a trigger around it. - make a duplicate form of DefaultInvisibleActivator, select the dwemer thing in render window and press the T-box button to create a trigger. - Choose your duplicated trigger form for the trigger, on the Primitive-tab, check the 'Player Activation' box. Make sure the z-rotation of the trigger is not 0. - Add the script to the trigger, set the property again. - You can also change the name of trigger by editing the base form. The name will be displayed when you activate it. The dwemer sphere already has a script to activate the animation. To trigger it, select the sphere and add a new activation parent. This should be your trigger.To see the animation, before the player gets teleportet, you will have to modify the script a little bit: Scriptname TeleportMoveToLocation extends ObjectReference ObjectReference Property MyReturnMarker auto {Set this to the XMarkerHeading that is to be used as a return point} Event OnActivate(ObjectReference triggerRef) ; Move the player to the previously saved location Utility.Wait(2) Game.GetPlayer().moveto(MyReturnMarker) EndEvent Link to comment Share on other sites More sharing options...
JakubDaviau Posted July 1, 2012 Author Share Posted July 1, 2012 Yeah, you're right, that dwemer sphere thing is not supposed to be activated. What you can do, is to place a trigger around it. - make a duplicate form of DefaultInvisibleActivator, select the dwemer thing in render window and press the T-box button to create a trigger. - Choose your duplicated trigger form for the trigger, on the Primitive-tab, check the 'Player Activation' box. Make sure the z-rotation of the trigger is not 0. - Add the script to the trigger, set the property again. - You can also change the name of trigger by editing the base form. The name will be displayed when you activate it. The dwemer sphere already has a script to activate the animation. To trigger it, select the sphere and add a new activation parent. This should be your trigger.To see the animation, before the player gets teleportet, you will have to modify the script a little bit: Scriptname TeleportMoveToLocation extends ObjectReference ObjectReference Property MyReturnMarker auto {Set this to the XMarkerHeading that is to be used as a return point} Event OnActivate(ObjectReference triggerRef) ; Move the player to the previously saved location Utility.Wait(2) Game.GetPlayer().moveto(MyReturnMarker) EndEvent YES! Thank you that works just fine, except that I used imperial button thing instead of DefaultInvisibleActivator but it works :D I just have to figure out which makes more sense: activation sphere thing itself (via DefaultInvisibleActivator) or pressing button to activate it hmm but it works and its just a detail, for now I'm just glad it works, thank you :) I have other issue thou, mannequins I have I my cell are standing in weird positions like they were moving around in lace but frozen still when player got there, its just weird and I'm not sure why that happens :/ Link to comment Share on other sites More sharing options...
Ghaunadaur Posted July 1, 2012 Share Posted July 1, 2012 Did you already read the CK Tutorial on mannequins? One reason could be missing navmesh under it. Link to comment Share on other sites More sharing options...
JakubDaviau Posted July 2, 2012 Author Share Posted July 2, 2012 Did you already read the CK Tutorial on mannequins? One reason could be missing navmesh under it. I haven't I think I had quick look at it when I was searching on the web how to make functional mannequin but I didn't read it that much after they worked fine and they did work fine earlier but my cell don't have navmesh yet I thought it would be best to do that at the end so it is probably the problem, thanks for help :) what's important its that they actually work Link to comment Share on other sites More sharing options...
JakubDaviau Posted July 2, 2012 Author Share Posted July 2, 2012 (edited) I have some problem with that dwemer sphere port thing, script works and open sphere port thingy but after it gets closed if i activate activator again it wont open again :( i thought it would play open and close animation each time player activate it via activator? :( EDIT: actually now i noticed that the activator (impButton) is not animated either when i activate it, it should have button pushing animation or something like that right? EDIT2: Actually its not working out very well, is it actually possible to attach teleportation script to object that player could take? I mean like ring or amulet that player could use in their inventory and it would move the player to specified marker. Or perhaps spell that would work like that? It would move player to specific place. Edited July 2, 2012 by JakubDaviau Link to comment Share on other sites More sharing options...
flobalob Posted July 2, 2012 Share Posted July 2, 2012 EDIT: actually now i noticed that the activator (impButton) is not animated either when i activate it, it should have button pushing animation or something like that right?Thats because by adding a script with an OnActivate event you have bypased the activators default activation add a line Self.Activate EDIT2: Actually its not working out very well, is it actually possible to attach teleportation script to object that player could take? I mean like ring or amulet that player could use in their inventory and it would move the player to specified marker. Or perhaps spell that would work like that? It would move player to specific place.Yes it's possible, however you would have to use a different event e.g. OnEquipped (for an equipable item) or OnEffectStart (for a spell) or possibly something different depending on exactly how you want it to work.Note: If you wanted it to fire up as soon as the player picked it up, then I think that you would have to add a script to the player character, which is A LOT more complicated and will probably require a quest. Link to comment Share on other sites More sharing options...
Ghaunadaur Posted July 2, 2012 Share Posted July 2, 2012 I have some problem with that dwemer sphere port thing, script works and open sphere port thingy but after it gets closed if i activate activator again it wont open again :( i thought it would play open and close animation each time player activate it via activator? :( The script for the dwemer sphere is made that way, it only plays the animation once. Remove the script from the sphere reference and add a new one like this: Scriptname DwemerSphereAnimation extends ObjectReference import debug import utility Event onActivate(objectReference triggerRef) playAnimation("open") wait(2) playAnimation("close") EndEvent Should work now every time it gets activated. Link to comment Share on other sites More sharing options...
Recommended Posts