Well I am taking time off from my game to port one of my old basic games into ags . One key feature is a random dungeon generator. I want to have a random forest dungeon, mine dungeon, etc...
To accomplish this their needs to be both a minimum and a maximum so I can set the range between the backgrounds, perhaps 1-20 are forest 20-40 are cave. I need random number between 20-40 for a cave. One possible work around would be something like If int is between 0-20 then redo random. But a script like that could be kinda slow and time consuming to add to every room. Could you add a min range to random please cj
Random(20) + 20
gives you the same effect
You can define your own custom function:
Global script
function RandomEx(int min, int max) { return (min + Random(max-min)); }
Script header (so you can use it outside the global script, ie in rooms)
import function RandomEx(int min, int max);
I didnt know that was possible, thanks