Builder scripts: Difference between revisions

From Spring
Jump to navigationJump to search
builder
 
m added related unitdef tag (need linkage)
Line 1: Line 1:
<big>this script is requested for enabling the construction of unit by a vehicule</big>
--<big>'''NANO builder'''</big>--
 
<big>this script is requested for enabling the construction of unit by a vehicule,repair, capture,reclaim,recycle,teraform ground</big>


this scripts are not compatible with transportation script (not sure who is winner when both)
this scripts are not compatible with transportation script (not sure who is winner when both)


<sub>note : construction by factory request a diferent kind of script</sub>
<sub>note : construction by factory request a diferent kind of script</sub>


== basic script: ==
== basic script: ==
function script.StartBuilding(y0,x0)
<code>
:function script.StartBuilding(y0,x0)
:SetUnitValue(19,1)-- ask evacuation of area
:SetUnitValue(5,1)--start emiting nano
:end


SetUnitValue(19,1)-- ask evacuation of area
:function script.StopBuilding()
:SetUnitValue(5,0)--stop emiting nano
:SetUnitValue(19,0)--stop asking evacuation of area
:end
</code>


SetUnitValue(5,1)--start emiting nano
=== advanced script: ===
*using turet for nano emiter and conditionnal start


end


function script.StopBuilding()


SetUnitValue(5,0)--stop emiting nano


SetUnitValue(19,0)--stop asking evacuation of area


end


=== advanced script: ===
 
 
 
UnitDef tags involved in builder activity:
 
:Builder=1,--the unit build some static or mobile units
:BuildDistance=199, --the unit build or repair or reclaim or restore or capture or resurect at this distance
:WorkerTime=555, --amount per second can be spent in build metal or energy max
:Reclaimable=1,--the unit can be eated by a unit with canreclamate=1
:canreclamate=1, --the unit can eat another unit not having reclamable=0
:ShowNanoSpray = 1,--to verify --if 0 no spray when build
:CanBeAssisted=0, --when the unit start a task a unit that canassist=1 can help
:CanRepair=1,--can repair unit damaged
:CanRestore=1,--can reset the ground at the origin map design
:canReclaim=1,--bad synthax?
:CanAssist=1,--can help other having not canbeassisted =0
:Capturable=0, --can be stoled by ennemy with cancapture=1
:CanCapture=1,--can stole ennemy unit not having canbecaptured=0
:canResurrect=1,--can resurect unit corspes at a price(unknow)
:RepairSpeed=777,--max spend in repair
:ReclaimSpeed=1600,--max gain in reclaim (corpses will not dispear before complet drain)maybe memory of drain
:Capturespeed=8000,--maybe the amount of needed (per second) for equal the damge of the unit before being stoled
:terraformSpeed=600,--amount spend for restore ground at map staart on a zone (unknow calculation)
 
:buildoptions = {
},

Revision as of 15:29, 13 November 2012

--NANO builder--

this script is requested for enabling the construction of unit by a vehicule,repair, capture,reclaim,recycle,teraform ground

this scripts are not compatible with transportation script (not sure who is winner when both)

note : construction by factory request a diferent kind of script


basic script:

function script.StartBuilding(y0,x0)
SetUnitValue(19,1)-- ask evacuation of area
SetUnitValue(5,1)--start emiting nano
end
function script.StopBuilding()
SetUnitValue(5,0)--stop emiting nano
SetUnitValue(19,0)--stop asking evacuation of area
end

advanced script:

  • using turet for nano emiter and conditionnal start





UnitDef tags involved in builder activity:

Builder=1,--the unit build some static or mobile units
BuildDistance=199, --the unit build or repair or reclaim or restore or capture or resurect at this distance
WorkerTime=555, --amount per second can be spent in build metal or energy max
Reclaimable=1,--the unit can be eated by a unit with canreclamate=1
canreclamate=1, --the unit can eat another unit not having reclamable=0
ShowNanoSpray = 1,--to verify --if 0 no spray when build
CanBeAssisted=0, --when the unit start a task a unit that canassist=1 can help
CanRepair=1,--can repair unit damaged
CanRestore=1,--can reset the ground at the origin map design
canReclaim=1,--bad synthax?
CanAssist=1,--can help other having not canbeassisted =0
Capturable=0, --can be stoled by ennemy with cancapture=1
CanCapture=1,--can stole ennemy unit not having canbecaptured=0
canResurrect=1,--can resurect unit corspes at a price(unknow)
RepairSpeed=777,--max spend in repair
ReclaimSpeed=1600,--max gain in reclaim (corpses will not dispear before complet drain)maybe memory of drain
Capturespeed=8000,--maybe the amount of needed (per second) for equal the damge of the unit before being stoled
terraformSpeed=600,--amount spend for restore ground at map staart on a zone (unknow calculation)
buildoptions = {

},