Page 1 of 1
how can i make belts not to move movable entities?
Posted: Thu Jan 19, 2017 10:49 am
by /odosk/
In default, transport belt can make 'movable entities(player,car,tank,etc...)' to move, but I want to disable that.
How can I do it? (modding)
Re: how can i make belts not to move movable entities?
Posted: Thu Jan 19, 2017 10:53 pm
by Rseding91
There is no way.
Re: how can i make belts not to move movable entities?
Posted: Fri Jan 20, 2017 1:33 am
by darkfrei
Rseding91 wrote:There is no way.
Which collision masks have vehicles?
Re: how can i make belts not to move movable entities?
Posted: Fri Jan 20, 2017 8:15 am
by Adil
Even the planes which don't have collision mask are affected by belts.
You'd have to implement complex on_tick logic to detect the vehicles being moved by belts and restore their position and I don't even know how to discern that from player driving the car along the belt.
Re: how can i make belts not to move movable entities?
Posted: Fri Jan 20, 2017 10:56 am
by bobingabout
I've not played with it much but.... Doesn't the movable tag just means "I can be moved by belts"?
Re: how can i make belts not to move movable entities?
Posted: Fri Jan 20, 2017 12:44 pm
by Adil
I can't find this flag neither in raws nor in api documentation. Where did you see that?
Re: how can i make belts not to move movable entities?
Posted: Fri Jan 20, 2017 1:23 pm
by Ranakastrasz
Adil wrote:Even the planes which don't have collision mask are affected by belts.
You'd have to implement complex on_tick logic to detect the vehicles being moved by belts and restore their position and I don't even know how to discern that from player driving the car along the belt.
Well, I don't know exact mechanics, but I think this is how to do it.
Determine exactly what situations cause the belt to move the entity, and how to detect that the entity is on a belt. Determine belt speed and vector. Apply inverted vector to entity position.
Essentially, detect when the entity is on a belt, then apply exactly the same movement in inverse that the belt does. All other sources of movement should be uneffected.
Main issue is determining exactly how fast a belt moves an entity, and making sure your detection is correct (otherwise it would cause the entity to move in the opposite direction of the belt while uneffected by the belt, or else move with the belt as it currently does)
Complex, but should be feasible.
Re: how can i make belts not to move movable entities?
Posted: Sun Jan 22, 2017 8:05 am
by /odosk/
what about just disabling enemies and player moving?
Re: how can i make belts not to move movable entities?
Posted: Sun Jan 22, 2017 8:53 am
by Optera
bobingabout wrote:I've not played with it much but.... Doesn't the movable tag just means "I can be moved by belts"?
That flag mislead me too. If I recall correctly it means entity can be moved by pushing against it with a car.
Having a flag, can be moved by belts would be really nice.