• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[Trigger] ability dmg determined by stats

Status
Not open for further replies.
Level 1
Joined
Oct 15, 2006
Messages
4
yea, im working on a map, and to make it cooler and simpler im trying to make some of the spells deal damage based on the heroes attributes. i think the problem with my trigger is my game cache and or variables so can someone who knows how to do this walk me through the steps to making a skill's damage depend on the heroes attributes
 
Level 17
Joined
Jun 17, 2007
Messages
1,433
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your Ability
    • Actions
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing ((Real((Selected Attribute of (Triggering unit) (Exclude bonuses)))) x y) damage of attack type Spells and damage type Normal
 
Level 1
Joined
Oct 15, 2006
Messages
4
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your Ability
    • Actions
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing ((Real((Selected Attribute of (Triggering unit) (Exclude bonuses)))) x y) damage of attack type Spells and damage type Normal

what is this? ((Real((Selected Attribute of (Triggering unit) a variable?
how do i configure this to my game cache to make it work
 
Level 1
Joined
Oct 15, 2006
Messages
4
function Trig_Untitled_Trigger_025_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00G' ) ) then
return false
endif
return true
endfunction

function Trig_Untitled_Trigger_025_Actions takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), ( udg_Real[GetHeroStatBJ(bj_HEROSTAT_AGI, GetTriggerUnit(), true)] * 3.00 ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_025 takes nothing returns nothing
set gg_trg_Untitled_Trigger_025 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_025, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Untitled_Trigger_025, Condition( function Trig_Untitled_Trigger_025_Conditions ) )
call TriggerAddAction( gg_trg_Untitled_Trigger_025, function Trig_Untitled_Trigger_025_Actions )
endfunction

thats what i have, and it wont work correct for me please?
 
JASS:
function Trig_Untitled_Trigger_025_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00G' ) ) then
return false
endif
return true
endfunction
 
function Trig_Untitled_Trigger_025_Actions takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), ( udg_Real[GetHeroStatBJ(bj_HEROSTAT_AGI, GetTriggerUnit(), true)] * 3.00 ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
endfunction
 
//===========================================================================
function InitTrig_Untitled_Trigger_025 takes nothing returns nothing
set gg_trg_Untitled_Trigger_025 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_025, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Untitled_Trigger_025, Condition( function Trig_Untitled_Trigger_025_Conditions ) )
call TriggerAddAction( gg_trg_Untitled_Trigger_025, function Trig_Untitled_Trigger_025_Actions )
endfunction

thats what i have, and it wont work correct for me please?

This is the GUI section, not the JASS section.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing ((Real((Strength of (Triggering unit) (Exclude bonuses))))) damage of attack type Spells and damage type Normal

I don't understand your problem ? You just put there your selected attribute beetwin Strength Agility and Intelligence...
 
Level 1
Joined
Oct 15, 2006
Messages
4
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to test skill
Actions
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing ((Real((Agility of (Triggering unit) (Include bonuses)))) x 100.00) damage of attack type Spells and damage type Normal

yea thats what i have and its not working
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Convert Integer to Real
you will see something like Real(0) appeared
change that 0 to Hero - Hero Stats
 
Status
Not open for further replies.
Top