GODSBANE123456 Posted July 22, 2010 Share Posted July 22, 2010 (edited) A few weeks back, i created a topic asking about how to get the player to teleport to a location via scripting, and after much hardship, i finally got it... kinda... scriptname ACPlayerteletoarena ;Quest script applied to quest ACArenaChallengeQuest short acplayerteletoashort DoOnce begin gamemode(Tab) if ACplayerteletoa == 1 && DoOnce == 0(Tab)(Tab) player.moveto ACTargetRatmid(Tab)(Tab) set DoOnce to 1(Tab)(Tab) set ACplayerteletoa to 0(Tab)(Tab) setstage ACArenaChallengeQuest 10(Tab)(Tab) set acarenachallengequest.ACPlayerteletoa to 0(Tab) endifend within my quest that this script is attached to, i have dialogue so that when you say "yes", it executes the script, and it does all that fine, but for some messed up reason that i have yet to figure out, it will continually teleport my player back to ACTargetRatmid about every 2 seconds... And yes, i tried setting the script to kill the rat, but that doesn't seem to be too happy with the quest type scripts, cause it gave me an error, and wouldn't let me save it... anyone have any suggestions as to why this may be happening? Any insight would be greatly appreciated, thanks in advance. Edited July 23, 2010 by GODSBANE123456 Link to comment Share on other sites More sharing options...
Vagrant0 Posted July 23, 2010 Share Posted July 23, 2010 The problem is due to the issue where any movement called on the player acts as a Return in the script, preventing all other functions after it from happening. Essentially, just moving the Move function after all other actions are done should fix it. scriptname ACPlayerteletoarena ;Quest script applied to quest ACArenaChallengeQuest short acplayerteletoa short DoOnce begin gamemode (Tab) if ACplayerteletoa == 1 && DoOnce == 0 (Tab)(Tab) set DoOnce to 1 (Tab)(Tab) set ACplayerteletoa to 0 (Tab)(Tab) setstage ACArenaChallengeQuest 10 (Tab)(Tab) set acarenachallengequest.ACPlayerteletoa to 0 (Tab)(Tab) player.moveto ACTargetRatmid (Tab) endif end Link to comment Share on other sites More sharing options...
GODSBANE123456 Posted July 23, 2010 Author Share Posted July 23, 2010 Oh my god wow that worked thanks a lot, although now when i click yes, it takes a second to initiate the loading screen, but atleast it works, now i can move forward on my attempt to create a good first modhttp://www.thenexusforums.com/public/style_emoticons/dark/biggrin.gif Link to comment Share on other sites More sharing options...
Recommended Posts