• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Pick a Hero , use ability

Status
Not open for further replies.
Level 2
Joined
Jul 9, 2015
Messages
20
hi , Greeting
i have 2 problems

1-how to use ability from a unit on a unit (or point)?
or how to use ability from a unit on ground (not target)?

2-how to pick a hero for player?
(example : Map Dota)



:fp: thanks :D :)
 
Level 2
Joined
Jul 9, 2015
Messages
20
1 a) Unit - Issue order targeting a unit
1 b) Unit - Issue order targeting a point

2) Check the spell database. It has some hero pick systems

Hi
thank you
but...

1- this is for move or attack or ...
i not found my spell in list

2-Please Explain more

Is there anyone ?! ?! ?! !?

only first problem
1-how to use ability from a unit on a unit (or point)?
or how to use ability from a unit on ground (not target)?
 
Last edited by a moderator:
Level 2
Joined
Jul 9, 2015
Messages
20
You are allowed to bump a thread after 48 hours of inactivity.

I already posted the actions that you need to use, what is the problem?

2) Go to spells and search for hero selection system

sorry , i don't know ...
1) i want that
unit blink on random region of region 1
or use other spell on a unit or point
2) Please Explain more .......................
What part of hero select؟
 
Level 2
Joined
Jul 9, 2015
Messages
20
thank :D :)

1) how to use a skill (example : blink ) on a unit or point


2)I making ability "2 Gondar"
What is the problem
Trigger 1
  • yek orc
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to 1 orc Damage
    • Actions
      • Set Yek_orc = (Learning Hero)
      • Trigger - Turn on yek orc Copy 2 <gen>
      • Trigger - Turn off (This trigger)
Trigget 2
  • yek orc Copy 2
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Add 11 orc damage to Yek_orc
      • Unit - Set level of 11 orc damage for Yek_orc to (Level of 1 orc Damage for Yek_orc)
      • Trigger - Turn on yek orc Copy <gen>
      • Trigger - Turn off (This trigger)
Trigger 3
  • yek orc Copy
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacking unit) Not equal to Yek_orc
    • Actions
      • Unit - Remove 11 orc damage from Yek_orc
      • Set yek_orc_stop = 0
      • Trigger - Turn on yek orc Copy 2 <gen>
      • Trigger - Turn off (This trigger)
Notes:"11 orc damage" is "Critical Strike" with "Change = 100%"

3)Please Fix :
  • Divin
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Triggering unit) has an item of type Damage 25) Equal to True
      • ((Triggering unit) has an item of type Damage 25) Equal to True
      • ((Triggering unit) has an item of type Damage 25) Equal to True
    • Actions
      • Item - Remove (Item carried by (Hero manipulating item) of type Damage 25)
      • Item - Remove (Item carried by (Hero manipulating item) of type Damage 25)
      • Item - Remove (Item carried by (Hero manipulating item) of type Damage 25)
      • Hero - Create Divin and give it to (Hero manipulating item)
      • Special Effect - Create a special effect attached to the origin of (Hero manipulating item) using Abilities\Spells\Items\ResourceItems\ResourceEffectTarget.mdl
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
Unit acquires an item

set i = 0
Loop integer A from 1 to 6
--if item type carried by triggering unit in slot Integer A == some item type
--then set i = i + 1
--endif
if i >= 3 then
--remove item of type x
--remove item of type x
--remove item of type x
--create item of type y
endif
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
How to use blink on a unit...what about... not?
Blink cannot be cast on an object.
Your ability will probably have the same problem.
What you have to do is cast it on the location of that unit instead.
Blinks name is "Night Elf Warden - Blink".

about your second problem...
when you learn the ability, you have 0 to 10 seconds until you gain a damage bonus.
when that happens, you will lose the bonus when any unit attacks someone except if the orc attacks someone.

what you have to do is make this:
  • Learn Damage Bonus
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to 1 orc Damage
    • Actions
      • Set TempUnit[0] = (Triggering unit)
      • Trigger - Run Give Damage Bonus <gen> (ignoring conditions)
  • Give Damage Bonus
    • Events
    • Conditions
    • Actions
      • Custom script: local unit array udg_localUnit
      • Set localUnit[0] = TempUnit[0]
      • -------- - --------
      • -------- - --------
      • -------- - --------
      • Custom script: call WaitGameTime(10)
      • Unit - Add 11 orc damage to localUnit[0]
      • Unit - Set level of 11 orc damage for localUnit[0] to (Level of 1 orc Damage for localUnit[0])
      • -------- - --------
      • -------- - --------
      • -------- - --------
      • Set localUnit[0] = No unit
  • Remove Damage Bonus
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Chaos for (Triggering unit)) Greater than 0
    • Actions
      • Set TempUnit[0] = (Triggering unit)
      • Unit - Remove 11 orc damage from TempUnit[0]
      • Trigger - Run Give Damage Bonus <gen> (ignoring conditions)
I was so kind to make it MUI as well.
It works 100% but it could be done better... but requires a lot of more coding.
Place this script in the header file of your map (the blue WE iconed, map title named, trigger at the top of the trigger list).
JASS:
    function WaitGameTime takes real duration returns nothing
        local timer t
        local real  timeRemaining
        
        if duration > 0 then
            set t = CreateTimer()
            call TimerStart(t, duration, false, null)
            loop
                set timeRemaining = TimerGetRemaining(t)
                exitwhen timeRemaining <= 0
                
                if timeRemaining > bj_POLLED_WAIT_SKIP_THRESHOLD then
                    call TriggerSleepAction(0.1 * timeRemaining)
                else
                    call TriggerSleepAction(bj_POLLED_WAIT_INTERVAL)
                endif
            endloop
            call DestroyTimer(t)
            set t = null
        endif
    endfunction

About third... Maker.

PS, dont bumb so fast. Just be patient.
  • Bumb
    • Events
      • A member requests a thread bumb.
    • Conditions
    • Actions
      • Thread - Bumb (This thread)
      • Trigger - Turn off (This trigger)
      • Wait 172800.00 seconds
      • Trigger - Turn on (This trigger)
 
Level 2
Joined
Jul 9, 2015
Messages
20
Thankkkkkkkkkks :)
may you show "this part" on the trigger :
Loop integer A from 1 to 6
--if item type carried by triggering unit in slot Integer A == some item type
--then set i = i + 1
--endif
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
  • Actions
    • For each (Integer A) from 1 to 6, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Tome of Experience
          • Then - Actions
            • Set TempInteger[0] = (TempInteger[0] + 1)
          • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • TempInteger[0] Greater than or equal to 3
      • Then - Actions
        • -------- dostuff --------
      • Else - Actions
 
Status
Not open for further replies.
Top