modify ability cost (possible?)

MissKerrigan

Active Member
Reaction score
23
Hello,

I finally created an ability which cost 25 minerals, but everytime the ability is used, it must cost 25 more minerals (25-50-75-100-125 etc...)

note: if there are 4 players in the game, then the ability of other players must be still 25 cost till they use the ability

Does anyone know how this works?

MissKerrigan
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
Make a trigger that triggers when the ability is used and use the action "Catalog Field value set" to do the following: "Set value of Abilities *YourAbility* Cost[0].Vital[0] for player (Triggering Player) to X"

X is a string, so to add 25 you have to first find the current mineral cost, convert it into an integer, add 25 and convert it back into a string. You can use the function "Catalog Field Value Get As Integer" to get the current cost.

So to add 25 to the mineral cost of Ghost cloak, the action would look something like this:

" Catalog - Set value of Abilities GhostCloak Cost[0].Vital[0] for player (Triggering player) to (String(((Value of Abilities GhostCloak Cost[0].Vital[0] for player (Triggering player) as an integer) + 25)))
"
 

MissKerrigan

Active Member
Reaction score
23
thanks but it sounds really complicated, the I've never seen a string before exept the one I'm wearing ofcourse :) (oops)
 

X-maul

AKA: Demtrod
Reaction score
201
Uhm, well I remember this being told to you several times, anyway;

You are working in a code program, which means that all the names have specific meanings. That being said a String is a piece of text reference. (This is not the whole truth, but google it if you must).

What Siretu told you is very simple, he just took a good amount of time explaining it very clearly. So please, for not wasting Siretu's time, at least try.
 

MissKerrigan

Active Member
Reaction score
23
I never said I'm wasting Siretu's time, ofcourse I will try it

(at this moment, you are wasting my time)
 

X-maul

AKA: Demtrod
Reaction score
201
I am not wasting your time by telling you to try it.

If you say; "oh it's too complicated" that leads us to belive that you gave up on the idea, and wont use what we spend time on writing. That, seems to us, as if we are wasting our time helping you.

And if you think I am wasting you time, then I dont see why I should waste my time helping you.

Please note that I am not trying to sound like an angry dad scolding his kid, I'm just trying to make you see it from our point of view.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top