• 🏆 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!

Selectible Spells

Status
Not open for further replies.
Level 17
Joined
Nov 13, 2006
Messages
1,814
maybe this system doesnt work with custom abillities?

i am sure its work, just must setup it well


what about the items? i can also add items and whit the triggers you showed me the first time, it might just work. But i dont know if it will work adding to the elemental slot fire, wind...

what i showed to you was different system, its work with elements but allways you must case about base order id (cant be 2 ability on same unit with same base order id/base ability)

what i showed to u was a easy example but ofc have more advanced too just its more work

nwm, so how can i lvl up the spells with triggers you were talking about?

example
  • Unit - Set level of Chain Lightning for (Triggering unit) to 3
 
Level 3
Joined
Mar 20, 2012
Messages
51
  • Killed Copy
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Voidwalker
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Countdown Timer - Create a timer window for (Expiring timer) with title :
          • Countdown Timer - Start (Expiring timer) as a One-shot timer that will expire in 5.00 seconds
          • Countdown Timer - Destroy (Last created timer window)
        • Else - Actions
Why this doesnt work?
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
  • Killed Copy
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Voidwalker
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Countdown Timer - Create a timer window for (Expiring timer) with title :
          • Countdown Timer - Start (Expiring timer) as a One-shot timer that will expire in 5.00 seconds
          • Countdown Timer - Destroy (Last created timer window)
        • Else - Actions
Why this doesnt work?

lol what you want do? u can use simple wait :p

atm what u made there is:
create timer
start timer
destroy timer (yes u instantly destroyed timer after u created it)

for timers u need another trigger with expired timer event, so when timer is expired then running that trigger, but i think u dont need timer, anyway what u want do ?
 
Level 3
Joined
Mar 20, 2012
Messages
51
i want to create a board for all players so see. That when voidwalker is killed the
structure to learn special ;D spells will spawn and after 60 seconds it disappears.
So that the time will be shown when it will disappear for all players.
(i made the structure spawn in other trigger)
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
i want to create a board for all players so see. That when voidwalker is killed the
structure to learn special ;D spells will spawn and after 60 seconds it disappears.
So that the time will be shown when it will disappear for all players.
(i made the structure spawn in other trigger)

maybe u can use countdown timer window for show how much sec left till respawn, that every player can see or just write out
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
shadowvsz how can i make a random list of tomes spawn every few seconds in a whole map except one spot in my map (where heroes are chosen), you saw my map.

what u mean making random list of times? spawn random spell book / scroll for abilities?

anyway u can create something like this

at map init store the items to item type array
  • Untitled Trigger 003
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Item_Type[0] = Potion of Greater Healing
      • Set Item_Type[1] = Potion of Greater Mana
      • Set Item_Type[2] = Potion of Invulnerability
      • Set Item_Type[3] = Potion of Omniscience
      • Set Item_Type[4] = Potion of Restoration
      • Set Item_Type[5] = Replenishment Potion
then do this

  • Untitled Trigger 002
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set TempPoint = (Random point in (Playable map area))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Village <gen> contains TempPoint) Equal to True
        • Then - Actions
          • Trigger - Run (This trigger) (ignoring conditions)
        • Else - Actions
          • Item - Create Item_Type[(Random integer number between 0 and 5)] at TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
basically this check if the random point is in village region (u create in WE example a hero selectioon region), if point isn in region then create item a random item, else this trigger running again till ur random point is outside from region (in my case village but in ur case the hero selection region)

(TempPoint point variable and u must store random point to variable because at last line we remove the point leak with custom script)
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Now, do you know any systems or smth, that when you kill a first hero it will say firsblood kill, then double and so on, like in dota.

Do you know how to search in the Spells section?

http://www.hiveworkshop.com/forums/...-0-0-a-203324/?prev=search=streak&d=list&r=20

http://www.hiveworkshop.com/forums/...-1-new-153220/?prev=search=double&d=list&r=20

http://www.hiveworkshop.com/forums/...-1-1-a-186817/?prev=search=double&d=list&r=20

I'm sure that if you use the search button you'll be abled to find more...
 
Level 3
Joined
Mar 20, 2012
Messages
51

Attachments

  • mappppp - Copy - Copy.w3x
    376 KB · Views: 42
