Sup guys, I'm trying to modify the upgrade system to this: 5 levels of an upgrade, upgrade researches automatically,
@Map Init-> Upgrade 1 starts: Interger=280, subtracting 1/ingame second, subtracting 5 on enemy unit kill, and showing an icon for the upgrade + the counter (updating every sec) on a Dialog. Now, the only problem I got so far with this system is: It only works for player 1. The interger is only 1 data, so I cant add it to multiple players. Can I recreate this mechanic in Data editor, is there a method to render an Interger to a player, or must I create 8 sets of Intergers/ upgrade level (8*5*3[melee, ranged,armor]), + all the triggers for it?
So basically (since I posted this in the Data section), can I recreate this in the Data editor somehow?
You use the same counter integer but loop the code at certain milestones for all players. The integer is global (well I hope it is) so has the same value at any given time across all triggers.
If players can receive upgrades at different times then use the integer in an "up counter" mode where you iterate through all players and then check if the counter value is equal to the counter value for that player to receive an upgrade.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Sup guys, I'm trying to modify the upgrade system to this: 5 levels of an upgrade, upgrade researches automatically,
@Map Init-> Upgrade 1 starts: Interger=280, subtracting 1/ingame second, subtracting 5 on enemy unit kill, and showing an icon for the upgrade + the counter (updating every sec) on a Dialog. Now, the only problem I got so far with this system is: It only works for player 1. The interger is only 1 data, so I cant add it to multiple players. Can I recreate this mechanic in Data editor, is there a method to render an Interger to a player, or must I create 8 sets of Intergers/ upgrade level (8*5*3[melee, ranged,armor]), + all the triggers for it?
So basically (since I posted this in the Data section), can I recreate this in the Data editor somehow?
You use the same counter integer but loop the code at certain milestones for all players. The integer is global (well I hope it is) so has the same value at any given time across all triggers.
If players can receive upgrades at different times then use the integer in an "up counter" mode where you iterate through all players and then check if the counter value is equal to the counter value for that player to receive an upgrade.