Jump to content

[help]move object


ST3REO

Recommended Posts

Posted

could someone create me the code to move this object?

id object : 3115 name object: CARRIER_LIFT1_SFSE

down ->4060.9077148438 -1819.9403076172 29.235511779785

up->4060.9077148438 -1819.9403076172 346.60443115234

please :book:

I have already read a lot but I don't succeed there.if someone could create me the code please :notworthy:

this object must stir only under and above, it is for a map race.

Posted

Ah i maked a tuturoial :

for moving objects:

1. when making a map, decide what objects you want to be moving

2. move object to desired location (like, if you want an elevator, move it to destination where it should go) and write down its id and position (x-y-z).

3. move your object back where it should start

repeat steps 2-3 for all the objects you want to be dynamic

5. save your map when you finished

6. open .map file if you're using 1.0 mapeditor (or convert it if you're using race mapeditor and then open)

7. find your objects' entries (by id you wrote down for example), it should be like this:

Code:

<object id="testobject" model="3115" interior="0" dimension="0" posX="3446.6684570313" posY="-1914.6517333984" posZ="1.2000885009766" rotX="0" rotY="0" rotZ="0" />

8. now add your desired parameters:

isMoving="true" - to enable moving

movTime="5000" - time to move object form one location to another, in msec (5 sec set here)

restTime="1000" - time the object will stay at each location (1 sec set here)

9. and finally add the x-y-z location of end point you wrote down:

movX="3446.6684570313"

movY="-1914.6517333984"

movZ="13.75008392334"

and it should look like this:

Code:

<object id="testobject" model="3115" interior="0" dimension="0" posX="3446.6684570313" posY="-1914.6517333984" posZ="1.2000885009766" rotX="0" rotY="0" rotZ="0" isMoving="true" movTime="5000" restTime="1000" movX="3446.6684570313" movY="-1914.6517333984" movZ="13.75008392334" />

and you're done.

Posted

k commands are up and down

5000 in line 3/7 stands for the speed (for slower go higher(5000+) and fast go lower (5000-))

3115 in 1 line stands for the object

u can change commands by editing this

addCommandHandler("up", opendoor)
addCommandHandler("down", opendoor)

gate = createObject(3115,213.37258911133,1875.5131835938,7.0294618606567,90,0,0)
 
function opendoor()
moveObject (gate, 5000, 4060.9077148438,-1819.9403076172,29.235511779785 )
end
addCommandHandler("up", opendoor)
function closedoor()
moveObject (gate, 5000, 4060.9077148438,-1819.9403076172,346.60443115234 )
end
addCommandHandler("down", closedoor)

yes people : ) im learning :mrgreen:

Posted

loler, as you are new here - small advice. If you dont have anything useful to say-dont say anything.

kevin, this is the script for opening closing gates,moving objects on command. Not automatically. And its not even by you ;p

Posted
could someone create me the code to move this object?

id object : 3115 name object: CARRIER_LIFT1_SFSE

down ->4060.9077148438 -1819.9403076172 29.235511779785

up->4060.9077148438 -1819.9403076172 346.60443115234

please :book:

I have already read a lot but I don't succeed there.if someone could create me the code please :notworthy:

this object must stir only under and above, it is for a map race.

you could create me the code to directly insert in.map? :notworthy: please :(

I use mta he knows are 1.0.3 a problem?

Posted
Ah i maked a tuturoial :

for moving objects:

1. when making a map, decide what objects you want to be moving

2. move object to desired location (like, if you want an elevator, move it to destination where it should go) and write down its id and position (x-y-z).

3. move your object back where it should start

repeat steps 2-3 for all the objects you want to be dynamic

5. save your map when you finished

6. open .map file if you're using 1.0 mapeditor (or convert it if you're using race mapeditor and then open)

7. find your objects' entries (by id you wrote down for example), it should be like this:

Code:

<object id="testobject" model="3115" interior="0" dimension="0" posX="3446.6684570313" posY="-1914.6517333984" posZ="1.2000885009766" rotX="0" rotY="0" rotZ="0" />

8. now add your desired parameters:

isMoving="true" - to enable moving

movTime="5000" - time to move object form one location to another, in msec (5 sec set here)

restTime="1000" - time the object will stay at each location (1 sec set here)

9. and finally add the x-y-z location of end point you wrote down:

movX="3446.6684570313"

movY="-1914.6517333984"

movZ="13.75008392334"

and it should look like this:

Code:

<object id="testobject" model="3115" interior="0" dimension="0" posX="3446.6684570313" posY="-1914.6517333984" posZ="1.2000885009766" rotX="0" rotY="0" rotZ="0" isMoving="true" movTime="5000" restTime="1000" movX="3446.6684570313" movY="-1914.6517333984" movZ="13.75008392334" />

and you're done.

I have already tried a lot of times so but it doesn't work :(

HELPPPPPP :|:|:|:|

Posted

the object must get up and to lower only without any command.it is for a map race :(

do you have a map with objects that stir so that to see the script?

any map race that has an object that stirs.. :|:|:|:|:|:|:| please.

Posted

a base serves for the cars and that that it stirs must destroy :D

with this script I have understood a lot.thanks infinitely varez. :wink:

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