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.
Spring.ChangeBlockingMap(x,z,boolean)
Moderator: Moderators
Re: Spring.ChangeBlockingMap(x,z,boolean)
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)
No? Well, darnit, there should be, lol. Isn't it just a big 2D array?
Re: Spring.ChangeBlockingMap(x,z,boolean)
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.
There's Spring.GetGroundBlocked(x,z), it's not an array but close enough.
Re: Spring.ChangeBlockingMap(x,z,boolean)
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.
It doesn't matter much, but still, would be nice.
Re: Spring.ChangeBlockingMap(x,z,boolean)
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
We could finally support long, thin Units properly, via script manipulation

Re: Spring.ChangeBlockingMap(x,z,boolean)
Mobile units aren't added to the blocking map.
Re: Spring.ChangeBlockingMap(x,z,boolean)
They act as if they're on it sometimes but aren't really added?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.
