I am familiar with the constants in CRPL, but how do i use them with PRPL? I tried using the Command SetUnitAttribute, but apparently it does not exist. So because of that, i come here to get an answer. So, how do i use it? I am using the constant, Const_IsEnemy BTW. If anyone knows this quick question then my first custom module will be complete! (Hopefully :P )
Edit: Anyone can just leave an example, i will just use the example as a future reference.
It's now just SetAttribute, but in most cases it isn't the best. Instead, use <-uid GetUnitIsEnemy or <-uid <-something SetUnitIsEnemy (there are now variations for all constants.) Or you can do <-uid.UnitIsEnemy and ->uid.UnitIsEnemy (again, equivalents exist for all constants.)
Quote from: planetfall on December 16, 2016, 07:25:17 PM
It's now just SetAttribute, but in most cases it isn't the best. Instead, use <-uid GetUnitIsEnemy or <-uid <-something SetUnitIsEnemy (there are now variations for all constants.) Or you can do <-uid.UnitIsEnemy and ->uid.UnitIsEnemy (again, equivalents exist for all constants.)
Ok, thank you for the clarification! :)
(Short note: There are some small, little-used areas where the .Attr, SetAttr and CONST_ATTR do not all exist, but this will hopefully change soon. I won't list those I have found in the hope that they will be fixed before anyone else misses them.)