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

Help with making/editing abilitys

Status
Not open for further replies.
Level 3
Joined
Jul 11, 2005
Messages
50
I greatly need some help with making custom abilitys

1. I want to make an ability that makes it when you kill somthing all overkill damage is stored away and when you click on the the abily all the damage is added in for 1 attack.

2. when you click the spell abilty i want it to check how much gold or lumber you have (it donsent really matter which one) and then usses all of it and does that much damage to target creature.

3. 2 spells 1 that will complety restarin a unit from attacking and using abilitys and moving. and another one that will only restrainb it from attacking and moving
This is all for now but i wiil proably be adding more. Thankes for you help in advance
-DeadSoul
 
Level 13
Joined
May 5, 2004
Messages
1,330
I don't know if the first one is even possible, but for the second one you could use sth like this:

Events
Unit - A unit starts casting an ability
Conditions
Ability being cast equal to [ability]
Actions
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - (Real(((Owner of (Casting unit)) Actual Gold))))

Player - Set (Owner of (Casting unit)) Actual Gold to 0


Simply a group of arithmetic functions.
 
Level 3
Joined
Jul 11, 2005
Messages
50
thankes for your help. I think the first one is possable just really comlacatied. Also on the second one can you first make it so if u have more gold then the targeted units hp you only use enough to kill him and second if you get the abilty up to level 2 it does 2 damage fore every 1 gold thankes.
 
Level 13
Joined
May 5, 2004
Messages
1,330
Ok, made the trigger for 2 levels, you should be able to figure out how to make it work for higher ability-levels.


Events
Unit - A unit starts casting an ability
Conditions
(Ability being cast) Equal To [ability]
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • 'IF'-Bedingungen
    (Life of (Target unit of ability being cast)) less then/equal to (Real(((Owner of (Casting unit)) Actual Gold)))
    (Level of [ability] for (Casting unit)) Equal To 1
    'THEN'-Aktionen
    Player - Set (Owner of (Casting unit)) Actual Gold to (((Owner of (Casting unit)) Actual Gold) - (Integer((Life of (Target unit of ability being cast)))))
    Unit - Kill (Target unit of ability being cast)
    Skip remaining actions
    'ELSE'-Aktionen
    Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • 'IF'-Bedingungen
    (Life of (Target unit of ability being cast)) less then/equal to ((Real(((Owner of (Casting unit)) Actual Gold))) / 2.00)
    (Level of [ability] for (Casting unit)) Equal To 2
    'THEN'-Aktionen
    Player - Set (Owner of (Casting unit)) Actual Gold to (((Owner of (Casting unit)) Actual Gold) - (Integer((Life of (Target unit of ability being cast)))))
    Unit - Kill (Target unit of ability being cast)
    Skip remaining actions
    'ELSE'-Aktionen
    Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • 'IF'-Bedingungen
    (Life of (Target unit of ability being cast)) bigger then (Real(((Owner of (Casting unit)) Actual Gold)))
    (Level of [ability] for (Casting unit)) Equal To 1
    'THEN'-Aktionen
    Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - (Real(((Owner of (Casting unit)) Actual Gold))))
    Player - Set (Owner of (Casting unit)) Actual Gold to 0
    Skip remaining actions
    'ELSE'-Aktionen
    Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • 'IF'-Bedingungen
    (Life of (Target unit of ability being cast)) bigger then (Real(((Owner of (Casting unit)) Actual Gold)))
    (Level of [ability] for (Casting unit)) Equal To 2
    'THEN'-Aktionen
    Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - ((Real(((Owner of (Casting unit)) Actual Gold))) x 2.00))
    Player - Set (Owner of (Casting unit)) Actual Gold to 0
    Skip remaining actions
    'ELSE'-Aktionen
    Do nothing
 
Level 3
Joined
Jul 11, 2005
Messages
50
wow holy crap thats a lot of triggering but 1 thought i dont see eny difference between the level 1 and levels 2's and before you call me a noob who donsent know what hes doing know this everything that i know before this i've learned from myself thankes a lot for your help and if my map ever reaches the complte stage your name will pop somewhere in the game thankes again
-Deadsoul

one more thang is that acual code that i can copy and paste in or or you just giving me the triggers i need to do?
 
Level 13
Joined
May 5, 2004
Messages
1,330
Nope, that's simply how the triggers should look like (dunno if I remembered the correct syntax in every part). If you have problems finding any of the triggers, just tell me. The difference between the lvl 1 and lvl 2 trigger is the multiplikator [...Actual Gold))) x 2.00))...].

To the first ability. I'm of the opinion that it's impossible because you need a "Unit - A unit takes damage"-event. Sadly, those kinda event only exists for the "Specific Unit Event"-function, so you would have to create a trigger for any possible unit. Anyway, atm I'm using my Laptop, and I'm only having WC3 version 1.16 installed (somehow it won't update it). I don't remember if Blizzard added the event for the other unit-functions in 1.17 or 1.18, have to check that the next days.
 
Status
Not open for further replies.
Top