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

Event - Unit learns skill

Status
Not open for further replies.

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
What event can substitute this ? I have one skill that I got from Hiveworkshop > Spells that uses this Event, so I have to make it like a hero ability, then he learns, etc. the spell works. But I want all abilities of my map as standard, so this event leaks the spell, cuz standard abitilies can't be learned. Any help ?
 
Level 7
Joined
Aug 11, 2010
Messages
270
If I'm not misunderstanding; all you'd need to do is make a trigger like this;

Events
Unit -A unit enters (Playable Map Area)
Conditions
(Level of Dummy Ability for (Triggering Unit)) equal to 1
Actions
*Insert your spell's actions here*

There's no doubt better ways to do this; but if i'm not misunderstanding your problem -- this sounds like it'd fix it.
 
Level 23
Joined
Oct 20, 2012
Messages
3,075
Could you explain what you want exactly? Perhaps explain how that spell you download works? The event that will substitute that will greatly depend on what effect you want to achieve.

EDIT: what nolyp said OR use a periodic that will check if any unit in the map has that spell.

E.G
Event:
every 1 second game time
Condition:
Actions:
set tempgroup=units in map
pick every unit in tempgroup
--if
----unit is not in learned group
----if level of yourability for unit is greater than 0
--then
----do what you want
----add picked unit to learned group
--else
custom script : destroygroup udg_tempgroup


EDIT2 : WOW crap example.
 

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
Could you explain what you want exactly? Perhaps explain how that spell you download works? The event that will substitute that will greatly depend on what effect you want to achieve.

I'll put the triggers, how to put the trigger between [triggers]? I have to write everything ?

EDIT Wait, I got it
  • Borrowed Time Initialization
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Borrowed Time
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Borrowed Time for (Triggering unit)) Equal to 1
        • Then - Actions
          • Set Borrowed_Time_Mui_Integer = (Borrowed_Time_Mui_Integer + 1)
          • Set Borrowed_Time_Mui_Turnoff = (Borrowed_Time_Mui_Turnoff + 1)
          • Set Borrowed_Time_Unit[Borrowed_Time_Mui_Integer] = (Triggering unit)
          • Trigger - Add to Borrowed Time Checking <gen> the event (Unit - Borrowed_Time_Unit[Borrowed_Time_Mui_Integer] Takes damage)
          • Trigger - Add to Borrowed Time Damage <gen> the event (Unit - Borrowed_Time_Unit[Borrowed_Time_Mui_Integer] Takes damage)
        • Else - Actions
See my problem, it says "unit learns a skill", but I wont make it as a hero ability, I want to make it as standard, so he doesn't need to learn. Then the event and the trigger leaks, any help ? Did u understand
 
Level 23
Joined
Oct 20, 2012
Messages
3,075
Create two triggers, one that will activate when the map starts and one that will activate every time a unit enters the map.

EDIT:
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set tempgroup = (Units in (Playable map area) matching ((Level of Borrowed Time for (Matching unit)) Greater than 0))
      • Unit Group - Pick every unit in tempgroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Borrowed Time for (Triggering unit)) Equal to 1
            • Then - Actions
              • Set Borrowed_Time_Mui_Integer = (Borrowed_Time_Mui_Integer + 1)
              • Set Borrowed_Time_Mui_Turnoff = (Borrowed_Time_Mui_Turnoff + 1)
              • Set Borrowed_Time_Unit[Borrowed_Time_Mui_Integer] = (Triggering unit)
              • Trigger - Add to Borrowed Time Checking <gen> the event (Unit - Borrowed_Time_Unit[Borrowed_Time_Mui_Integer] Takes damage)
              • Trigger - Add to Borrowed Time Damage <gen> the event (Unit - Borrowed_Time_Unit[Borrowed_Time_Mui_Integer] Takes damage)
            • Else - Actions
  • BT Trigger 2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Level of Borrowed Time for (Triggering unit)) Greater than 0
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Borrowed Time for (Triggering unit)) Equal to 1
        • Then - Actions
          • Set Borrowed_Time_Mui_Integer = (Borrowed_Time_Mui_Integer + 1)
          • Set Borrowed_Time_Mui_Turnoff = (Borrowed_Time_Mui_Turnoff + 1)
          • Set Borrowed_Time_Unit[Borrowed_Time_Mui_Integer] = (Triggering unit)
          • Trigger - Add to Borrowed Time Checking <gen> the event (Unit - Borrowed_Time_Unit[Borrowed_Time_Mui_Integer] Takes damage)
          • Trigger - Add to Borrowed Time Damage <gen> the event (Unit - Borrowed_Time_Unit[Borrowed_Time_Mui_Integer] Takes damage)
        • Else - Actions
 

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
Create two triggers, one that will activate when the map starts and one that will activate every time a unit enters the map.

Could you see the problem ? If you can see well, this trigger is the initialization, so it has the most important components and variables of the skill, but as it has "Learns a Skill" and I want as standard, all other trigger will work 50%, cuz they need the triggering unit (that is in this trigger). If no one will learn the ability (because it will be standard), this trigger leaks, so I want to substitute this Event to make it work as Standard ability.
 
Status
Not open for further replies.
Top