Grags_1977
Ultra Cool Member
- Reaction score
- 32
Searchers. If you're having random number problems. 2 possible solutions.
A, File/Preferences/Test Map: Uncheck Fixed Random Seed.
B, Obviously a bug in the wc3 engine. Try Converting a random real to an integer.
Example: Set RandomNumber = (Integer((Random real number between 1.00 and 4.00)))
Original Message
A, File/Preferences/Test Map: Uncheck Fixed Random Seed.
B, Obviously a bug in the wc3 engine. Try Converting a random real to an integer.
Example: Set RandomNumber = (Integer((Random real number between 1.00 and 4.00)))
Original Message
This just stopped working out of nowhere and I have no idea why.
This part runs at Initialization.
Code:Set Region_HostileToDie[1] = HostileToDie01 <gen> Set Camera_HostileToDie[1] = HostileToDie01 <gen> Set Region_HostileToDie[2] = HostileToDie02 <gen> Set Camera_HostileToDie[2] = HostileToDie02 <gen> Set Region_HostileToDie[3] = HostileToDie03 <gen> Set Camera_HostileToDie[3] = HostileToDie03 <gen> Set Region_HostileToDie[4] = HostileToDie04 <gen> Set Camera_HostileToDie[4] = HostileToDie04 <gen> Set Unit_HostileToDies[1] = Bounty (Level 1) Set Unit_HostileToDies[2] = Bounty (Level 2) Set Unit_HostileToDies[3] = Bounty (Level 3) Set Unit_HostileToDies[4] = Bounty (Level 4) Set Unit_HostileToDies[5] = Bounty (Level 5) Set Unit_HostileToDies[6] = Bounty (Level 6) Set Unit_HostileToDies[7] = Bounty (Level 7) Set Unit_HostileToDies[8] = Bounty (Level 8) Set Unit_HostileToDies[9] = Bounty (Level 9) Set Unit_HostileToDies[10] = Bounty (Level 10) Set Unit_HostileToDie = No unit
This part runs when talking to a quest giver.
Code:Set Integer_RandomNumber = (Random integer number between 1 and 4) Set TempPoint[20] = (Center of Region_HostileToDie[Integer_RandomNumber]) Unit - Create 1 Bounty (Level 1) for Neutral Hostile at TempPoint[20] facing Default building facing degrees Custom script: call RemoveLocation( udg_TempPoint[20] ) Set Unit_HostileToDie = (Last created unit) Camera - Apply Camera_HostileToDie[Integer_RandomNumber] for Player 1 (Red) over 5.00 seconds Wait 3.00 seconds Special Effect - Create a special effect attached to the overhead of Unit_HostileToDie using Abilities\Spells\Other\Aneu\AneuCaster.mdl Set SpecialEffect_HostileToDie = (Last created special effect)
For some reason the hostile unit is ALLWAYS placed at HostileToDie03. What am I missing?!?!
These are the full triggers
Trigger:
- Variables
- Events
- Conditions
- Actions
- Set Real_InfernoAOE = 400.00
- Set Real_FireBoltDamage = 6.00
- Set Integer_SpinAttackMax = 2
- Set Region_HostileToDie[1] = HostileToDie01 <gen>
- Set Camera_HostileToDie[1] = HostileToDie01 <gen>
- Set Region_HostileToDie[2] = HostileToDie02 <gen>
- Set Camera_HostileToDie[2] = HostileToDie02 <gen>
- Set Region_HostileToDie[3] = HostileToDie03 <gen>
- Set Camera_HostileToDie[3] = HostileToDie03 <gen>
- Set Region_HostileToDie[4] = HostileToDie04 <gen>
- Set Camera_HostileToDie[4] = HostileToDie04 <gen>
- Set Unit_HostileToDies[1] = Bounty (Level 1)
- Set Unit_HostileToDies[2] = Bounty (Level 2)
- Set Unit_HostileToDies[3] = Bounty (Level 3)
- Set Unit_HostileToDies[4] = Bounty (Level 4)
- Set Unit_HostileToDies[5] = Bounty (Level 5)
- Set Unit_HostileToDies[6] = Bounty (Level 6)
- Set Unit_HostileToDies[7] = Bounty (Level 7)
- Set Unit_HostileToDies[8] = Bounty (Level 8)
- Set Unit_HostileToDies[9] = Bounty (Level 9)
- Set Unit_HostileToDies[10] = Bounty (Level 10)
- Set Unit_HostileToDie = No unit
- Set TempUnitGroup[1] = (Units of type Bob)
- Set Unit_Hero = (Random unit from TempUnitGroup[1])
- Custom script: call DestroyGroup ( udg_TempUnitGroup[1] )
- Trigger - Add to Death Bring Reset Cam and Movement <gen> the event (Unit - Unit_Hero Takes damage)
- Trigger - Add to In range <gen> the event (Unit - A unit comes within 1800.00 of Unit_Hero)
- Hero - Modify unspent skill points of Unit_Hero: Subtract 1 points
- Set Sound_SpinAttack[1] = SpinAttackHit1 <gen>
- Set Sound_SpinAttack[2] = SpinAttackHit2 <gen>
- Set Sound_SpinAttack[3] = SpinAttackHit3 <gen>
- Set Integer_GoldRewardCaptain = 200
- Set Sound_Music = Music_Human <gen>
Trigger:
- Captain Back
- Events
- Unit - A unit Sells an item (from shop)
- Conditions
- (Item-type of (Sold Item)) Equal to Talk
- (Unit-type of (Selling unit)) Equal to Desert Guard Captain
- ((Selling unit) belongs to an enemy of Player 1 (Red)) Equal to False
- Unit_HostileToDie Equal to No unit
- (Unit_Hero has an item of type Murlocs Head) Equal to False
- Actions
- Set Integer_HostileToDie = (Integer_HostileToDie + 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Integer_HostileToDie Greater than 10
- Then - Actions
- Set Integer_HostileToDie = 10
- Else - Actions
- Special Effect - Destroy SpecialEffect_QuestCaptain
- Trigger - Turn off (This trigger)
- Trigger - Run Cinematic Mode On <gen> (ignoring conditions)
- Camera - Apply Captain 01 <gen> for Player 1 (Red) over 0.00 seconds
- Camera - Apply Captain 02 <gen> for Player 1 (Red) over 3.00 seconds
- Cinematic - Send transmission to (All players) from Unit_Talk named (Name of Unit_Talk): Play Voice_Captain_Back_01 <gen> and display Welcome back!. Modify duration: Add 0.00 seconds and Wait
- Set Integer_RandomNumber = (Random integer number between 1 and 4)
- Set TempPoint[20] = (Center of Region_HostileToDie[Integer_RandomNumber])
- Unit - Create 1 Unit_HostileToDies[Integer_HostileToDie] for Neutral Hostile at TempPoint[20] facing Default building facing degrees
- Custom script: call RemoveLocation( udg_TempPoint[20] )
- Set Unit_HostileToDie = (Last created unit)
- Camera - Apply Camera_HostileToDie[Integer_RandomNumber] for Player 1 (Red) over 5.00 seconds
- Wait 3.00 seconds
- Special Effect - Create a special effect attached to the overhead of Unit_HostileToDie using Abilities\Spells\Other\Aneu\AneuCaster.mdl
- Set SpecialEffect_HostileToDie = (Last created special effect)
- Camera - Set Player 1 (Red)'s camera Distance to target to 950.00 over 3.00 seconds
- Cinematic - Send transmission to (All players) from Unit_Talk named (Name of Unit_Talk): Play Voice_Captain_Back_02 <gen> and display This guy is your ne.... Modify duration: Add 0.00 seconds and Wait
- Cinematic - Send transmission to (All players) from Unit_Talk named (Name of Unit_Talk): Play Voice_Captain_Back_03 <gen> and display Bring me his head, .... Modify duration: Add 0.00 seconds and Wait
- Neutral Building - Add Give Head to (Selling unit) with 1 in stock and a max stock of 1
- Set TempPoint[21] = (Position of Unit_Hero)
- Camera - Pan camera for Player 1 (Red) to TempPoint[21] over 0.00 seconds
- Custom script: call RemoveLocation( udg_TempPoint[21] )
- Trigger - Run Cinematic Mode Off <gen> (ignoring conditions)
- Trigger - Turn on Captain Return Hostile Dead 02 <gen>
- Trigger - Turn on Captain Return Hostile Alive <gen>
- Special Effect - Create a special effect attached to the overhead of (Selling unit) using Objects\RandomObject\RandomObject.mdl
- Set SpecialEffect_QuestCaptain = (Last created special effect)
EDIT: Hmmm why aint my spoiler tags working? It is [spoiler.][/spoiler.] right? (without the . of course)
EDIT2: Fixed random seed is unchecked btw.
EDIT3: So I went ahead and added this line.
Game - Display to (All players) the text: (String(Integer_RandomNumber))
And every time it displays 3wtf is going on?!?!
EDIT4: Going to uninstall and reinstall. I think my warcraft is bugged.
EDIT5: I like editing.