Discuss Scratch

HAKORYS
Scratcher
7 posts

how do you make a dps counter???

so i have the actual damage calculator…

whenclickedforeveriftouchingenemy?thensetdamagetopickrandom90to100waituntilnottouchingenemy?buthowdoimakeitcalculatethedps

but how do i calculate the dps?



also
foreverifmy first game=played, liked, and favoritedthenchangeawesomesessby3000000000

Last edited by HAKORYS (Nov. 6, 2016 01:55:32)

HAKORYS
Scratcher
7 posts

how do you make a dps counter???

i made the question into a block oops

XD
IDPFera
Scratcher
100+ posts

how do you make a dps counter???

This is in the wrong forum. If you want to ask questions about scripts, please post in the help with scripts forum. I could help though, what's DPS?
HAKORYS
Scratcher
7 posts

how do you make a dps counter???

1. where is the scripts forum?
2. DPS stands for Damage Per Second
IDPFera
Scratcher
100+ posts

how do you make a dps counter???

Click discuss on the top bar of the website, then scroll down to the big making scratch projects section, and it should be the first one in that section.
Harakou
Scratcher
1000+ posts

how do you make a dps counter???

Moved to Help with Scripts.
asivi
Scratcher
1000+ posts

how do you make a dps counter???

whenclickedforeversetprevious damagetodamagewait0.966secssetDPStodamage-previousdamage
mardydev
Scratcher
4 posts

how do you make a dps counter???

here is how you do it

first add an (when green flag clicked)
then have a test dummy
make sure the health is (for this sprite only)
whenclickedsethealthto999foreveriftouchingany weapon?thenchangehealthby-anydamageyouwantset dpstosame as the damage you input on previousbroadcastcombine or combine dpswhenIreceivecombine or combine dpschangetotal dpsbydps+totaldpssaytotaldpsfor1secswait1secssettotal dpsto0endend

hope this helps! say thanks

Last edited by mardydev (Feb. 24, 2022 09:36:24)

mardydev
Scratcher
4 posts

how do you make a dps counter???

mardydev wrote:

here is how you do it

first add an (when green flag clicked)
then have a test dummy
make sure the health is (for this sprite only)
whenclickedsethealthto999foreveriftouchingany weapon?thenchangehealthby-anydamageyouwantset dpstosame as the damage you input on previousbroadcastcombine or combine dpswhenIreceivecombine or combine dpschangetotal dpsbydps-totaldps+totaldps)saytotaldpsfor1secswait1secssettotal dpsto0endend

hope this helps! say thanks
new game

Last edited by mardydev (Feb. 24, 2022 09:45:22)

deck26
Scratcher
1000+ posts

how do you make a dps counter???

Presumably DPS can be calculated in various ways -

- damage taken in the last second
- average damage per second over the time the project has been running
- damage per second averaged over the last n seconds (5 seconds? 10 seconds?)

How to do this will depend very much on which of those you want so you need to define it more clearly.
Harakou
Scratcher
1000+ posts

how do you make a dps counter???

mardydev wrote:

here is how you do it

first add an (when green flag clicked)
then have a test dummy
make sure the health is (for this sprite only)
[…]
hope this helps! say thanks
Thanks for your help, but this topic is over 5 years old. Please make sure that you're not responding to an old thread that doesn't require help anymore when posting. Thanks.

Powered by DjangoBB