06-08-2008, 08:37 PM
(This post was last modified: 06-08-2008, 09:19 PM by Silverthorn.)
I knew what you were talking about but I just want to avoid to make any mistakes; Azzy struck me with a formula once (actually it wasn't very complicated, just long), and I can't find it....
*is searching in the old forums*
of course, it was the last post in the searching list....
original thread: clicky
*is searching in the old forums*
of course, it was the last post in the searching list....
Azriel Wrote:actually my formula is:
TU = time unit
TTT = (the number of time units the object stays on the frame) -1
HHH = hitpoints lost each time unit the object is on that frame
DDD = frame the object goes to when it's supposed to disappear
wait: TTT
hit_a: HHH
hit_d: DDD
If HHH * (TTT + 1) >= 500 Then Goto DDD
so....
to clarify the TTT, when u have an object go to a frame with wait: 0, u get it being on that frame for 1 TU, and then it goes to the frame in next: (like d'uh smilie *this is for the newer DCers who don't know*). so like wait: 6 = 7 TU on the frame. anyways, since we want the object to be able to hit people 5 times, we need it to lose 100 hp each time it hits (so when it hits on the 5th time it loses its 500 hp and goes to DDD).
next....
when the object hits, 100 hp can be lost heaps of ways, but if u want it to continue on its path of destruction immediately *evil laugh*, u have to make it go back to the flying frames immediately and the shortest time length u can do that in is 1 TU, (coz it has to go to frame 10 when it hits). so, using the formula above, just make wait: value 0. Now, if ur wait value is 1, u have 2 TU, so if u want it to still have 5 hits before disappearing, u have to make HHH = 100/TU = 100/2 = 50.
ok now to analyse BP's formula this one: (hit_a-value * (wait-value + 1))^-1
oh yeaps i see what u mean. urs actually lists the time value that's taken away (when it's 1 then it goes to hit_dsmilie.
Azriel~
original thread: clicky
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~
"Freeze, you're under vrest!" - Mark, probably.
» Gallery | » Sprites | » DeviantArt
~ Breaking LFE since 2008 ~
"Freeze, you're under vrest!" - Mark, probably.
» Gallery | » Sprites | » DeviantArt