Need expert (not really expert) advices for my first skill made...

afisakov

You can change this now in User CP.
Reaction score
37
That's an awesome ideas, but that means I have to counting how many steps that drag do to the target and calculate how much damage per drag step, so the target would get damage exactly like being planned, right...? I'm sorry if I was wrong...

You already have the drag distance and the total damage scale by the exact same ratios, so once you do the calculation once it should be easy to scale to other levels.
If I am not mistaken the speed at which the unit is dragged is constant, the drag just lasts longer at higher levels. Therefore the damage per interval can be the same regardless of ability level... because higher levels last longer leading to the unit getting hit more times.
 
Reaction score
9
You already have the drag distance and the total damage scale by the exact same ratios, so once you do the calculation once it should be easy to scale to other levels.
If I am not mistaken the speed at which the unit is dragged is constant, the drag just lasts longer at higher levels. Therefore the damage per interval can be the same regardless of ability level... because higher levels last longer leading to the unit getting hit more times.

Thanks, I also had done the damage calculations, and this spell would probably MPI, because Accname says that this spell hasn't to be MUI...
Here are the triggers:

1. Drag Shot Cast
Trigger:
  • Drag Shot Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Drag Shot
    • Actions
      • Set DSC_CustomValue = (Custom value of (Triggering unit))
      • Set DSC_Unit[DSC_CustomValue] = (Triggering unit)
      • Set DSC_Skill[DSC_CustomValue] = (Ability being cast)
      • Set DSC_Level[DSC_CustomValue] = (Level of DSC_Skill[DSC_CustomValue] for DSC_Unit[DSC_CustomValue])
      • Countdown Timer - Start DSC_Timer1[DSC_CustomValue] as a One-shot timer that will expire in ((Real(DSC_Level[DSC_CustomValue])) x 1.60) seconds
      • Set DSC_Timer1[DSC_CustomValue] = (Last started timer)
      • Set DST_CustomValue = (Custom value of (Target unit of ability being cast))
      • Set DST_Unit[DST_CustomValue] = (Target unit of ability being cast)
      • Trigger - Add to Drag Shot Start <gen> the event (Time - DSC_Timer1[DSC_CustomValue] expires)
      • Trigger - Turn on Drag Shot Start <gen>


2. Drag Shot Start
Trigger:
  • Drag Shot Start
    • Events
    • Conditions
    • Actions
      • Set DST_Facing[DST_CustomValue] = (Facing of DST_Unit[DST_CustomValue])
      • Set DST_Locations[DST_CustomValue] = (Position of DST_Unit[DST_CustomValue])
      • Countdown Timer - Start DSC_Timer2[DSC_CustomValue] as a One-shot timer that will expire in ((Real(DSC_Level[DSC_CustomValue])) x (0.04 x 32.00)) seconds
      • Set DSC_Timer2[DSC_CustomValue] = (Last started timer)
      • Unit - Pause DST_Unit[DST_CustomValue]
      • Set DSC_Damage[DSC_CustomValue] = ((((Real(DSC_Level[DSC_CustomValue])) x 1.60) x (Real((Agility of DSC_Unit[DSC_CustomValue] (Include bonuses))))) / ((Real(DSC_Level[DSC_CustomValue])) x 16.00))
      • Trigger - Turn on Drag Shot Drag <gen>
      • Trigger - Add to Drag Shot End <gen> the event (Time - DSC_Timer2[DSC_CustomValue] expires)
      • Trigger - Turn on Drag Shot End <gen>
      • Custom script: call RemoveLocation(udg_DST_Locations[udg_DST_CustomValue])


3. Drag Shot Drag
Trigger:
  • Drag Shot Drag
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Set DST_Facing[DST_CustomValue] = (Facing of DST_Unit[DST_CustomValue])
      • Set DST_Locations[DST_CustomValue] = (Position of DST_Unit[DST_CustomValue])
      • Set DST_LocationsDrag[DST_CustomValue] = (DST_Locations[DST_CustomValue] offset by 8.00 towards (DST_Facing[DST_CustomValue] + 180.00) degrees)
      • Unit - Move DST_Unit[DST_CustomValue] instantly to DST_LocationsDrag[DST_CustomValue]
      • Unit - Cause DSC_Unit[DSC_CustomValue] to damage DST_Unit[DST_CustomValue], dealing DSC_Damage[DSC_CustomValue] damage of attack type Spells and damage type Cold
      • Custom script: call RemoveLocation(udg_DST_Locations[udg_DST_CustomValue])
      • Custom script: call RemoveLocation(udg_DST_LocationsDrag[udg_DST_CustomValue])


