You can do this purely in the data editor too, its really simple and does what you want. And since this is so simple you really should use the data editor instead of a trigger so you have one less trigger running and hurting performance, this way is more efficient. I assume you already have your ability set up somewhere with a button that you click in game?
Then just go to data editor, go to the"Effects" data type tab, right-click the top-left list box and choose "Add Object...". Name it like "Add Minerals" and click the suggest button, then in the "Effect Type:" drop down box, choose "Modify Player" and click OK. Now make sure you have table view selected (menu View->Show Table View, its just easier) and select the newly created "Add Minerals" effect on the left if it isnt already. Now look at the table on the right, find the "Effect - Resources" field, double click the cell next to it, choose Minerals, and type the value you want in the box below, and hit OK. Now go to the "Abilities" data type tab and select your ability. Make sure its of the type "Effect - Instant", if it isnt, double click it and you can change the ability type. Now double click next to the "Effect - Effect" field, click the green button to add a new entry, find "Add Minerals" in the list, hit ok, and should be all set to go.
Seems like alot, but thats only because I explained every step. Takes like 10 seconds.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
@LeetBox: Go
You can do this purely in the data editor too, its really simple and does what you want. And since this is so simple you really should use the data editor instead of a trigger so you have one less trigger running and hurting performance, this way is more efficient. I assume you already have your ability set up somewhere with a button that you click in game?
Then just go to data editor, go to the"Effects" data type tab, right-click the top-left list box and choose "Add Object...". Name it like "Add Minerals" and click the suggest button, then in the "Effect Type:" drop down box, choose "Modify Player" and click OK. Now make sure you have table view selected (menu View->Show Table View, its just easier) and select the newly created "Add Minerals" effect on the left if it isnt already. Now look at the table on the right, find the "Effect - Resources" field, double click the cell next to it, choose Minerals, and type the value you want in the box below, and hit OK. Now go to the "Abilities" data type tab and select your ability. Make sure its of the type "Effect - Instant", if it isnt, double click it and you can change the ability type. Now double click next to the "Effect - Effect" field, click the green button to add a new entry, find "Add Minerals" in the list, hit ok, and should be all set to go.
Seems like alot, but thats only because I explained every step. Takes like 10 seconds.