help about a gate
Moderator: Moderators
help about a gate
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?
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?
- Attachments
-
- gate.jpg
- (51.35 KiB) Not downloaded yet
Re: help about a gate
Did you set the unit yardstance, when turning it on and off?
Re: help about a gate
in .cob script you mean?
i have this code:
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;
}
}
-
- Posts: 20
- Joined: 03 Jun 2019, 21:06
Re: help about a gate
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]]
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]]
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: help about a gate
No. Top to bottom left to right punctuated by spaces.If the yard is "oo oo cc cc cc cc cc cc oo oo", it's either 1x20
"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
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
and yardmap of gate is correct:Forboding Angel wrote: ↑28 Oct 2019, 11:33No. Top to bottom left to right punctuated by spaces.If the yard is "oo oo cc cc cc cc cc cc oo oo", it's either 1x20
"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
footprintx = 2,
footprintz = 10,
YardMap= "oo oo cc cc cc cc cc cc oo oo",
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: help about a gate
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
Is the intended orientation north/south opening or east/west?
-
- Posts: 20
- Joined: 03 Jun 2019, 21:06
Re: help about a gate
How do u call Open/CloseYard? Should be from Activate/Deactivate callin.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: help about a gate
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
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
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