MoveBlocked Call-in

MoveBlocked Call-in

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

MoveBlocked Call-in

Post by SpliFF »

Erm, nevermind. I think this is what the UnitMoveFailed() callin does.

I'm working on an AI that uses the widget interface and I noticed that if I give an invalid move/patrol order (unit can't reach it) I get the "unitname: can't reach destination" msg but there does not appear to be an associated callback to tell the AI/widget the move failed. I checked the source but all I see are logOutputs.

I'd like to see a call-in that is triggered in the event a move fails to complete.

function widget:MoveBlocked(unitID, unitDef, cmd)

It would also be nice if said call-in could disable the "can't reach destination" message by returning false.

The primary purpose of this call-in would be:
a.) An alternative to checking blocking when issuing orders
b.) Handling bad moves initiated by the player or another widget (ie, could call transports to assist a river crossing or detect congestion and spread out blocking units or pick a new move goal etc...)
Post Reply

Return to “Feature Requests”