[Spell] Need help getting non-trigger/jass spells to be directly affected by stats.

Status
Not open for further replies.
Level 6
Joined
Jan 17, 2006
Messages
275
As I said before I need help getting non-trigger/jass spells to be directly affected by stats.

Is this possible? If so i'd like help getting this to work. If this has already been asked, just provide a thread link to point me in the right direction.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
It's impossible, since there are no standar skill in warcraft 3 that does something based on status. Any stat effect must be triggered, but is not so hard :) Ask if you want to know how, or if you want someone to help you creating something.
 
Level 8
Joined
Jul 3, 2011
Messages
251
No, it is not possible in object editor, however you can easily trigger it with theese functions.
JASS:
native          GetHeroStr          takes unit whichHero, boolean includeBonuses returns integer
JASS:
native          GetHeroAgi          takes unit whichHero, boolean includeBonuses returns integer
JASS:
native          GetHeroInt          takes unit whichHero, boolean includeBonuses returns integer
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
That's only getting the current attributes, applying them to other features could be a problem depending on what exactly you want to do. It may be enough to have some aiding triggers that catch the spell's features and execute additional actions using the stats, could also be that you have to trigger the whole ability.

Another question is when to read out the hero's attributes/how to assign them to the spell. Imagine having a stormbolt, you send it off flying and naturally would want to gather the data upon cast. But how do you know it's the same stormbolt upon impact where you would like to deal additional damage for example. There might be some simulteaneous stormbolts flying around, from the same caster, with different attribute values, the target arbitrarily moving around, shots not arriving in the correct order.
 
Level 8
Joined
Jul 3, 2011
Messages
251
I was just showing the functions to get the stats, i am aware it requires much more coding, since generally stats abilities should only be used in triggered projectiles or instant abilities.
 
Level 6
Joined
Jan 17, 2006
Messages
275
Sorry, I didn't go into enough detail earlier.

I know that I would need to trigger but I'm trying to do something that doesnt instantly affect a target dealing 'convert integer to real' as damage, but strengthens regular spells using intelligence or agility like a stat does to attack, armor, regeneration and etc. Something like making the victim take bonus damage upon hit by the spell based on a chosen attribute.

+Rep for the great suggestions so far.
 
Level 8
Joined
Jul 3, 2011
Messages
251
Still not enough detail im afraid, elaborate please.

Want a damage over time? AoE damage after a few secs? We need the exact idea you have for an ability, also do you know how trigger at all? You should include such information so we can help you faster and easier.
 
Level 6
Joined
Jan 17, 2006
Messages
275
Still not enough detail im afraid, elaborate please.

Want a damage over time? AoE damage after a few secs? We need the exact idea you have for an ability, also do you know how trigger at all? You should include such information so we can help you faster and easier.

I'm looking for damage over time, direct damage effects and even buffs, a few examples might Firebolt, Shadow Strike or Roar - AoE effects are not an issue.

Just post a few appropriate triggers and I'll say which one I'm needing.

I'll experiment in WE - I'm a hands on learner.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Ok... BlackArmsShadow... I'lll give you a really basic example of stat use in spell.
Import Weep's GDD found in Spells area.

Event: GDD_Event becomes equal to 0.00
Condition: Whatever.
Actions: Cause GDD_DamageSource to cause X damage to GDD_DamagedUnit.

Add your 'stat' damage in the 'X'.

You're done :)
 
Status
Not open for further replies.
Top