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

[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