• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Solved] Random damage isn't random

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