• 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.

Needs help with Blight Triggers

Status
Not open for further replies.

opi

opi

Level 1
Joined
Dec 31, 2008
Messages
4
Im trying to make a trigger that makes it so that a player cannot teleport into an area covered in blight. I tried useing the "terrein type of issued order" condition, but blight is not on the list of terrains (and yes, this teleport is based on an order, not an ability)

Please give any suggestions.
 
Here's your trigger:
  • Cannot Teleport
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Blink
    • Actions
      • Set TempLocA = (Target point of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (TempLocA is blighted) Equal to True
        • Then - Actions
          • Unit - Order (Triggering unit) to Stop
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempLocA)
But right now, let's break it down. The event of the trigger, Unit - A unit Begins casting an ability, is what tells the trigger to turn on. It means that the trigger will take effect before the unit uses mana, activates a cooldown, and creates a projectile (the last one is only for spells that use projectiles, such as stormbolt). The condition contains the ability your using, I chose Blink, because it is a teleport spell. The condition tells the trigger when and when not to run, it will only run if the condition is met. The line, Set TempLocA = (Target point of ability being cast), set's a point variable, TempLocA, to the target point of the ability being cast. The next part is an if/then/else statement. It says that if the condition is met, then do this, else do this. This is probably the most usefull tool in triggering. The condition (TempLocA is blighted) Equal to True is just like the condition at the top of the trigger, exept it only dictates the if/then/else. The line in the then section, Unit - Order (Triggering unit) to Stop, just tells the unit to stop. This will tell the unit to stop casting the abilty before the cooldown is activated or mana is used. Outside the if/then/else statement is the Custom script, wich allows you to acces jass commands inside GUI. If you didn't know, GUI is built upon Jass, it's purpose is to make triggering easier. This Custom script tells the game to remove the memory leak of the location TempLocA. Please refer to Things That Leak for more information. I hope this post was helpfull and Welcome to the Hive
 
Status
Not open for further replies.
Top