Last edited:
Level 14
Joined
Apr 20, 2009
Messages
1,543
Which system did you use?
Ow and please don't double post, edit your previous post instead.

Also: Are you sure that File -> Preferences -> Automatically create unknown variables while pasting trigger data is checked?

EDIT: Check the requirements. You need a few other systems in order to use this one.
JASS:
/*******************************************************************
*   Requirements:
*   ¯¯¯¯¯¯¯¯¯¯¯¯¯
*       1- DamageEvent              - Nestharus
*       2- UnitIndexer              - Nestharus
*       3- Table                    - Bribe
*       4- TimerUtils               - Vexorian
*       5- SoundTools               - Magtheridon96
*       6- RegisterPlayerUnitEvent  - Magtheridon96
*       7- CombatDataStorage        - Magtheridon96 (Optional)
*******************************************************************/

EDIT2: by the way it's okay to post after someone elses post as long as you're not posting after your own.

EDIT3:
Here are the systems:
http://www.hiveworkshop.com/forums/jass-resources-412/snippet-damageevent-186829/
http://www.hiveworkshop.com/forums/jass-resources-412/system-unit-indexer-172090/
http://www.hiveworkshop.com/forums/jass-resources-412/snippet-new-table-188084/
[System] Vexorian's TimerUtils
http://www.hiveworkshop.com/forums/jass-resources-412/system-soundtools-207308/
http://www.hiveworkshop.com/forums/jass-resources-412/snippet-registerplayerunitevent-203338/
http://www.hiveworkshop.com/forums/jass-resources-412/system-cds-combat-data-storage-196381/

EDIT4: Because the library requires these systems:
JASS:
library ASS requires DamageEvent, UnitIndexer, SoundTools, Table, RegisterPlayerUnitEvent, TimerUtils, optional CombatDataStorage

There is none of those systems in the Advanced Streak System v4.3.0.0 why does it work then?
It doesn't unless you've copyed and pasted the systems that are required for this Advanced Streak System to work.
 
