Page 1 of 1

Spring.ChangeBlockingMap(x,z,boolean)

Posted: 22 Jan 2008, 09:25
by Argh
Simply put, I'd like a LUA callout that would allow me to set a given heightmap location x,z as blocking / non-blocking.

Would be the fastest/cheapest way to implement my procedural map stuff in a way that allowed for maximum freedom of movement- I could just use COB to report the position of the Pieces, then set that square to Blocking.

Re: Spring.ChangeBlockingMap(x,z,boolean)

Posted: 22 Jan 2008, 09:35
by lurker
Is there even a way for lua to read the blocking map at present? Because I don't see one...

Re: Spring.ChangeBlockingMap(x,z,boolean)

Posted: 22 Jan 2008, 09:39
by Argh
No? Well, darnit, there should be, lol. Isn't it just a big 2D array?

Re: Spring.ChangeBlockingMap(x,z,boolean)

Posted: 22 Jan 2008, 10:17
by KDR_11k
AFAIK you can't set true because a blocked square has to belong to something.

There's Spring.GetGroundBlocked(x,z), it's not an array but close enough.

Re: Spring.ChangeBlockingMap(x,z,boolean)

Posted: 22 Jan 2008, 10:27
by lurker
Ah. I searched for 'blocking'. But is it fast enough to copy the entire thing in a frame or two without lagging?

It doesn't matter much, but still, would be nice.

Re: Spring.ChangeBlockingMap(x,z,boolean)

Posted: 22 Jan 2008, 12:11
by Argh
Y'know the other thing we could do, if we could manipulate the BlockingMap directly?

We could finally support long, thin Units properly, via script manipulation 8)

Re: Spring.ChangeBlockingMap(x,z,boolean)

Posted: 22 Jan 2008, 13:27
by KDR_11k
Mobile units aren't added to the blocking map.

Re: Spring.ChangeBlockingMap(x,z,boolean)

Posted: 22 Jan 2008, 13:54
by lurker
Kloot wrote:Units don't push each other out of the way when their collision spheres intersect, but when the areas they occupy on the blocking map overlap. See CheckCollision() in CGroundMoveType.
They act as if they're on it sometimes but aren't really added? :?