denny199 Posted October 22, 2012 Share Posted October 22, 2012 Hey there, I was just scripting arround for a map, but then I've found out that setGameSpeed isn't only for the client on client-side my code: marker1 = createMarker ( 4931.61621, -2618.78564, 7.33527, "cylinder", 1.5, 255, 255, 0, 0 ) container1 = createObject ( 2934,4920.2998046875,-2569.6999511719,23,0,0,0 ) function container () moveObject(container1, 1000, 4920.299, -2569.699, 7.5, 0, 0, 0 ) setTimer (createExplosion, 1000,4, 4920.299, -2569.699, 7.5, 4 ) setGameSpeed(0.4) setTimer ( setGameSpeed, 2000, 1, 1) end addEventHandler ( "onClientMarkerHit", marker1, container ) meta.xml <meta> <script src="client.lua" type="client"></script> </meta> Regards, Danny Link to comment
Castillo Posted October 22, 2012 Share Posted October 22, 2012 What do you mean by "isn't only for the client"? P.S: You should check if the hitElement at 'container' function is the local player. Link to comment
denny199 Posted October 22, 2012 Author Share Posted October 22, 2012 I mean with; "isn't only for the client" That everyone his/her gamespeed is set to for example: 0,3. And how should I 'container' it? like this?: hittype = getElementType( hitElement ) if (hittype == player ) then Link to comment
Guest Guest4401 Posted October 22, 2012 Share Posted October 22, 2012 if hitElement == localPlayer then should do. Link to comment
denny199 Posted October 22, 2012 Author Share Posted October 22, 2012 Allright, testing it now: Thanks, it's working. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now