• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] How I make one Spell besed in the atribute?

Status
Not open for further replies.
huuuuuuuuuuuum
but I don't found this action

action: make casting unit deal "casting unit strength" to target of ability being cast
OK

  • Untitled Trigger 001
    • Events
      • Unit - Firelord 0060 <gen> Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Breath of Fire
    • Actions
      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - (Real((Strength of Firelord 0060 <gen> (Exclude bonuses)))))
 
huuuuuuuuuuuuuuum, cool
how
is the title name of this action?

  • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - (Real((Strength of Firelord 0060 <gen> (Exclude bonuses)))))
:grin:


"Unit - Set life (To Value)"

(Real((Strength of Firelord 0060 <gen> (Exclude bonuses)))) is "Conversion - Convert Integer to Real"
 
I advise against using that.

It will cause bugs, including not crediting the actual killer and causing death based events to return the incorrect killer. Also it will not trigger damage based events thus will also bug them.

Rather use the actions / natives to get a unit to instantly inflict damage to another unit as that allows quantity but also lets the damage get reduced by armor or spell resistance or immunity as well as crediting the killing unit correctly.
 
Why must it be so complicated?
Just use
Unit - Damage Target
Cause (Your Unit) to deal (GetUnitStrenght(IncludeBonus), YourUnit) to (Target Unit Of Ability Being Cast)

Using set hp to value will ignore the unit's armor and others.

I know using set hp wasn't the best thing to use, but i couldn't find 'Unit - Damage Target' last night, i probaly shouldn't be at forums when to tired..
 
Why must it be so complicated?
Just use
Unit - Damage Target
Cause (Your Unit) to deal (GetUnitStrenght(IncludeBonus), YourUnit) to (Target Unit Of Ability Being Cast)

Using set hp to value will ignore the unit's armor and others.


This I was undestand, but I don't know make this action, I must use some string?
how are the action title?
 
Please have a look at a gui tutorial...

Here we go:
  • Unit Group - Pick every unit in (Units within 512.00 of (Position of (Triggering unit))) and do (Actions)
    • Loop - Actions
And in that loop you put the action i gave you in the last post....

IMPORTANT: Change the "Units withing >512<" to the range of your warstomp...
 
This should SOLVE this problem....

  • New Trigger
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to (Your warstomp)
    • Actions
      • Unit Group - Pick every unit in (Units within 512.00 of (Position of (Triggering unit))) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (Real((Agility of (Triggering unit) (Exclude bonuses)))) damage of attack type Spells and damage type Normal
 
Lets start in the beginning:

There are several types of variables. The common onces used in every program language
(C, c#, c++, visual basic...) are:

Boolean: A variable which can be either TRUE or FALSE.
Integer: Just a number.. like 1 or 10 or 1002123
BUT there is a limit.. Integer are not able to save infinite numbers...
String: A row of signs (sorry for my bad english)
Can be a word or just some letters... like a or abc or Haha or idiot... (this whole post is one big string)

In the World editor there are some other variables:

real: real is similar to Integer but saves things which are used in the game.. (at least it seems to me like that).
For example: Distance, Flying height, damage....

The Problem now is that the attributs of the heros (strength, agility, intelligence) or saved as Integers...

The damage the ability is meant to deal MUST be a real... for that there are conversions:

Some examples:

Convert String to Integer (takes a string like a chat message and makes a number out of it)
Convert real/Integer to String (if you want to give out any number or real as a chat message you must first convert it)

AND Convert Integer to real (an integer is taken and given out as a real)

That's important for you because the attribut Integer must be converted into a realto be dealt as damage...

^^ quite long post... would be glad if I get rep for it :xxd:

I hope it helped
 
Last edited:
one peaple talk to me this:

  • agility
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to War Stomp
  • Actions
  • Set WarStomp = (Position of (Casting unit))
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within 350.00 of WarStomp matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))) and do (Actions)
  • Loop - Actions
  • Unit - Cause (Casting unit) to damage (Picked unit), dealing ((Real((Level of War Stomp for (Casting unit)))) x (Real((Agility of (Casting unit) (Include bonuses))))) damage of attack type Spells and damage type Normal

BUT HOW I MAKE TO THE SPELL DON'T AFECT MY UNIT TO?
 
And here we go again^^:

In the loop where you pick every unit in range. Add an IF to that loop which checks whether the
-owner of the picked unit is an enemie of owner of casting unit.

I have no worldeditor here at the moment but I think you can find the condition yourself.

But if not... tell me.. then i give you the trigger tomorrow
 
i would beleive ur looking for this

  • Unit Group - Pick every unit in (Units within 512.00 of Temp_Point matching (((Picked unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
    • Loop - Actions

unit group -> units in range matching condition -> boolean comparison -> Unit- Unit belongs to an enemy of player

that will make sure you are damaging only enemy units
 
my tigger are this:

  • Atribute Demage
  • Events
    • Unit - Unit start efects of an ability
  • Conditions
    • (Abylity begin cast) Equal to (Attack 1)
  • Actions
    • Set TempReal = (Real ((Agility of Raziel(Spectre) 0013 <gen> (incluede bonuses))))
    • Unit Group - Pick every unit in (Units whithing 150.00 of (position of Unit (Raziel(Spectre) 0013 <gen>) Matching (((Picked Unit) Belong an enemy of Player 9 (Gray))Equal to True)) and do (Unit - Cause Raziel(spectre 0013 <gen> to demage circular area after 0.10 seconds of radius 150.00 at (Positon of Raziel(Spectre) 0013 <gen>), deling (TempReal) demage of attack type Hero and demage type Normal)
Is this?
 
my tigger are this:

  • Atribute Demage
  • Events
    • Unit - Unit start efects of an ability
  • Conditions
    • (Abylity begin cast) Equal to (Attack 1)
  • Actions
    • Set TempReal = (Real ((Agility of Raziel(Spectre) 0013 <gen> (incluede bonuses))))
    • Unit Group - Pick every unit in (Units whithing 150.00 of (position of Unit (Raziel(Spectre) 0013 <gen>) Matching (((Picked Unit) Belong an enemy of Player 9 (Gray))Equal to True)) and do (Unit - Cause Raziel(spectre 0013 <gen> to demage circular area after 0.10 seconds of radius 150.00 at (Positon of Raziel(Spectre) 0013 <gen>), deling (TempReal) demage of attack type Hero and demage type Normal)
Is this?

you should probobably of had done the way i suggest in my earlier post. but like the guy above me said if this is working for you then by all means go for it
 
Status
Not open for further replies.
Back
Top