Yes, I can use arithmetic to increase the speed. What you have stated earlier is exactly what I had done. I tried using the "Convert Real to String" function on the catalog string and then using arithmetic for real to add up the original speed with the increase that I want. The problem is, it seems like, for Reals, there isnt any function to return the Real catalog field value. There is a function "Catalog Field Value Get as Integer" but it returns integer. Does not work for reals.
You could either use the "Unit Property", "Movement Speed" function to get the current movement speed (as a real) of the unit, or perhaps get the catalog field value as a string, then convert it to a real.
There are a few avenues you can pursue to make this work.
First, try simply making an upgrade with multiple levels. Each level modifies the unit type's movement speed by a certain amount. Then you can add or remove upgrades using validators or triggers. Using upgrades is more or less the same as using Catalog triggers... the values are just hard-coded.
Another thing you could do is run a loop that picks each unit of type X in the playable map area and modify the picked unit's movement speed. This is basically a walk-around to using Catalog triggers.
Third, you can pick all units as above and apply a buff or debuff which modifies the picked unit's movement speed. If you use this method, I recommend stacking multiple buffs so it's easier to change the movement speed to multiple values.
How about just putting the (starting) speed into a real variable yourself. Then whenever you modify the catalog speed, you could also modify the real variable. Hopefully you don't have too many unit types you'll be modifying though...
Hi all,
With triggers and (preferably) using catalog, how do I increase the movement speed of a unit by 0.3?
Thanks!
There is a difference between Unit and Unit type.
Catalog changes Unit Type while other methods adjusts Unit. its very important to know the difference so that we don't have to guess.
[code]Catalog - Set value of Units Marine Speed for player 1 to "99999"[/code]
you can use arithmetic to "increase" but i doubt this is what you want.
@SoulTaker916: Go
Yes, I can use arithmetic to increase the speed. What you have stated earlier is exactly what I had done. I tried using the "Convert Real to String" function on the catalog string and then using arithmetic for real to add up the original speed with the increase that I want. The problem is, it seems like, for Reals, there isnt any function to return the Real catalog field value. There is a function "Catalog Field Value Get as Integer" but it returns integer. Does not work for reals.
Need some more help here
You could either use the "Unit Property", "Movement Speed" function to get the current movement speed (as a real) of the unit, or perhaps get the catalog field value as a string, then convert it to a real.
Hey Chris, were you able to figure it out?
@Kanoobee: Go
Unfortunately, no
@Chris97Ong: Go
There are a few avenues you can pursue to make this work.
First, try simply making an upgrade with multiple levels. Each level modifies the unit type's movement speed by a certain amount. Then you can add or remove upgrades using validators or triggers. Using upgrades is more or less the same as using Catalog triggers... the values are just hard-coded.
Another thing you could do is run a loop that picks each unit of type X in the playable map area and modify the picked unit's movement speed. This is basically a walk-around to using Catalog triggers.
Third, you can pick all units as above and apply a buff or debuff which modifies the picked unit's movement speed. If you use this method, I recommend stacking multiple buffs so it's easier to change the movement speed to multiple values.
How about just putting the (starting) speed into a real variable yourself. Then whenever you modify the catalog speed, you could also modify the real variable. Hopefully you don't have too many unit types you'll be modifying though...
@Chris97Ong: Go
just found this, here the answer http://www.sc2mapster.com/forums/development/galaxy-scripting-and-trigger-lib/83768-apply-modifier-to-all-units/#p4
You missed your target!
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418