Last edited:
Level 14
Joined
Apr 20, 2009
Messages
1,543
nwm i installed http://www.hiveworkshop.com/forums/...-1-new-153220/?prev=search=double&d=list&r=20 everything works, but when neutral hostile beets a hero it says player 16 killed him. have any ideas on how to fix it?

  • Streak Kill
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Streak_Kills[(Player number of (Owner of (Killing unit)))] = (Streak_Kills[(Player number of (Owner of (Killing unit)))] + 1)
      • Set Streak_Kills[(Player number of (Owner of (Triggering unit)))] = 0
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Killing unit)) Not equal to (!=) Neutral Passive
        • Then - Actions
          • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( pwned + ((Name of (Owner of (Triggering unit))) + 's head!)))
        • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Streak_Kills[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
          • Then - Actions
            • Trigger - Run Streak Sound and String <gen> (ignoring conditions)
          • Else - Actions
        • Set TempPoint = (Random point in Region 000 <gen>)
        • Hero - Instantly revive (Triggering unit) at TempPoint, Show revival graphics
        • Custom script: call RemoveLocation (udg_TempPoint)
Neutral Passive is Player 16, Neutral Hostile is Player 13. You might want to add more in that condition...
 
Last edited:
Level 3
Joined
Mar 20, 2012
Messages
51
doesnt work
  • Streak Kill
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Streak_Kills[(Player number of (Owner of (Killing unit)))] = (Streak_Kills[(Player number of (Owner of (Killing unit)))] + 1)
      • Set Streak_Kills[(Player number of (Owner of (Triggering unit)))] = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Killing unit)) Not equal to Neutral Passive
        • Then - Actions
          • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( pwned + ((Name of (Owner of (Triggering unit))) + 's head!)))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Streak_Kills[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
            • Then - Actions
              • Trigger - Run SysStringSound <gen> (ignoring conditions)
            • Else - Actions
              • Set TempPoint = (Random point in HeroRespawn <gen>)
              • Hero - Instantly revive (Triggering unit) at TempPoint, Show revival graphics
              • Custom script: call RemoveLocation (udg_TempPoint)
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
doesnt work
  • Streak Kill
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Streak_Kills[(Player number of (Owner of (Killing unit)))] = (Streak_Kills[(Player number of (Owner of (Killing unit)))] + 1)
      • Set Streak_Kills[(Player number of (Owner of (Triggering unit)))] = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Killing unit)) Not equal to Neutral Passive
        • Then - Actions
          • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( pwned + ((Name of (Owner of (Triggering unit))) + 's head!)))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Streak_Kills[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
            • Then - Actions
              • Trigger - Run SysStringSound <gen> (ignoring conditions)
            • Else - Actions
              • Set TempPoint = (Random point in HeroRespawn <gen>)
              • Hero - Instantly revive (Triggering unit) at TempPoint, Show revival graphics
              • Custom script: call RemoveLocation (udg_TempPoint)

Look again at your trigger, it's not the same as mine... Look closely.

Hint: If then else
 
Last edited:
Level 14
Joined
Apr 20, 2009
Messages
1,543
  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
i saw this (Multiple FunctionsIf) but i dont know to do create it, there is no such thing :vw_death:

Yeah sorry, that is my JassNewGenPack. It shows different names for the same actions. But the reason why it didn't work is because:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Streak_Kills[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
    • Then - Actions
      • Trigger - Run SysStringSound <gen> (ignoring conditions)
    • Else - Actions
    • Set TempPoint = (Random point in HeroRespawn <gen>)
    • Hero - Instantly revive (Triggering unit) at TempPoint, Show revival graphics
    • Custom script: call RemoveLocation (udg_TempPoint)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Streak_Kills[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
    • Then - Actions
      • Trigger - Run SysStringSound <gen> (ignoring conditions)
    • Else - Actions
      • Set TempPoint = (Random point in HeroRespawn <gen>)
      • Hero - Instantly revive (Triggering unit) at TempPoint, Show revival graphics
      • Custom script: call RemoveLocation (udg_TempPoint)
Do you see the difference between these two if's?
Hint: Look at the Else Block!


Now look at my trigger and look at yours:

My trigger:
  • Streak Kill
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Streak_Kills[(Player number of (Owner of (Killing unit)))] = (Streak_Kills[(Player number of (Owner of (Killing unit)))] + 1)
      • Set Streak_Kills[(Player number of (Owner of (Triggering unit)))] = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Killing unit)) Not equal to (!=) Neutral Passive
        • Then - Actions
          • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( pwned + ((Name of (Owner of (Triggering unit))) + 's head!)))
        • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Streak_Kills[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
          • Then - Actions
            • Trigger - Run Streak Sound and String <gen> (ignoring conditions)
          • Else - Actions
        • Set TempPoint = (Random point in Region 000 <gen>)
        • Hero - Instantly revive (Triggering unit) at TempPoint, Show revival graphics
        • Custom script: call RemoveLocation (udg_TempPoint)
Your trigger:
  • Streak Kill
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Streak_Kills[(Player number of (Owner of (Killing unit)))] = (Streak_Kills[(Player number of (Owner of (Killing unit)))] + 1)
      • Set Streak_Kills[(Player number of (Owner of (Triggering unit)))] = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Killing unit)) Not equal to Neutral Passive
        • Then - Actions
          • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( pwned + ((Name of (Owner of (Triggering unit))) + 's head!)))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Streak_Kills[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
            • Then - Actions
              • Trigger - Run SysStringSound <gen> (ignoring conditions)
            • Else - Actions
              • Set TempPoint = (Random point in HeroRespawn <gen>)
              • Hero - Instantly revive (Triggering unit) at TempPoint, Show revival graphics
              • Custom script: call RemoveLocation (udg_TempPoint)
Hint: Drag the actions to the correct place....
 
Level 3
Joined
Mar 20, 2012
Messages
51
  • Streak Kill
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Streak_Kills[(Player number of (Owner of (Killing unit)))] = (Streak_Kills[(Player number of (Owner of (Killing unit)))] + 1)
      • Set Streak_Kills[(Player number of (Owner of (Triggering unit)))] = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Killing unit)) Not equal to Neutral Passive
        • Then - Actions
          • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( pwned + ((Name of (Owner of (Triggering unit))) + 's head!)))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Streak_Kills[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
        • Then - Actions
          • Trigger - Run SysStringSound <gen> (ignoring conditions)
        • Else - Actions
      • Set TempPoint = (Random point in HeroRespawn <gen>)
      • Hero - Instantly revive (Triggering unit) at TempPoint, Show revival graphics
      • Custom script: call RemoveLocation (udg_TempPoint)
Still says player (number) ;/
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Add all other Players above 12 in the condition:

  • Streak Kill
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Streak_Kills[(Player number of (Owner of (Killing unit)))] = (Streak_Kills[(Player number of (Owner of (Killing unit)))] + 1)
      • Set Streak_Kills[(Player number of (Owner of (Triggering unit)))] = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Owner of (Killing unit)) Not equal to (!=) Neutral Hostile
              • (Owner of (Killing unit)) Not equal to (!=) Neutral Victim
              • (Owner of (Killing unit)) Not equal to (!=) Neutral Extra
              • (Owner of (Killing unit)) Not equal to (!=) Neutral Passive
        • Then - Actions
          • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( pwned + ((Name of (Owner of (Triggering unit))) + 's head!)))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Streak_Kills[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
        • Then - Actions
          • Trigger - Run SysStringSound <gen> (ignoring conditions)
        • Else - Actions
      • Set TempPoint = (Random point in HeroRespawn <gen>)
      • Hero - Instantly revive (Triggering unit) at TempPoint, Show revival graphics
      • Custom script: call RemoveLocation (udg_TempPoint)
 
Level 3
Joined
Mar 20, 2012
Messages
51
  • Gold
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
      • ((Killing unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) belongs to an enemy of (Picked player)) Equal to True
        • Then - Actions
          • Player - Add 5 to (Picked player) Current gold
        • Else - Actions
          • Do nothing
Why this doesnt work? i want to make every hero to gain 5 gold after he kills an enemy hero
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
btw, shadowvsz, where can i set hp precentage done by five swords spell?

search this line
JASS:
        set hpdrain = GetWidgetLife(ut) / 100.00 * GetUnitAbilityLevel(u, GetSpellAbilityId())

this is in basically
Unit current hp / 100 * ability level

its mean if target unit current hp is 1000 and ability level is 5 then
each second u get 1000/100*5=50hp

(atm the hp drain/second is same than 1% target current hp*ability level)

u can change the formula as u want example

JASS:
        set hpdrain = GetWidgetLife(ut) / 100.00 * GetUnitAbilityLevel(u, GetSpellAbilityId())* 2

then u get 2x more hp /sec
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
could you show me the triggers? i been wasting time on this about two hours now -_-

Lol you spend two hours to find out how to replace (Picked player) with (Owner of (Killing unit))? xD

Either ways, I'm not here to judge :)

  • Gold
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
      • ((Killing unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
        • Then - Actions
          • Player - Add 5 to (Owner of (Killing unit)) Current gold
        • Else - Actions
Also: Do nothing is useless.
It does nothing and it slows down your trigger by making a function call.
Don't use it.
 
Level 3
Joined
Mar 20, 2012
Messages
51
i have this leaderboard
  • Lead
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Leaderboard - Create a leaderboard for (All players) titled Kills:
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Leaderboard - Add (Picked player) to (Last created leaderboard) with label (Name of (Picked player)) and value 0
      • Leaderboard - Show (Last created leaderboard)
      • Leaderboard - Sort (Last created leaderboard) by Value in Ascending order
  • LeadKills
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True
    • Actions
      • Set Kills[(Player number of (Owner of (Killing unit)))] = (Kills[(Player number of (Owner of (Killing unit)))] + 1)
      • Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to Kills[(Player number of (Owner of (Killing unit)))]
It works fine, but how can i make a player to win when he reaches like 30 kills?
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
  • LeadKills
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True
    • Actions
      • Set Kills[(Player number of (Owner of (Killing unit)))] = (Kills[(Player number of (Owner of (Killing unit)))] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Kills[(Player number of (Owner of (Killing unit)))] equal to 30
        • Then - Actions
          • Game - Victory (Owner of (Killing unit)) (Show dialogs, Show scores)
        • Else - Actions
      • Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to Kills[(Player number of (Owner of (Killing unit)))]

Also, if you are having new issues, please create a new thread about it instead of stacking up this thread.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
True, but it would describe each problem specifically.
This way people who are searching for a solution to the same problem as you have,
can easilly look up threads instead of having to go through one big thread.

It's better for the community.
 
Status
Not open for further replies.
Top