I'm still muddling around with the screen coordinate math for GE. Here is what I would like to do:
Reduce the screen boundry for my actor when using a random actor placement script. The script takes place in a different activation region from the original view:
I use the following script to change from the initial view area to the new activation region:
view.x= -360;
view.y= -160;
=====================
My actor needs more restricted boundries than the rand statement below offers me. Say, 40 pixels in from the left, right,top and bottom of the activated view region.
This is the script that I am working with:
x=rand(view.width)+view.x
---------------
I've spent several hours trying to tinker with adding and subtracting from the view.width and view.x. I've also gone back over the "range" example that jazz-e-bob posted a while back . I've tried different variables and "if" statements. I'm not getting anywhere.
To prevent a disasterous head banging incident, I'm posting here. Anyone care to venture an educated (or uneducated) guess?
TIA