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

[Trigger] Simple (?) spells i need some help with

Status
Not open for further replies.
Level 15
Joined
Jun 11, 2007
Messages
969
Hi! :cool:
I am doing some heroes etc for a map, and i need help with 2 spells!
The first one is called Soul Arrow.
-Kills targeted unit
-(Supposed to) Set life of Casting Unit to 50%
What i want to do, is that i want it to set the casting units current life to 50%. Example, the hero has 500 life points, right now it always gets to 250 LP, but if the hero has like 200 LP i want him to have 100 LP after casting the spell.

Second, I am working on name, but basiclly i want the hero to some times go into a frenzy increasing damage done for a few secs. What spell shall i base it on? What triggers?:eek:

Thank you! :wink:
 
Level 13
Joined
Sep 14, 2008
Messages
1,407
First one is easy.
You need one trigger:

Event: Unit casts spell (or is it starts casting?)
Condition: Spell being cast = Soul Arrow
Action: Set life of triggering unit to (current life of triggering unit / 2)



The second one can just use avatar, (I am not sure whether you can remove the spell immunity) or you use the spell from the claw druids (roar I think) and change the radius to 0 or 1.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Second spell:

Use a damage detection system, then when a random number is correct (e.g.: random number between 1 and 100 is less than or equal to 25), spawn a dummy with a skill based on bloodlust.
This is the same spell I use in one of my maps (not uploaded yet :p)

edit sorry, haven't got much time, otherwise I would show the full trigger.
I hope you can do it with this.
 
Level 15
Joined
Jun 11, 2007
Messages
969
Thx for quick responce :grin:
Thanks alot for the help on the first spell, DarkAngelAzazel! :D
Worked exactly as i wanted, and i learned that thingy with maths in WE..... never thought it exsisted :D +rep btw

About the second... Think my english was too bad, as i want it to "proc" sometimes, like Critical Strike, 15% chance to critical strike etc etc... I want that, like 15% chance on hit to enter frenzy, increasing damage done for a couple of seconds. :grin:

ap0calypse, i think i just, while writing, understood waht you meant :D yeah that would work very well, but i have no idea how to implent it. So, when you have time, would you show the trigger so i can add it to my map? I will give credit etc ;)

thx!
 
Level 13
Joined
Sep 14, 2008
Messages
1,407
  • Trigger
    • Ereignisse
      • Einheit - A unit Wird angegriffen
    • Bedingungen
      • (Unit-type of (Attacking unit)) Gleich YourHero
    • Aktionen
      • Set randomInt = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • randomInt smaller/equal 15
        • 'THEN'-Aktionen
          • Einheit - Add Avatar to (Attacking unit)
          • Einheit - Order (Attacking unit) to activate avatar
          • Einheit - Remove Avatar from (Attacking unit)
        • 'ELSE'-Aktionen
Mh I am not sure but this SHOULD work XD

I made the triggers in a german we so the icons are not right...
 
Level 15
Joined
Jun 11, 2007
Messages
969
Hehe, i will do my best understanding that Deutsch :D thank you

EDIT: (sry for double post, merged)Hey, sry for late responce. Currently this is not working. I have few things i don't know what to write on and how to make it say a specific thingy, but i think i have done mostly right.

  • Events
    • Unit - A unit Is attacked
  • Conditions
    • (Attacking unit) Equal to Bone Reaper 0041 <gen>
  • Actions
    • Set randomInit = (Random integer number between 1 and 100)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • randomInit Less than or equal to 50
      • Then - Actions
        • Unit - Add Bloodlust to (Attacking unit)
        • Unit - Order Bone Reaper 0041 <gen> to Orc Shaman - Activate Bloodlust
        • Unit - Remove Bloodlust from (Attacking unit)
      • Else - Actions
The integer variable is set to 1 array. So, the buggers are;
-Attacking unit) Equal to Bone Reaper 0041 <gen>: currently its a unit i placed on the map, how can it the Hero Bone Reaper?
-Unit - Order Bone Reaper 0041 <gen> to Orc Shaman - Activate Bloodlust: I coludn't find custom spells etc, just the normal spells so this is temporary, but it still wont activate.

The :randomInit Less than or equal to 50: is also temporary when i tryed the spell.

Thank you!:wink:
 
Last edited:
Bloodlust requires a target, the "activate" thing is setting it to auto-cast. It is not like Avatar, which has no targets and requires the "Issue order with no target". You can do this instead:

Then - Actions
Set Attacker = (Attacking unit)
Set Point1 = (Position of (Attacker))
Unit - Create 1 DummyOrb at Point1 for (Owner of (Attacker)) facing default building degrees
Unit - Order (Last created unit) to Orc Shaman - Activate Bloodlust (Attacker)
Unit - Add a 2.00 generic expiration timer to (Last created unit)
Custom script: call RemoveLocation (udg_Point1)
Custom script: set udg_Attacker = null
 
Level 15
Joined
Jun 11, 2007
Messages
969
Hello! :D
Works very well, but theres just one thing...
Since i will still be keeping the normal shaman unit, i can't remove the upgrade needed to use Bloodlust. "Unit - Order (Last created unit) to Orc Shaman - Activate Bloodlust (Attacker)" - I don't understand why you can't make it cast a custom spell? Or is that possible? Because i really want the Bloodlust effect and not the Avatar one.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Hello! :D
Works very well, but theres just one thing...
Since i will still be keeping the normal shaman unit, i can't remove the upgrade needed to use Bloodlust. "Unit - Order (Last created unit) to Orc Shaman - Activate Bloodlust (Attacker)" - I don't understand why you can't make it cast a custom spell? Or is that possible? Because i really want the Bloodlust effect and not the Avatar one.

Why can't you make it cast a custom spell?
Just use the same Spell ID as something like Storm Bolt on your custom spell (doesn't have to be stormbolt, it's just a terget-spell), then say "Unit - Order unit to Human Mountain King - Storm Bolt (Attacking unit)".
 
Status
Not open for further replies.
Top