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

Spot / Listen Check Skill

Status
Not open for further replies.
Hi! :D
My Map is in a D&D mechanism and need a check trigger as the following:

Trigger:
A unit enters (any unit owned by ally of player 1 which is a hero) range ( intelligence x 25)

Conditions:
The unit was not checked before - each player need to have only one check and forever the unit cant be checked again by that player - even if the player get his hero near the range again. (can be done with table?)

Actions:
make the unit visable for the owner of the hero.

I hope you can help me.
Thanks for reading. Lior.
 
  • Trig
  • Events
    • Unit - A unit enters (Playable Map Area)
  • Conditions
    • ((Triggering unit) is a Hero) Equal to True //Boolean Comparison
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units in (Playable Map Area)) and do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • ((Picked unit) is in AlreadyChecked) Equal to False //Boolean Comparison
            • ((Picked unit) belongs to an ally of (Player 1 (Red)) Equal to True //Boolean Comparison
          • Then - Actions
            • Unit Group - Add (Picked unit) to AlreadyChecked
            • Trigger - Add to triug <gen> the event ((Triggering unit) comes within (Real(Intelligence of (Triggering unit))*25.00) range of (Picked unit)
          • Else - Actions
  • triug
  • Events
  • Conditions
  • Actions
    • Custom script: if (not (GetLocalPlayer == GetOwningPlayer(GetTriggerUnit()))) then
    • Custom script: call ShowUnit (GetTriggerUnit(), false)
    • Custom script: endif
Not sure if I got it right though.
 
This is not the answer I expected. Just because I'm not sure if this is what you want, it shouldn't make you ignore it. Test it and tell me if it works the way you want. If not, describe your request better.

I am sorry for ignoring the resource but I can't understand it.
custom script and the such.
I am about to test it and describe it better.
Thanks.

The description is hard to understand, I hope I can tell it right:
in my game you get one hero but he can be changed any second.
so the enemy has wind walk , and you have to "spot" them automatically with your intelligence. so, if they are invisible you will still "track" them if you are in the right range (900 range)
the wind walk in my map has 10 seconds of activation, so the player need to have 10 seconds and only then get the check chance again.
the intelligence need to be higher than the enemy or random ed with +int.

I know it is very hard to understand, this is how close I am:
  • HT
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Wind Walk (Hero)
      • ((Triggering unit) belongs to an enemy of Player 1 (Red)) Equal to True
    • Actions
      • Set Temp_Group = (Units within 1500.00 of (Position of (Triggering unit)) matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True)))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Triggering unit) is A Hero) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Intelligence of (Picked unit) (Include bonuses)) + 0) Greater than (Intelligence of (Triggering unit) (Include bonuses))
                • Then - Actions
                  • Unit - Grant shared vision of (Triggering unit) to (Owner of (Picked unit))
                  • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Hashtable - Save Handle Of(Triggering unit) as 1 of 2 in HT
                  • Hashtable - Save Handle Of(Triggering unit) as 1 of 2 in HT
                  • Hashtable - Save 10.00 as 1 of 1 in HT
                  • Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Picked unit))) + : "I see him")
                • Else - Actions
                  • Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Picked unit))) + : "can't see his trails")
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Intelligence of (Picked unit) (Include bonuses)) + (Integer((Random percentage)))) Greater than (Integer((Random percentage)))
                • Then - Actions
                  • Unit - Grant shared vision of (Triggering unit) to Player 1 (Red)
                  • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Hashtable - Save 10.00 as 1 of 1 in HT
                  • Hashtable - Save Handle Of(Triggering unit) as 1 of 2 in HT
                  • Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Picked unit))) + : "I see him")
                • Else - Actions
                  • Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Picked unit))) + : "can't see his trails")
      • Custom script: call DestroyGroup (udg_Temp_Group)
  • Hash
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Load 1 of 1 in HT) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Load 1 of 1 from HT) Greater than 0.00
            • Then - Actions
              • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Grant shared vision of (Load 1 of 2 in HT) to Player 1 (Red)
              • Hashtable - Save ((Load 1 of 1 from HT) - 1.00) as 1 of 1 in HT
            • Else - Actions
              • Unit - Deny shared vision of (Load 1 of 2 in HT) to Player 1 (Red)
 
Status
Not open for further replies.
Top