Callback: Build probability: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
Andythenorth (talk | contribs) |
Andythenorth (talk | contribs) |
||
| Line 1: | Line 1: | ||
== |
== Probability of reversing rail vehicle on build (162) == |
||
This callback assigns rail vehicles a random chance of being built facing forward or backward (reversed) when purchased. |
This callback assigns rail vehicles a random chance of being built facing forward or backward (reversed) when purchased. |
||
Revision as of 20:43, 30 November 2023
Probability of reversing rail vehicle on build (162)
This callback assigns rail vehicles a random chance of being built facing forward or backward (reversed) when purchased.
Return a value between 0...100 (decimal) to indicate the probability of being reversed.
The same random-reverse behaviour can be implemented without the callback, by randomly switching to reversed sprites in the vehicle's varaction 2 chain, but this is inefficient as it typically causes sprites to be duplicated in the grf.