ID:1280134
 
(See the best response by Ss4toby.)
Code:
        Weapon_Slaughter()
flick("Weapon Slaughter",src)
for(var/mob/enemy/m in get_step(src, dir))
world << m
var/Damage=max(0,src.Str-m.Def+15)
m.TakeDamage(Damage,src)
flick("Hit",m)
view(m)<<"[src] struck [m] with Weapon Slaughter for [Damage] Damage"
m.Deathcheck()
sleep(32)
m.KnockBack(5)


Problem description:
I was wondering if its possible to deal damage frame by frame or basically have each slash in a combo of slashes do damage using 1 "flick". or am i going to have to flick every slash independtly? Please let me know if it can be done and what i should use! thanks.
You can "flick" one long animation and just do damage over time.
Im not exactly sure about the best way to do it. would a kind of poison effect be best, like:
mob
proc
Poisoned()
while(Poison)
Health-=1
sleep(2)

so that while you are in the range of the attack you lose HP at the same time the frames change? or were you thinking of another way?
Are you wanting the person to take damage when he's close to an object?
Yeah,i want to be able to deal damage to a person when they are within range of an attacking object or mob little by little in a long animation rather than dealing all the damage at once.
Just want to be able to make the animation seem more realistic, where everytime you get hit you take damage rather than once you get caught in the animation you take damage for the entire thing even if you manage to escape or get caught after its begun
Best response
Panda dude, the only thing I can think of that might help is to construct a list with given delays and apply the delays between slashes.

Example:
mob/proc/flickDamage(var/list/delays,damage)
for(var/v in delays)
sleep(v)
src.TakeDamage(damage)

mob/verb/hitSelfFourTimes()
flick("multiHit",src)
flickDamage(list(2,4,4,5),10)


And you could even apply a damage list aswell if needed.
mob/proc/flickDamage(var/list/delays,var/list/damage)
var/dmg=0
for(var/v=1 to length(delays))
sleep(delays[v])
if(v<=damage.len)
dmg=damage[v]
src.TakeDamage(dmg)

mob/verb/hitSelfFourTimes()
flick("multiHit",src)
src.flickDamage(list(2,4,4,5),list(10,12,12,50))