• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Random damage isn't random

Status
Not open for further replies.
Level 11
Joined
Jun 26, 2014
Messages
513
  • 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,286
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
513
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