Page 1 of 1
help about a gate
Posted: 23 Oct 2019, 18:46
by daryl
hello all,
i have a small problem about this gate : in unitdef yard map="oo oo cc cc cc cc cc cc oo oo" so you can see in the picture tha passing is open but units can't pass trought the gate.
Where i wrong?
Re: help about a gate
Posted: 23 Oct 2019, 19:56
by PicassoCT
Did you set the unit yardstance, when turning it on and off?
Re: help about a gate
Posted: 23 Oct 2019, 21:56
by daryl
in .cob script you mean?
i have this code:
Code: Select all
OpenYard()
{
set YARD_OPEN to 1;
while( !get YARD_OPEN )
{
sleep 1500;
set YARD_OPEN to 1;
}
}
CloseYard()
{
set YARD_OPEN to 0;
while( get YARD_OPEN )
{
sleep 1500;
set YARD_OPEN to 0;
}
}
Re: help about a gate
Posted: 26 Oct 2019, 10:31
by DmitryProfessional
What's the size of a unit?
If the yard is "oo oo cc cc cc cc cc cc oo oo", it's either 1x20 or, most likely:
oooo
cccc
cccc
cccc
oooo
Which orientation doesn't make much sense. If it's a North gate, it should open/close to north, correct?
Use [[ ]] for things like yard instead of "", e.g.
[[o c c c o
o c c c o
o c c c o
o c c c o
o c c c o]]
Re: help about a gate
Posted: 28 Oct 2019, 11:33
by Forboding Angel
If the yard is "oo oo cc cc cc cc cc cc oo oo", it's either 1x20
No. Top to bottom left to right punctuated by spaces.
"oo oo cc cc cc cc cc cc oo oo", is:
2 block, 2 block, 2 open, 2 open, 2 open, 2 open, 2 open, 2 open, 2 block, 2 block
Re: help about a gate
Posted: 28 Oct 2019, 12:30
by PicassoCT
creed wrote:With yards wide open under the sunlight
Welcome to this place I'll show you everything
With yards wide open now everything has changed
I'll show you love, I'll show you everything
With yards wide open
Wide open
Re: help about a gate
Posted: 28 Oct 2019, 21:04
by daryl
Forboding Angel wrote: ↑28 Oct 2019, 11:33
If the yard is "oo oo cc cc cc cc cc cc oo oo", it's either 1x20
No. Top to bottom left to right punctuated by spaces.
"oo oo cc cc cc cc cc cc oo oo", is:
2 block, 2 block, 2 open, 2 open, 2 open, 2 open, 2 open, 2 open, 2 block, 2 block
and yardmap of gate is correct:
footprintx = 2,
footprintz = 10,
YardMap= "oo oo cc cc cc cc cc cc oo oo",
Re: help about a gate
Posted: 29 Oct 2019, 02:09
by Forboding Angel
That's what I just said. Your example was incorrect, depicting a 4xX footprint, instead of the intended 2xX footprint.
Re: help about a gate
Posted: 29 Oct 2019, 17:14
by FLOZi
Is the intended orientation north/south opening or east/west?
Re: help about a gate
Posted: 29 Oct 2019, 20:18
by daryl
FLOZi wrote: ↑29 Oct 2019, 17:14
Is the intended orientation north/south opening or east/west?
east/west
Re: help about a gate
Posted: 29 Oct 2019, 21:32
by DmitryProfessional
How do u call Open/CloseYard? Should be from Activate/Deactivate callin.
Re: help about a gate
Posted: 30 Oct 2019, 03:48
by Forboding Angel
So, from what I see in that screenshot, it appears that the yardmap is correct. The gateway is non-blocking it looks like. Perhaps without new orders the pathfinder isn't realizing that it can go through (Clutching at straws)?
Re: help about a gate
Posted: 30 Oct 2019, 16:52
by FLOZi
Derp, I totally missed the screenshot. Yeah yardmap is fine, and is open/closing ok too.
If I were you I'd use a lua unit script instead of cob and call Spring.SetUnitBlocking... MCL used to have gates and they worked that way;
https://github.com/SpringMCLegacy/Sprin ... s/Gate.lua