Is there somewhere a list of predefined scripts and their respective vars?
I mean scripts such as the "0" script for emitters or res packs and vars such as "AMT" or "resourceType".
Maybe I am looking at the wrong places, but I can't find these in the reference or in the cheatsheet. I figured out these from others' scripts, but it would be nice too see a collection of predefined scripts and vars that can be set (or at least read).
I am also wondering about the efficiency of the getCoresWithVar call. How efficient is it in terms of game performance compared to a standard getAllUnitsInRange loop that checks for a specific var? Does it have the same underlying method or a different one?
I'm not sure if you mean this, GetScriptVar (http://knucklecracker.com/wiki/doku.php?id=crpl:docs:getscriptvar), I hope it helps.
In terms of the efficiency of GetCores I don't know CW3 internal code but you'd assume it ONLY checks CRPLCores. It's been fairly efficient for me I'd love to hear from Virgil on this topic as well.
Quote from: Telanir on April 20, 2015, 10:01:28 AM
I'm not sure if you mean this, GetScriptVar (http://knucklecracker.com/wiki/doku.php?id=crpl:docs:getscriptvar), I hope it helps.
Exactly, that was the thing I was looking for! :o I was either blind or those parts were added in the past two months
But is this the full list? Other player units don't have any scripts and/or vars that can be set/read (except for CONSTs)?
Quote from: Tyler21 on April 20, 2015, 10:15:53 AM
Exactly, that was the thing I was looking for! :o I was either blind or those parts were added in the past two months
Well, page revision history shows it has been around since January 2013. http://knucklecracker.com/wiki/doku.php?id=crpl:docs:getscriptvar&do=revisions