Nesthor Posted September 20, 2019 Share Posted September 20, 2019 Hello everyone, I am preparing a public ticket Cleo, so far it works well, but I would like to know if there is any opcode that records the distance traveled, that is, that the player is paid an amount but that is dependent on the distance he traveled driving a vehicle, will this be possible? Link to comment Share on other sites More sharing options...
Sloth- Posted September 20, 2019 Share Posted September 20, 2019 (edited) I don't know if there is a better way, but try this: Spoiler 0653: your_var = float_stat 4 // travelled distance by car You call this instruction and store the amount before starting travel. Then call the instruction again at the end of travel, and calcule the difference. distance_travelled = dist_travelled_end - dist_travelled_begining Edited September 20, 2019 by Sloth- Nesthor 1 Link to comment Share on other sites More sharing options...
Nesthor Posted September 21, 2019 Author Share Posted September 21, 2019 6 hours ago, Sloth- said: I don't know if there is a better way, but try this: Hide contents 0653: your_var = float_stat 4 // travelled distance by car You call this instruction and store the amount before starting travel. Then call the instruction again at the end of travel, and calcule the difference. distance_travelled = dist_travelled_end - dist_travelled_begining Thanks for the tip, I'll read about it, to see how it works Link to comment Share on other sites More sharing options...