Page 1 of 1
how to tell a builder to build a thing
Posted: 31 Aug 2010, 18:57
by daryl
Hola,
i'm creating a mission for fun.
NOw i need to know how a mechlab named "x" can build an unit named "y".
Is this possible???
Re: how to tell a builder to build a thing
Posted: 31 Aug 2010, 19:53
by thedude
After about two weeks

of tinkering this worked for me:
Code: Select all
Spring.GiveOrderToUnit(builderID, -defID, {1060,0,300,0}, {})
builderID: unitID of the builder
-defID: negativ defID of the unit to be build
1060,0,300: position where to build
Re: how to tell a builder to build a thing
Posted: 31 Aug 2010, 20:09
by daryl
thedude wrote:After about two weeks

of tinkering this worked for me:
Code: Select all
Spring.GiveOrderToUnit(builderID, -defID, {1060,0,300,0}, {})
builderID: unitID of the builder
-defID: negativ defID of the unit to be build
1060,0,300: position where to build
ops sorry.. i wrong the subject of the topic.
i mean the lab, not builder.
it's the same code??
Re: how to tell a builder to build a thing
Posted: 31 Aug 2010, 21:02
by Beherith
As far as I know its the same command (but i may be wrong on this one).
Also, if you would like a custom map for your mission, Ill gladly make you one if you sketch me a heightmap and indicate the passability you would like on it.
Re: how to tell a builder to build a thing
Posted: 31 Aug 2010, 22:26
by daryl
Beherith wrote:As far as I know its the same command (but i may be wrong on this one).
Also, if you would like a custom map for your mission, Ill gladly make you one if you sketch me a heightmap and indicate the passability you would like on it.
sorry... can you read this code below?
now the unit "armcv001" receive the order to move.
how i can give the order to build "a" unit/object in x and y pos??
Code: Select all
[4] = {
logic = {
[1] = {
logicType = [[CountdownEndedCondition]],
args = {
countdown = [[start prova]],
},
name = [[Countdown Ended]],
},
[2] = {
logicType = [[GiveOrdersAction]],
args = {
orders = {
[1] = {
orderType = [[MOVE]],
args = {
[1] = 6504,
[2] = 0,
[3] = 7800,
},
},
},
groups = {
[1] = [[armcv001]],
[2] = [[armcv001]],
},
},
name = [[Give Orders]],
},
},
maxOccurences = 1,
enabled = true,
probability = 1,
},
},
what i need to write???
intresting... i need some help for my project ( maps included)... i make two map but i don't want to use them into the mission :) i need a good map...
how i can conctact you??
Re: how to tell a builder to build a thing
Posted: 02 Sep 2010, 16:52
by thedude
daryl wrote:
sorry... can you read this code below?
now the unit "armcv001" receive the order to move.
how i can give the order to build "a" unit/object in x and y pos??
Code: Select all
[4] = {
logic = {
[1] = {
logicType = [[CountdownEndedCondition]],
args = {
countdown = [[start prova]],
},
name = [[Countdown Ended]],
},
[2] = {
logicType = [[GiveOrdersAction]],
args = {
orders = {
[1] = {
orderType = [[MOVE]],
args = {
[1] = 6504,
[2] = 0,
[3] = 7800,
},
},
},
groups = {
[1] = [[armcv001]],
[2] = [[armcv001]],
},
},
name = [[Give Orders]],
},
},
maxOccurences = 1,
enabled = true,
probability = 1,
},
},
what i need to write???
intresting... i need some help for my project ( maps included)... i make two map but i don't want to use them into the mission :) i need a good map...
how i can conctact you??
Sorry dude I don't get what your problem is. If you try to do something with the table (your code) and the build command thats what I would try.
(don't know if thats what u want or if that will help you somehow)
Code: Select all
[4] = {
logic = {
[1] = {
logicType = [[CountdownEndedCondition]],
args = {
countdown = [[start prova]],
},
name = [[Countdown Ended]],
},
[2] = {
logicType = [[GiveOrdersAction]],
args = {
orders = {
[1] = {
orderType = [[MOVE]],
args = {
[1] = 6504,
[2] = 0,
[3] = 7800,
},
},
[2] = {
orderType = [[-defID]],
args = {
[1] = 1060,
[2] = 0,
[3] = 300,
[4] = 0,
},
},
},
groups = {
[1] = [[armcv001]],
[2] = [[armcv001]],
},
},
name = [[Give Orders]],
},
},
maxOccurences = 1,
enabled = true,
probability = 1,
},
},
-defID: negativ defID of the unit to be build