# damage random

**URL:** <https://forums.unrealengine.com/t/damage-random/2189550>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [December 9, 2024, 6:50pm UTC](https://forums.unrealengine.com/t/damage-random/2189550 "2024-12-09T18:50:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RESTORATOR74](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RESTORATOR74](https://forums.unrealengine.com/u/RESTORATOR74)\
**Post date:** [December 9, 2024, 6:50pm UTC](https://forums.unrealengine.com/t/damage-random/2189550/1 "2024-12-09T18:50:58Z")

</div>

Hello everyone, help me understand how to do random damage, for example, min damage 240 average 350 and maximum 450 so that each race shoots damage randomly from these numbers

---

<div class="post-metadata">

**Author:** ![HellFireHE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HellFireHE](https://forums.unrealengine.com/u/HellFireHE)\
**Post date:** [December 9, 2024, 8:32pm UTC](https://forums.unrealengine.com/t/damage-random/2189550/2 "2024-12-09T20:32:50Z")

</div>

float dmg = FMath::RandRange(240.0f,450.0f);

As well there is an integer version.