4. Drag Shot End
Trigger:
  • Drag Shot End
    • Events
    • Conditions
    • Actions
      • Unit - Unpause DST_Unit[DST_CustomValue]
      • Unit - Make DST_Unit[DST_CustomValue] Vulnerable
      • Trigger - Turn off Drag Shot Start <gen>
      • Trigger - Turn off Drag Shot Drag <gen>
      • Trigger - Turn off Drag Shot End <gen>
      • Custom script: call RemoveLocation(udg_DST_Locations[udg_DST_CustomValue])
      • Custom script: call RemoveLocation(udg_DST_LocationsDrag[udg_DST_CustomValue])


Also there's a problem with this one, I follow what you're saying for dealing the damage to the target while it was dragged, but I can't make it invulnerable, because if I make it invulnerable the damage cannot be inflicted to the target, can you help me on this one...?:D
I want the target's cannot be attacked (hasn't to Invulnerable) while it was being dragged...
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Dont use the custom value as index into the array. That is overly complicated.
Use the player number instead. Its simple and perfectly MPI because each player has its own number.
 
Reaction score
9
Dont use the custom value as index into the array. That is overly complicated.
Use the player number instead. Its simple and perfectly MPI because each player has its own number.
Are you kidding me...?o_O
Why didn't you say that from the first time...?o_O
Anyway, isn't Custom Value more specific than player number...? Ok, I'll get it right away...

Accname, do you have any idea about how to make the target cannot be attacked while it was being dragged, but it still can be inflicted by damage from the triggers...?
I really need this one to make this spell not so imba...:D
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
1) Custom value is a value which you can set. You can change it at any point in time.
This is a potential for errors and mistakes.
In your current configuration (besides the fact, that it wont work) you use the custom value of the caster. But it might be (due to a badly written trigger) that 2 units have the same custom value. In this case the spell would be broken and bugs would appear.
The player number of the owning trigger however is pre-set and fixed. It can not be changed in any way. This assures that each caster has a unique index in the array.

2) You can give the unit invulnerability (like I did in the hashtable-version) to make it immune against all kinds of damage. Then, in your trigger, instead of dealing damage you simply take away life from the unit.
However, you have to check whether you would kill the unit by decreasing its life, if that is the case, you have to remove invulnerability and deal damage from your caster. This way you make sure that the kill is credited to the caster.
 
Reaction score
9
1) Custom value is a value which you can set. You can change it at any point in time.
This is a potential for errors and mistakes.
In your current configuration (besides the fact, that it wont work) you use the custom value of the caster. But it might be (due to a badly written trigger) that 2 units have the same custom value. In this case the spell would be broken and bugs would appear.
The player number of the owning trigger however is pre-set and fixed. It can not be changed in any way. This assures that each caster has a unique index in the array.
Player Numbers as arrays can guaranteed that this spell won't bug if it being cast by multiple player...?

2) You can give the unit invulnerability (like I did in the hashtable-version) to make it immune against all kinds of damage. Then, in your trigger, instead of dealing damage you simply take away life from the unit.
However, you have to check whether you would kill the unit by decreasing its life, if that is the case, you have to remove invulnerability and deal damage from your caster. This way you make sure that the kill is credited to the caster.
Yes, I want to damage the target while it was being dragged, but the damage was from triggers, and the target cannot be attacked by any other unit in the map while it dragged...
Is there any other way to make this one happen...?:D
Because if I make the target Invulnerable, the target takes no damage even from the triggers...
 

afisakov

You can change this now in User CP.
Reaction score
37
Player Numbers as arrays can guaranteed that this spell won't bug if it being cast by multiple player...?


