<- CRPL reference <- Utility Commands
Arguments | Result | Notation |
---|---|---|
Tech, Amount | s1 i1 – |
Sets the research limit for the selected tech. -1 means unlimited
Names are not case sensitive.
SetTechLimit("MOVESPEED" 3)
This example creates a chargeable pickup that increases the fire range tech limit when collected.
#test ammo against maxammo Self CONST_MAXAMMO GetUnitAttribute Self CONST_AMMO GetUnitAttribute eq if Self CONST_AMMO 0 SetUnitAttribute #ascend to orbit then destroy "Misc17" PlaySound AscendToOrbit endif :destroyed #increase the tech limit by one when destroyed "FIRERANGE" dup GetTechLimit 1 add SetTechLimit :awake #these are all necessary core attributes for this kind of collectible. Self CONST_CONNECTABLE TRUE SetUnitAttribute Self CONST_REQUESTPACKETS TRUE SetUnitAttribute Self CONST_CANREQUESTAMMO TRUE SetUnitAttribute Self CONST_MAXAMMO 25 SetUnitAttribute