• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Solved] Far sight only in specific region

Level 5
Joined
Sep 20, 2024
Messages
31
Hello! I want far sight spell only to be casted if it is targeted within a specific region. So you can only reveal a specific part of the map such as in a dungeon, and not be able to reveal other parts of the map. I started on the trigger below but I cannot find any condition like this: "(Ability being cast) targeting a point in REGION NAME Equal to False." Any help would be appreciated.

  • Events
    • Unit - A unit Begins casting an ability
  • Conditions
    • (Ability being cast) Equal to Far Sight
  • Actions
    • Wait 0.01 seconds
    • Unit - Order (Triggering unit) to Stop.
EDIT: I solved it just now! Finally found it. Boolean comparison, then pick Region - Region contains point, Region with offset 0 contains target point of ability being cast equal to False. Only downside with my current trigger is that any queued orders with shift button will all be canceled due to stop order.
 
Last edited:
I would advise using 'A unit is issued an order targeting a point' event and check that '(issued order)' is of Far Sight spell and that '(target point of issued order)' is in a given region. If not, pause unit, order it to stop and then unpause it. I would also write some error message to the player so that they understand why it the cast was stopped.

That way the unit will not even start casting the ability, nor start turning to the targeted location, etc.
 
Back
Top