This probably has some stupidly simple answer, but I tried what I thought would work and I can't see any other obvious solution.
Set (Unit) (Resources) to (Resource Amount) is the action I tried, under Set Unit Property. It did nothing.
Here's the actual line.
Unit - Set (Picked unit) Resources to (((Picked unit) Resources (Current)) * randpercent)
randpercent is an already declared variable (Real) that is a random number between .1 and 1.1.
Nevermind. Solved my own problem in like a minute. Derp.
For anyone curious, I was using the right line but the wrong variable. Had randpercent set up as 10, as a real, reading it as .1 or 10%, when the game saw it as literally 10. That always set it to the highest possible resources, hence the appearance of not changing. Sorry to waste anyones time in reading this.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
This probably has some stupidly simple answer, but I tried what I thought would work and I can't see any other obvious solution.
Set (Unit) (Resources) to (Resource Amount) is the action I tried, under Set Unit Property. It did nothing. Here's the actual line. Unit - Set (Picked unit) Resources to (((Picked unit) Resources (Current)) * randpercent) randpercent is an already declared variable (Real) that is a random number between .1 and 1.1.
Nevermind. Solved my own problem in like a minute. Derp. For anyone curious, I was using the right line but the wrong variable. Had randpercent set up as 10, as a real, reading it as .1 or 10%, when the game saw it as literally 10. That always set it to the highest possible resources, hence the appearance of not changing. Sorry to waste anyones time in reading this.