<- [[crpl:crplreference|CRPL reference]] <- [[crpl:crplreference#utility_commands|Utility Commands]] ===== SetTechLimit ===== ^Arguments^Result^Notation^ | Tech, Amount| |'' s1 i1 -- ''| === Description === Sets the research limit for the selected tech. -1 means unlimited === Tech names === Names are not case sensitive. * ENERGYSTORAGE * ACSTORAGE * PACKETSPEED * ENERGYEFFICIENCY * OREEFFICIENCY * BUILDSPEED * MOVESPEED * FIRERATE * FIRERANGE === Examples === 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