Jump to content

Moving Objects


BabY

Recommended Posts

Hello all, It's me :D

When I Tried to Make a Moving Object

Using OMG Gnerator (Object Movement Generator)

and This is my Script File :

-- DDC OMG generated script: 
  
function omgInit() 
  omg6320 = createObject(970,3297.177734375,-1700.7021484375,25.192806243896,0,0,29) 
  omg6320Attach1 = createObject(970, 3297.177734375, -1700.7021484375, 25.192806243896, 0, 0, 29) 
  attachElements(omg6320Attach1, omg6320, 0, 0, 4.8316906031687e-013, 0, 0, 0) 
  omgMoveomg6320(1) 
end 
  
function omgMoveomg6320(point) 
  if point == 1 then 
    moveObject(omg6320,4444,3297.177734375,-1700.7021484375,24.142822265625,0,0,0) 
    setTimer(omgMoveomg6320,4444 + 0, 1, 2) 
  elseif point == 2 then 
    moveObject(omg6320,4444,3297.177734375,-1700.7021484375,25.192806243896,0,0,0) 
    setTimer(omgMoveomg6320,4444 + 0, 1, 1) 
  end 
end 
  
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), omgInit) 

I Had a Problem !

When I Test my Map, I Can't see the Object Moving ... What is the Problem here ?

Link to comment

But Look This :

omg6320 = createObject(970,3297.177734375,-1700.7021484375,25.192806243896,0,0,29) 
5.  omg6320Attach1 = createObject(970, 3297.177734375, -1700.7021484375, 25.192806243896, 0, 0, 29) 

I Think I Should Delete my Object in the Map ???

Link to comment

ask generator creator why its not working when it should?

im debugging it now, i'll post debug code, so you will be able to find the error (and learn to debug by urself)

edit:

the funny thing is that it's actually WORKING.

Probably this is only a part of your file, and you just have a syntax error somewhere else, which makes whole script to not working..

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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