besweeet Posted September 29, 2011 Posted September 29, 2011 (edited) Trying to get the teleportation stuff going in Awesome Coaster 2, but I'm having some issues.I tried Emanuel's/Bin's script here (also pasted below), but it doesn't work. What you're seeing here is my code:addEvent('onPlayerReachCheckpoint', true)addEventHandler('onPlayerReachCheckpoint', getRootElement(),function(checkpoint) if checkpoint == 3 then x,y,z = getElementVelocity(getPedOccupiedVehicle(source)) setElementPosition(getPedOccupiedVehicle(source), 1256.3970947266, -616.40679931641, 102.78839874268) setElementRotation(getPedOccupiedVehicle(source), 0, 0 , 90) setElementVelocity(getPedOccupiedVehicle(source), 0,y,0) endend)I basically changed the checkpoint number and the coordinates, but it doesn't work. Yes, I added the "<script src="teleport.lua" type="client" />" line in my meta.xml file.It's simply not working. When I hit the checkpoint, I'm expecting it to take me to the new location, but it doesn't do anything at all.Any ideas? Would rather stick to using checkpoints instead of individual markers. Edited September 29, 2011 by besweeet Quote
BinSlayer Posted September 29, 2011 Posted September 29, 2011 (edited) Yes, I added the "<script src="teleport.lua" type="client" />" line in my meta.xml file.You seem so sure of yourself I actually hate to break it to you, but it's type="server" :P Edited September 29, 2011 by BinSlayer Quote
BlueYoshi97 Posted September 29, 2011 Posted September 29, 2011 (edited) Make sure that the number of the checkpoint equals the number of the checkpoint you teleport away from, and that the coördinates represent the position of the location you want to teleport to.Edit: Nevermind, BinSlayer saved the day! Edited September 29, 2011 by BlueYoshi97 Quote
besweeet Posted September 29, 2011 Author Posted September 29, 2011 Yes, I added the "<script src="teleport.lua" type="client" />" line in my meta.xml file.You seem so sure of yourself I actually hate to break it to you, but it's type="server" :PAh, I'll try that when I get home in a few hours. Why would it be server instead of client? Couldn't really find any descriptive answers. Quote
SDK Posted September 29, 2011 Posted September 29, 2011 onPlayerReachCheckpoint is a custom serverside event, everything else can be used on both sides yes. Quote
besweeet Posted September 30, 2011 Author Posted September 30, 2011 I set it to server, and it worked. BUT, right when I spawn at my new point, my car immediately flies up in the air and spins around a bunch. I tried setting it to be higher, but it doesn't seem to be helping.Also, how the FUCK do I remove the motion blur from the MTA map editor when testing a map? SO. FUCKING. ANNOYING. Quote
BinSlayer Posted September 30, 2011 Posted September 30, 2011 remove this linesetElementVelocity(getPedOccupiedVehicle(source), 0,y,0)it doesn't generally work, you need to tweak the 0,y,0 arguments for each particular case and you probably just shouldn't use velocity at all, just use the other script codes that teleport the car (again, no need for that velocity line)post again if it still doesn't work as you might need to also freeze the car after teleporting (i'll help with this if it doesnt work) Quote
SDK Posted September 30, 2011 Posted September 30, 2011 Also, how the FUCK do I remove the motion blur from the MTA map editor when testing a map? SO. FUCKING. ANNOYING.You can change the settings for race in the admin panel, or in race's meta.xml<setting name="*blur" value="36" to value="0" Quote
besweeet Posted September 30, 2011 Author Posted September 30, 2011 (edited) remove this linesetElementVelocity(getPedOccupiedVehicle(source), 0,y,0)it doesn't generally work, you need to tweak the 0,y,0 arguments for each particular case and you probably just shouldn't use velocity at all, just use the other script codes that teleport the car (again, no need for that velocity line)post again if it still doesn't work as you might need to also freeze the car after teleporting (i'll help with this if it doesnt work)I removed the line altogether, and the car still flies into the air. The slower the car seems to go when you hit the initial checkpoint, the crazier the car will get.Also, how the FUCK do I remove the motion blur from the MTA map editor when testing a map? SO. FUCKING. ANNOYING.You can change the settings for race in the admin panel, or in race's meta.xml<setting name="*blur" value="36" to value="0"Works . LOVE YA! Not working... I don't love you anymore. Just kidding... Of course I do! I noticed that the line that has the blur setting in it keeps getting removed when testing a map... Lastly, I don't get an admin panel in the MTA map editor. Had to do start admin in the console. Works now . Edited September 30, 2011 by besweeet Quote
besweeet Posted September 30, 2011 Author Posted September 30, 2011 Also, the custom wheels and tires on my custom car (replacing the Infernus) don't show up until I die and respawn. The stock wheels and tires from the Infernus are what show up by default for some reason. I read that adding upgrades="0" to the spawnpoint for the car would fix it, but then MTA would get stuck at loading the map and wouldn't do anything, even after I clear the line out. Quote
besweeet Posted September 30, 2011 Author Posted September 30, 2011 I took the lazy man's way out by using this. Makes teleports easily.Would still like to get the wheel situation figured out. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.