Perro Seco, on 29 September 2018 - 06:50 AM, said:
I said I wanted to keep the sprites with the player because I thought the code provided would be useful to know those two positions everytime he exits the car, so you can move him to the left or, if there's a wall, to the right side of the car.
If that's all you need, then don't make extra sprites and don't do the calculations all the time. Just do the calculation once when the player exits the vehicle and move the player to those coordinates.
Perro Seco, on 29 September 2018 - 06:50 AM, said:
I think I almost got what I want, but now I'm unable to change the player's position. I'm using setplayer[THISACTOR].posx and posy, but it doesn't seem to affect the position. Do I need something more or something completely different to change the position?
Changing the player coordinates is usually all you need for changing the player's actual position. It's better if you also update the player's sector, in case the new coordinates are in a new sector. You can feed your new coordinates into the updatesector or updatesectorz command, then set the player's cursectnum to the outputed sector (but don't set it if the output is -1 for some reason).
As for why it's not working when you set posx and posy, it could be because you aren't setting the sector but I think it's more likely something else which is blocking your attempt. The first thing I would check is make sure that Lezing's bike code is not setting the player's coords at that point, since it could be overriding your attempt. Also, you should verify 100% that you have calculated the new coordinates correctly. You can do a visual confirmation by espawning a sprite there and setting it to those coordinates; do so in F7 view mode so that you can see it in game and verify it is in the right place.