Jump to content

Question .. HELP!


d43dr4

Recommended Posts

Hello guys,

Happy new year 2013 :mrgreen:

I have two questions:

How to make a moving object, i try OMG resource but it deosnt work.. so if u know another way please tell me.

Second one, how to make a door opens if a player come closer to it , and close when the player go away

THX..

Link to comment

Guys look what i do :

doormarker = createMarker ( -3743.6, -3022.52, 38, "cylinder", 10, 255, 0, 255, 255 ) 
door = createObject( 971, -3743.3999023438, -3022.6999511719, 44.700000762939, 0, 0, 270 ) 
  
function ( thePlayer, matchingDimension ) 
 if isElementWithinMarker(thePlayer, doormarker) then 
    moveObject ( door, 3743.3999023438, -3022.6999511719, 50 ) 
 end 
end 

Not worked , can u correct please

Debugscript: SCRIPT ERROR: door\xx.lua:4: 'name' expected near '('

Link to comment
local doormarker = createMarker ( -3743.6, -3022.52, 38, "cylinder", 10, 255, 0, 255, 255 ) 
local door = createObject( 971, -3743.3999023438, -3022.6999511719, 44.700000762939, 0, 0, 270 ) 
  
function moveIt( thePlayer, matchingDimension ) 
 if isElementWithinMarker(thePlayer, doormarker) then 
    moveObject ( door, 3743.3999023438, -3022.6999511719, 50 ) 
 end 
end 
addEventHandler('onMarkerHit', doormarker, moveIt) 
  

Link to comment

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...