Hi
I'm trying to make a system for my Pokemon map where if you level up one of your three attributes will increase at random. I managed to do it with having triggers literally change the attribute but I wanted to make it so the increases where visible to the player.
I have created three different abilities based on "item stat bonus" where each one has 100 levels and increases one of each stat individually.
However the problem comes that when the ability is added to the Hero (Pokemon) when they first gain a bonus there is a massive spike of lag. Further more even when they do indeed have the ability it doesn't increase when it should. Any ideas?
EDIT: Solved - Using Attribute Bonus rather than item abilities appears to have fixed the problem.
EDIT no.2: There is still a small lag spike when the ability is learnt to begin with but now I have met the problem of the ability not carrying over correctly when evolving. Here are the triggers (the copy trigger and one evolution trigger).
EDIT no. 3: So now that also works which is always good. Still got lag spikes whenever they are given the spell though. Not much of an issue but anyone got any ideas?
I'm trying to make a system for my Pokemon map where if you level up one of your three attributes will increase at random. I managed to do it with having triggers literally change the attribute but I wanted to make it so the increases where visible to the player.
I have created three different abilities based on "item stat bonus" where each one has 100 levels and increases one of each stat individually.
However the problem comes that when the ability is added to the Hero (Pokemon) when they first gain a bonus there is a massive spike of lag. Further more even when they do indeed have the ability it doesn't increase when it should. Any ideas?
-
Bonus Stats Per Level
-
Events
- Unit - A unit Gains a level
- Conditions
-
Actions
- Set TempInt = (Random integer number between 1 and 3)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TempInt Equal to 1
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Stat Bonus (Agility) for (Leveling Hero)) Equal to 0
-
Then - Actions
- Unit - Add Stat Bonus (Agility) to (Leveling Hero)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Stat Bonus (Agility) for (Leveling Hero)) Less than 100
-
Then - Actions
- Unit - Increase level of Stat Bonus (Agility) for (Leveling Hero)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TempInt Equal to 2
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Stat Bonus (Intelligence) for (Leveling Hero)) Equal to 0
-
Then - Actions
- Unit - Add Stat Bonus (Intelligence) to (Leveling Hero)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Stat Bonus (Intelligence) for (Leveling Hero)) Less than 100
-
Then - Actions
- Unit - Increase level of Stat Bonus (Intelligence) for (Leveling Hero)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TempInt Equal to 3
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Stat Bonus (Strength) for (Leveling Hero)) Equal to 0
-
Then - Actions
- Unit - Add Stat Bonus (Strength) to (Leveling Hero)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Stat Bonus (Strength) for (Leveling Hero)) Less than 100
-
Then - Actions
- Unit - Increase level of Stat Bonus (Strength) for (Leveling Hero)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Events
EDIT no.2: There is still a small lag spike when the ability is learnt to begin with but now I have met the problem of the ability not carrying over correctly when evolving. Here are the triggers (the copy trigger and one evolution trigger).
-
Copy Bonus Stats
- Events
- Conditions
-
Actions
- Unit - Remove Stat Bonus (Agility) - NEW from (Casting unit)
- Unit - Remove Stat Bonus (Intelligence) - NEW from (Casting unit)
- Unit - Remove Stat Bonus (Strength) - NEW from (Casting unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Stat Bonus (Agility) - NEW for (Casting unit)) Greater than 0
-
Then - Actions
-
For each (Integer A) from 1 to (Level of Stat Bonus (Agility) - NEW for (Casting unit)), do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Stat Bonus (Agility) - NEW for (Last replaced unit)) Equal to 0
-
Then - Actions
- Unit - Add Stat Bonus (Agility) - NEW to (Last replaced unit)
-
Else - Actions
- Unit - Increase level of Stat Bonus (Agility) - NEW for (Last replaced unit)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to (Level of Stat Bonus (Agility) - NEW for (Casting unit)), do (Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Stat Bonus (Intelligence) - NEW for (Casting unit)) Greater than 0
-
Then - Actions
-
For each (Integer A) from 1 to (Level of Stat Bonus (Intelligence) - NEW for (Casting unit)), do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Stat Bonus (Intelligence) - NEW for (Last replaced unit)) Equal to 0
-
Then - Actions
- Unit - Add Stat Bonus (Intelligence) - NEW to (Last replaced unit)
-
Else - Actions
- Unit - Increase level of Stat Bonus (Intelligence) - NEW for (Last replaced unit)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to (Level of Stat Bonus (Intelligence) - NEW for (Casting unit)), do (Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Stat Bonus (Strength) - NEW for (Casting unit)) Greater than 0
-
Then - Actions
-
For each (Integer A) from 1 to (Level of Stat Bonus (Strength) - NEW for (Casting unit)), do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Stat Bonus (Strength) - NEW for (Last replaced unit)) Equal to 0
-
Then - Actions
- Unit - Add Stat Bonus (Strength) - NEW to (Last replaced unit)
-
Else - Actions
- Unit - Increase level of Stat Bonus (Strength) - NEW for (Last replaced unit)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to (Level of Stat Bonus (Strength) - NEW for (Casting unit)), do (Actions)
- Else - Actions
-
If - Conditions
-
Charmander Charmeleon Charizard
-
Events
- Unit - A unit Finishes casting an ability
-
Conditions
- (Ability being cast) Equal to Evolve
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Casting unit)) Equal to Charmander
- (Hero level of (Casting unit)) Greater than or equal to 16
-
Then - Actions
- Unit - Replace (Casting unit) with a Charmeleon using The new unit's max life and mana
- Game - Display to (All players) for 10.00 seconds the text: (((Name of (Owner of (Casting unit))) + ('s + ((Name of (Casting unit)) + ( has evolved into a + (Name of (Last replaced unit)))))) + !)
-
For each (Integer A) from 1 to (Level of Ember (Level 1) for (Casting unit)), do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Ember (Level 1) for (Casting unit)) Greater than 0
-
Then - Actions
- Hero - Learn skill for (Last replaced unit): Ember (Level 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to (Level of Growl (Level 2) for (Casting unit)), do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Growl (Level 2) for (Casting unit)) Greater than 0
-
Then - Actions
- Hero - Learn skill for (Last replaced unit): Growl (Level 2)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to (Level of Smokescreen (Level 3) for (Casting unit)), do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Smokescreen (Level 3) for (Casting unit)) Greater than 0
-
Then - Actions
- Hero - Learn skill for (Last replaced unit): Smokescreen (Level 3)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to (Level of Fire Spin (Level 4) for (Casting unit)), do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Fire Spin (Level 4) for (Casting unit)) Greater than 0
-
Then - Actions
- Hero - Learn skill for (Last replaced unit): Fire Spin (Level 4)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to (Level of Will-o-wisp (Level 5) for (Casting unit)), do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Will-o-wisp (Level 5) for (Casting unit)) Greater than 0
-
Then - Actions
- Hero - Learn skill for (Last replaced unit): Will-o-wisp (Level 5)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Trigger - Run Copy Bonus Stats <gen> (checking conditions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Casting unit)) Equal to Charmeleon
- (Hero level of (Casting unit)) Greater than or equal to 48
-
Then - Actions
- Unit - Replace (Casting unit) with a Charizard using The new unit's max life and mana
- Game - Display to (All players) for 10.00 seconds the text: (((Name of (Owner of (Casting unit))) + ('s + ((Name of (Casting unit)) + ( has evolved into a + (Name of (Last replaced unit)))))) + !)
-
For each (Integer A) from 0 to (Level of Fire Spin (Level 4) for (Casting unit)), do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Fire Spin (Level 4) for (Casting unit)) Greater than 0
-
Then - Actions
- Hero - Learn skill for (Last replaced unit): Fire Spin (Level 4)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 0 to (Level of Will-o-wisp (Level 5) for (Casting unit)), do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Will-o-wisp (Level 5) for (Casting unit)) Greater than 0
-
Then - Actions
- Hero - Learn skill for (Last replaced unit): Will-o-wisp (Level 5)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Trigger - Run Copy Bonus Stats <gen> (checking conditions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Last edited: