• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[JASS] Event: detect "can't build there"

Status
Not open for further replies.
Level 10
Joined
Mar 31, 2009
Messages
732
Is there an event I've overlooked that will detect when a player attempts to place a building somewhere but can't because something is in the way or they don't have vision?

Not just at the time they place it, but also when the worker arrives at the spot but reports he can't carry out the order.

Closest I've been able to find is the "wait for sound to play" trigger action... perhaps I could have a trigger run every second with that action, and somehow detect whether that action got skipped or not?
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
Even if you could use this internal sound, that wouldn't work if the player has turned of wc3 sound.

At the time they place it, you can handle point orders events.
But for "when the worker arrives at the spot but reports he can't carry out the order", you could only check periodically if the worker current order is not 0 before the construct start event fire. (i don't know what happens if the worker is paused/stunned).
Ofc, you will have to avoid this check if the worker receives an other order (he will receive the order 851973 if it's paused/stunned).
Or maybe just check for ability events, (the build one).
 
Status
Not open for further replies.
Top