• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Random damage isn't random

Status
Not open for further replies.
Level 11
Joined
Jun 26, 2014
Messages
497
  • Unit - Cause JG_Caster to damage JG_Target, dealing (Random real number between 250.00 and 350.00) damage of attack type Spells and damage type Normal
This over here should make that when a hero casts a spell the target will take random damage from 250 to 350. The problem is the damage is always 317. Why is that shouldn't it be random??
 
Last edited by a moderator:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
When coding cinematics you should also use fixed seeds so that the combat results end always the same. It would be stupid if you show an army fighting but some times the side that is meant to win (and even announced so) ends up losing due to bad RNG results.

Seed in multiplayers starts out random. Additionally humans introduce a source of randomness to the seed through their actions. You can also disable fixed seed during map tests in the editor preferences.
 
Level 11
Joined
Jun 26, 2014
Messages
497
When coding cinematics you should also use fixed seeds so that the combat results end always the same. It would be stupid if you show an army fighting but some times the side that is meant to win (and even announced so) ends up losing due to bad RNG results.

Seed in multiplayers starts out random. Additionally humans introduce a source of randomness to the seed through their actions. You can also disable fixed seed during map tests in the editor preferences.

Thank you... and If I'm making a cinematic war I'd probably just make the winning one stronger.
 
Status
Not open for further replies.
Top