Jump to content

code!


GerardWay

Recommended Posts

Posted

is this code missing an argument?

    Gate1 = createObject (969, 209.69999694824, 1875.5, 12.39999961853, 0, 0, 0) 
      
 function ToggleGate(thePlayer,command) 
moveObject (Gate1, 4000, 210.10000610352, 1875.5999755859, 8.8999996185303) 
setTimer(moveObject,6000,1,Gate1,4000,209.69999694824, 1875.5, 12.39999961853) 
 end 
addCommandHandler ( "mgo", ToggleGate ) 

Posted (edited)

i think that should be work

try this

function onStartup () 
  
    myMarker = createMarker( 207.69999694824, 1875.5, 12.39999961853, 'corona', 15.0, 0, 0, 255, 0) 
        gate1 = createObject (969, 209.69999694824, 1875.5, 12.39999961853, 0, 0, 0) 
  
    addEventHandler( "onMarkerHit", myMarker, MarkerHit1 ) 
        addEventHandler( "onMarkerLeave", myMarker, MarkerLeave1 ) 
end 
  
function MarkerHit1(thePlayer, hitElement, matchingDimension ) 
  
moveObject ( gate1, 2000, 210.10000610352, 1875.5999755859, 8.8999996185303) 
  
end 
      
function MarkerLeave1( leaveElement, matchingDimension ) 
moveObject ( gate1, 2000, 209.69999694824, 1875.5, 12.39999961853) 
end 
  
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onStartup)  
  

Edited by Guest
Posted

try this :

  
gate = createObject(969, 209.69999694824, 1875.5, 12.39999961853, 0, 0, 0) 
  
function moveGate() 
          moveObject(gate, 3000,  210.10000610352, 1875.5999755859, 8.8999996185303) 
          setTimer(moveObject, 6000, 1, gate,3000, 210.10000610352, 1875.5999755859, 8.8999996185303) 
end 
addCommandHandler("open", moveGate) 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...