Yes, I want to damage the target while it was being dragged, but the damage was from triggers, and the target cannot be attacked by any other unit in the map while it dragged...
Is there any other way to make this one happen...?:D
Because if I make the target Invulnerable, the target takes no damage even from the triggers...

Set DSC_Damage[DSC_CustomValue] =agility of caster * 1.6 / 32 (unit moves in 32 steps per ability level)

in interval do:
if Getunitlife of target>DSC_damage then
set target life = target life - dsc_damage
else
remove invulnerability from target
unit-cause caster to damage target by 9999 (therefore giving caster the kill)
endif
This will damage over time without removing invulnerability unless spell damage is enough to kill directly.

btw, as the people before me said, MPI would be easier using Player number-owner of trigger unit. and then reference that number later.
this number is by defauly unique for evry player and you don't have to custom set it yourself.
 
Reaction score
9
Set DSC_Damage[DSC_CustomValue] =agility of caster * 1.6 / 32 (unit moves in 32 steps per ability level)
Anyway, I want more damage, I set the DSC_Damage[DSC_CustomValue] as considered the unit only move in 16 steps, so as they move 32 steps they will get twice damage...:D

in interval do:
if Getunitlife of target>DSC_damage then
set target life = target life - dsc_damage
else
remove invulnerability from target
unit-cause caster to damage target by 9999 (therefore giving caster the kill)
endif
This will damage over time without removing invulnerability unless spell damage is enough to kill directly.
Is this one has to be in JASS...? Or it will the same even in GUI...?
I'll fixed the triggers right away...
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Here. Take a look at the map attached.
It is now an MPI version using arrays.

I hope you can implement the damage over time yourself.
 

Attachments

  • Drag Shot Test.w3x
    22.8 KB · Views: 161

afisakov

You can change this now in User CP.
Reaction score
37
Anyway, I want more damage, I set the DSC_Damage[DSC_CustomValue] as considered the unit only move in 16 steps, so as they move 32 steps they will get twice damage...:D


Is this one has to be in JASS...? Or it will the same even in GUI...?
I'll fixed the triggers right away...

Your trigger moves them a distance of 256 per level, at 8 per tick. Therefore 256/8=32 times it ticks. So to deal the same total damage, but split it over the ticks you would have to divide by 32 times the unit gets hit by it.

It can all be done in GUI, I just wrote free-text because I find it easier to think that way.
The premise is, that since the unit is invulnerable, you have to decrease its life by triggers every time you would deal damage.
However, if doing so would kill, then you want your unit to get the kill- rather then them seemingly expiring on their own. That is why I wrote to check each time if enemy health>dmg done.
If the dmg would kill them then you make them vulnerable and deal killing damage instead.
The reason I wrote 9999 is do avoid them surviving with a sliver of health left because they take <100% dmg from spells.
 
Reaction score
9
It can all be done in GUI, I just wrote free-text because I find it easier to think that way.
The premise is, that since the unit is invulnerable, you have to decrease its life by triggers every time you would deal damage.
However, if doing so would kill, then you want your unit to get the kill- rather then them seemingly expiring on their own. That is why I wrote to check each time if enemy health>dmg done.
If the dmg would kill them then you make them vulnerable and deal killing damage instead.
The reason I wrote 9999 is do avoid them surviving with a sliver of health left because they take <100% dmg from spells.

Ahh... I understand, thanks... So even though the unit is Invulnerable, and the damage caused by: set Life of Target unit of ability being cast = Life of Target unit of ability being cast - DSC_Damage, but I still can get the credit by killing it, right...? That's awesome, thanks man... For Accname, I did use all of your triggers, only the damage trigger I deleted:D , because I already know how to damage the target even with Invulnerability, and the triggers works fine after I casting it to same target from different player, thanks to make it MPI... You guys are really awesome...:D
 

afisakov

You can change this now in User CP.
Reaction score
37
, but I still can get the credit by killing it, right...?
that is the reason for checking if health of target < dmg, and the
"remove invulnerability from target
unit-cause caster to damage target by 9999 (therefore giving caster the kill)"
step if it is. That way caster gets credit for the last hit.
If you dealt ALL the damage by seting life=life-dmg, then the unit would just die without anyone getting credit. Only last hit is needed for credit, however.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top