Denegoth
New Member
- Reaction score
- 18
Trigger:
- Set TempAlchChance[4] = (Random integer number between 1 and 100)
For some reason, every time I load up the map and use the ability, it returns the exact same numbers in a certain order each time. The only 3 numbers I remember are 73, 75 and 97, in that order. I'm not sure if this is a single player only thing or not, but it's a major problem at the moment since the first 20 numbers are all over 50. I will post the whole code so you can see:
Trigger:
- Minor Health Potion
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Create Potion
- ((Triggering unit) has an item of type Mortar and Pestle) Equal to True
- ((Triggering unit) has an item of type Bluebloom Petal) Equal to True
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Charges remaining in (Item carried by (Triggering unit) of type Bluebloom Petal)) Greater than or equal to 5
- Then - Actions
- Item - Set charges remaining in (Item carried by (Triggering unit) of type Bluebloom Petal) to ((Charges remaining in (Item carried by (Triggering unit) of type Bluebloom Petal)) - 5)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Charges remaining in (Item carried by (Triggering unit) of type Bluebloom Petal)) Equal to 0
- Then - Actions
- Item - Remove (Item carried by (Triggering unit) of type Bluebloom Petal)
- Else - Actions
- If - Conditions
- Set TempAlchChance[1] = 50
- Set TempAlchChance[2] = (Alchemy_Level[(Player number of (Triggering player))] / 2)
- Set TempAlchChance[3] = (TempAlchChance[1] + TempAlchChance[2])
- Set TempAlchChance[4] = (Random integer number between 1 and 100)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- TempAlchChance[3] Greater than or equal to TempAlchChance[4]
- Then - Actions
- Hero - Create Minor Health Potion and give it to (Triggering unit)
- Set TempAlchEXP = 5
- Set TempPlayerLevelUp = (Owner of (Triggering unit))
- Trigger - Run AlchemyLevelUp <gen> (ignoring conditions)
- Else - Actions
- Set TempAlchEXP = 1
- Set TempPlayerLevelUp = (Owner of (Triggering unit))
- Trigger - Run AlchemyLevelUp <gen> (ignoring conditions)
- If - Conditions
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events