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???
how to tell a builder to build a thing
Moderator: Moderators
Re: how to tell a builder to build a thing
After about two weeks
of tinkering this worked for me:
builderID: unitID of the builder
-defID: negativ defID of the unit to be build
1060,0,300: position where to build

Code: Select all
Spring.GiveOrderToUnit(builderID, -defID, {1060,0,300,0}, {})
-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
ops sorry.. i wrong the subject of the topic.thedude wrote:After about two weeksof tinkering this worked for me:
builderID: unitID of the builderCode: Select all
Spring.GiveOrderToUnit(builderID, -defID, {1060,0,300,0}, {})
-defID: negativ defID of the unit to be build
1060,0,300: position where to build
i mean the lab, not builder.
it's the same code??
Re: how to tell a builder to build a thing
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.
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
sorry... can you read this code below?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.
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,
},
},
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
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.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??
what i need to write???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, }, },
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??
(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,
},
},