Rotate a car without moving it

Place to get help with not working mods / modding interface.
Post Reply
PFQNiet
Filter Inserter
Filter Inserter
Posts: 289
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

Rotate a car without moving it

Post by PFQNiet »

I'm using "fake" cars for a few things. These cars don't move in the conventional way but are teleported every tick for the duration of their effect.

I can't seem to rotate them though. Just setting orientation on them doesn't seem to have any effect. Is there a way to do this?

If not, I suppose I can make the car invisible and draw its graphics with rendering...

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Rotate a car without moving it

Post by DaveMcW »

Code: Select all

/c game.player.selected.orientation = 0.1
That command works on real cars. You will have to figure out which prototype property you used that breaks it.

PFQNiet
Filter Inserter
Filter Inserter
Posts: 289
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

Re: Rotate a car without moving it

Post by PFQNiet »

Huh. Must've done something wrong when I tried it before, because you're right it works just fine. Oops!

Post Reply

Return to “Modding help”