• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Ensnare Ability for Survival GAME

Status
Not open for further replies.
Level 7
Joined
Jul 21, 2015
Messages
103
Hi guys,
so I am not sure if this is the right place to put this comment because I am new to Hive so hopefully this is the right place.

I am working on an animal survival map where the creatures must survive the hunter. I have been trying to give the hunter (who is played by a Player 11 computer hero: Rexxar) to capture the animals near him with an orc ensnare ability. For some reason it doesn't work and it is very frustrating. I've checked everything including the "upgrade properties" to make sure it was researched for player 11 and the trigger seems sound to me but I am missing something. Here is the trigger:

Event:
A unit comes within 1000.00 of Rexxar 0044 <gen>
Conditions:
None
Actions:
Unit- Order Rexxar 0044 <gen> to Orc Raider - Ensnare (Triggering unit)


Also I checked the same trigger on a Player 1 controlled Rexxar and it worked just fine and I made sure that the Rexxar 0044 had no interfering triggers (or movements) attatched to him. Thanks in advance for the help!
 
Level 21
Joined
Nov 4, 2013
Messages
2,017
Yeah, this is the right forum. However this:

Also I checked the same trigger on a Player 1 controlled Rexxar and it worked just fine and I made sure that the Rexxar 0044 had no interfering triggers (or movements) attatched to him. Thanks in advance for the help!

Not really sure of what you're saying because such a simple trigger should work really fine unless some other movement commands are given. It worked for player 1 (yourself) probably because there aren't interfering triggers. If player 11 is supposed to be an AI and you gave it any periodic order to move somewhere, this trigger of ensnaring is cancelled. If that's so, I'd suggest using a Boolean. You set it to true when a unit comes within range, you add a condition to any trigger movement where this Boolean = False then you create a whole new trigger where

Events
Rexxar Start the effect of an ability
Conditions
(Ability being cast) Equal to Ensnare
Actions
Set Boolean = False

So that when the hunter uses ensnare, all the movement triggers will be reactivated.
 
Level 7
Joined
Jul 21, 2015
Messages
103
Hey Shadow Fury thanks for the help using the Boolean condition made it work 100%. Finally! I seriously spent so much time trying to get it to work but it works like this so thank goodness.
Event:
A unit comes within 1000.00 of Rexxar 0044 <gen>
Conditions:
None
Actions:

Wait until (((Region centered at (Position of Rexxar 0044 <gen> with size (1000.00, 1000.00)) contains (Triggering unit)) Equal to True, checking every 1.00 seconds

Unit- Order Rexxar 0044 <gen> to Orc Raider - Ensnare (Triggering unit)
 
Level 7
Joined
Jul 21, 2015
Messages
103
Thanks Wietlol and Shadow Fury it works great now!
SOLVED
lol I finally realized what leaking is in a map and looked back at this post thanks for the advice Wietlol now that I actually understand what you were saying :D
 
Last edited:
Status
Not open for further replies.
Top