They Are Billions

They Are Billions

Custom Levels for They Are Billions
Add custom levels to They Are Billions by subscribing to these workshop items!
Learn More
ApplyRules(“Ranger TimeAction -10%”) - Why does this not work?
I'm trying to execute some code to make rangers attack 10% faster. From what I have been able to gather, it's either ApplyRules(“Ranger TimeAction -10%”) or maybe ApplyRules(“RangerAttack TimeAction -10%”). However, for both of these functions, I'm getting:

Error Executing Sequence: Function bad arguments list: ApplyRules(“Ranger TimeAction -10%”)

Then

Error evaluating expression: Variable referenced not initialized: RangerTimeAction

Do I just have the function wrong, or is this a bug?
< >
Showing 1-4 of 4 comments
Amove 16 24 Jun, 2024 @ 8:53pm 
You need a ; behind the bracket. Also try using numerical values instead of %’s if the above doesn’t work. The value of non-vet ranger TimeAction is 1000 (500 for vet), it should work when changing it to 900.

So ApplyRules(“RangerAttack TimeAction=900”);

The error is probably from a typo.
Last edited by Amove; 24 Jun, 2024 @ 8:59pm
Kevlar Axis 2 25 Jun, 2024 @ 10:39pm 
Idk, I keep getting this error no matter how I try and code the function. Does the function as you wrote it work in a map for you? The ; is for separating multiple functions, I have other ApplyRules working just fine solo without the ; separator.

ApplyRules(“Ranger TimeAction = 900”);ApplyRules(“RangerVeteran TimeAction = 400”)
ApplyRules(“Ranger TimeAction =900”);ApplyRules(“RangerVeteran TimeAction =400”)
ApplyRules(“Ranger TimeAction=900”);ApplyRules(“RangerVeteran TimeAction=400”)
ApplyRules(“RangerAttack TimeAction = 900”);ApplyRules(“RangerAttackVeteran TimeAction = 400”)
ApplyRules(“RangerAttack TimeAction =900”);ApplyRules(“RangerAttackVeteran TimeAction =400”)
ApplyRules(“RangerAttack TimeAction=900”);ApplyRules(“RangerAttackVeteran TimeAction=400”)
Amove 16 26 Jun, 2024 @ 7:54am 
This is straight from several maps that worked for me. ApplyRules("SoldierRegularAttackVeteran TimeLoad=300; SoldierRegularAttackVeteran TimeAction=333; RangerAttackVeteran Damage+2; RangerAttackVeteran TimeLoad=180; RangerAttackVeteran TimeAction=400");
Kevlar Axis 2 26 Jun, 2024 @ 8:44pm 
This was definitely some sort of bug. I had the initial format wrong ("Ranger" instead of "RangerAttack"), but it seems like that may have caused the events in the communicator to bug out. All I did was take your code, which worked, and then backtracked after the error "cleared" to get right back to the function formats I was using before that are now working. *headscratch*

Thank you for helping me work through this!
< >
Showing 1-4 of 4 comments
Per page: 1530 50