veers

createMissionTrain crash

Recommended Posts

How to make it stop (slowly?)?

Why doesn't it work? 

vehicle.setMissionTrainCoords(x, y, z);
Edited by linnik

Share this post


Link to post
Share on other sites

After some experiments I have found that:

1. You can create train and it starts driving immediately.

2. You can stop it but later you are not allowed to make it go.

So train implementation is very raw at this point.

Share this post


Link to post
Share on other sites

My experiments: You can't use integer for speed. 3.7, 3.8, 3.9 works but 4.0 not. 4.1, 4.2 ... 4.9 works but 5.0 not etc.

Share this post


Link to post
Share on other sites
45 минут назад, linnik сказал:

How to make it stop (slowly?)?

Why doesn't it work? 

vehicle.setMissionTrainCoords(x, y, z);

mp.game.invoke("0x16469284DB8C62B5", trainHandle, 0) 

That sets cruise speed to 0, and It stops.

 

Share this post


Link to post
Share on other sites
2 минуты назад, Hanvod сказал:

mp.game.invoke("0x16469284DB8C62B5", trainHandle, 0) 

That sets cruise speed to 0, and It stops.

 

But can you start it again? Btw is it syncronized to other players?

Edited by linnik

Share this post


Link to post
Share on other sites

 

 

Только что, linnik сказал:

But can you start it again?

Maybe if you set cruise speed back to positive number.

mp.game.invoke("0x16469284DB8C62B5", trainHandle, 10) 

Share this post


Link to post
Share on other sites
3 минуты назад, Hanvod сказал:

 

 

Maybe if you set cruise speed back to positive number.

mp.game.invoke("0x16469284DB8C62B5", trainHandle, 10) 

is speed always the same or I can vary it?

Share this post


Link to post
Share on other sites
6 минут назад, linnik сказал:

is speed always the same or I can vary it?

Looks like train always accelerates to cruise speed and then just folows it. But I dont really know

Edited by Hanvod

Share this post


Link to post
Share on other sites

Ok, that natives are working good, but you need to use stupid numbers like 20.54546456464 to make sure that you game wont crash or train wont stop.

Edited by Hanvod

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.