User Tools

Site Tools


crpl:docs:settechlimit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
crpl:docs:settechlimit [2014/10/01 15:02] – external edit 127.0.0.1crpl:docs:settechlimit [2021/02/05 11:44] (current) – Rmoved discussion tag Karsten75
Line 1: Line 1:
-~~DISCUSSION~~+
 <- [[crpl:crplreference|CRPL reference]] <- [[crpl:crplreference#utility_commands|Utility Commands]] <- [[crpl:crplreference|CRPL reference]] <- [[crpl:crplreference#utility_commands|Utility Commands]]
 =====  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 ===
 <code>SetTechLimit("MOVESPEED" 3)</code> <code>SetTechLimit("MOVESPEED" 3)</code>
 +
 +This example creates a chargeable pickup that increases the fire range tech limit when collected.
 +<code>
 +#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
 +</code>
 +
crpl/docs/settechlimit.1412190170.txt.gz · Last modified: 2015/03/10 21:08 (external edit)