So, I've narrowed down my error issue to my Enemy Initialize trigger. Which I forgot I had set to use a region array instead of my original "copy past" formula. So I'm assuming I'm setting the regions improperly.
EventsLocalVariablesL=0<Integer>UnitType=0<Integer>Levels=NoRegion<Region[100]>
Conditions
Actions
General - For each integer L from 1 to 100 with increment 1, do (Actions)
Actions
Variable - Set Levels[L] = (Region named ("Level " + (String(L))))
Unit Group - Pick each unit in (Any units in Levels[L] owned by player 15 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Set (Picked unit) custom value 0 to (X of (Position of (Picked unit)))
Unit - Set (Picked unit) custom value 1 to (Y of (Position of (Picked unit)))
Unit - Set (Picked unit) custom value 2 to L
Unit - Add L STAG Enemy Buff to (Picked unit) from player 15
Unit - Set (Picked unit) Bounty (Minerals) to (Ceiling(((Minerals cost of (Unit type of (Picked unit))) * (1.2 ^ L))))
I've got the object error resolved, but the trigger is not functioning properly. All of my regions are named Level X, but I have the space set up in the Region named string. Am I using this correctly?
It's not doing anything, that I can tell. At least, it's not applying any of the actions stated in the trigger to (picked unit). I do see your point in not needing an array since I can just set the region string in the pick and do. I ended up just going back to my old formula, but I'll probably end up trying it again without using the Array. And I set the Level Numbers to 1,2,3, etc. since I didn't think it would register if I had zeroes in front.
I then renamed all of the regions to simply 1,2,3 and took out the "Level " string altogether, just using convert integer to string, but it was still not applying any changes in game. (Bounty not set, buffs not applied, custom values not changed allowing the respawn trigger to set units in the proper places.)
Could it have been the convert integer to string that broke it? Should I just have set the variable? (Region Named (L)) instead of (Region Named (String(L)))?
So, I've narrowed down my error issue to my Enemy Initialize trigger. Which I forgot I had set to use a region array instead of my original "copy past" formula. So I'm assuming I'm setting the regions improperly.
I've got the object error resolved, but the trigger is not functioning properly. All of my regions are named Level X, but I have the space set up in the Region named string. Am I using this correctly?
Be more specific, please. Describe the actual problem.
Are your regions named like "Level 001" or "Level 1"?
Also, if this is your whole trigger, there's no reason to use an array.
@temhawk: Go
It's not doing anything, that I can tell. At least, it's not applying any of the actions stated in the trigger to (picked unit). I do see your point in not needing an array since I can just set the region string in the pick and do. I ended up just going back to my old formula, but I'll probably end up trying it again without using the Array. And I set the Level Numbers to 1,2,3, etc. since I didn't think it would register if I had zeroes in front.
I then renamed all of the regions to simply 1,2,3 and took out the "Level " string altogether, just using convert integer to string, but it was still not applying any changes in game. (Bounty not set, buffs not applied, custom values not changed allowing the respawn trigger to set units in the proper places.)
Could it have been the convert integer to string that broke it? Should I just have set the variable? (Region Named (L)) instead of (Region Named (String(L)))?
You did use "Run Trigger" to run it, right? Because there are no events in the code you pasted.
@temhawk: Go
I believe it was run from my initialize. I really don't remember.