This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| crpl:docs:settechlimit [2014/10/01 19:02] – external edit 127.0.0.1 | crpl:docs:settechlimit [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~DISCUSSION~~ | + | |
| <- [[crpl: | <- [[crpl: | ||
| ===== SetTechLimit | ===== SetTechLimit | ||
| Line 8: | Line 8: | ||
| === Description === | === Description === | ||
| - | Sets the research limit for the selected tech. | + | 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 === | === Examples === | ||
| < | < | ||
| + | |||
| + | 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 | ||
| + | " | ||
| + | AscendToOrbit | ||
| + | endif | ||
| + | |||
| + | :destroyed | ||
| + | #increase the tech limit by one when destroyed | ||
| + | " | ||
| + | |||
| + | :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 | ||
| + | </ | ||
| + | |||