Spring.ChangeBlockingMap(x,z,boolean)

Spring.ChangeBlockingMap(x,z,boolean)

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Spring.ChangeBlockingMap(x,z,boolean)

Post 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.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

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

Post by lurker »

Is there even a way for lua to read the blocking map at present? Because I don't see one...
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

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

Post by Argh »

No? Well, darnit, there should be, lol. Isn't it just a big 2D array?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

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

Post 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.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

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

Post 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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

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

Post 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)
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

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

Post by KDR_11k »

Mobile units aren't added to the blocking map.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

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

Post 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? :?
Post Reply

Return to “Feature Requests”