Not sure if I'm just not up on my terminology or what,. but why can I not figure out how to set a value from a ZExpresion for a "Float" ?
i.e;
Timer.RepeatCount=7;
when I try this i get an err response "Only float type properties can be used:"
also; while I am here, what is the best way to round values to whole numbers ? for when I would like to get a random whole number without all the messy decimal places,. round(random(4,2) ) => 2,3,4,5,6 ???
Thnks
Floating Rounded numbers,. ?
Moderator: Moderators
- jph_wacheski
- Posts: 1005
- Joined: Sat Feb 16, 2008 8:10 pm
- Location: Canada
- Contact:
Floating Rounded numbers,. ?
iterationGAMES.com
Re: Floating Rounded numbers,. ?
RepeatCount is of type "integer" and cannot be set from expressions. This is a limitation of the current script engine unfortunately.jph_wacheski wrote: Timer.RepeatCount=7;
//here is what I would dojph_wacheski wrote:
what is the best way to round values to whole numbers ? for when I would like to get a random whole number without all the messy decimal places,. round(random(4,2) ) => 2,3,4,5,6 ???
Temp1=random(4,2);
Temp1-=frac(Temp1);
I'm busy fixing the decimal rounding problem when saving zgeproj-files, expect an ZGE update shortly.
- jph_wacheski
- Posts: 1005
- Joined: Sat Feb 16, 2008 8:10 pm
- Location: Canada
- Contact: