How can I, by using triggers get the range of a certain weapon. I wanna use the Weapon Range as a variable. Is there something similiar to the "UnitGetPropertyInt()" function?
You can't find it in the trigger menu because it isn't a "direct" function. You will for example find it as "indirect" function if you do "Set Variable" on a string variable, and on the value parameter you can use the function "Catalog Field Value Get". Hopefully that was a clear enough explanation.
You can't find it in the trigger menu because it isn't a "direct" function. You will for example find it as "indirect" function if you do "Set Variable" on a string variable, and on the value parameter you can use the function "Catalog Field Value Get". Hopefully that was a clear enough explanation.
Thanks! That made totally sense, since there is no need to use a GET-function if theres nowhere to place the returned value inside.. :D
Anyone knows if theres a way to get the acutal damage a unit deals? because if you have any abilities increasing it you cant use the value from the catalog, for life you can use units life maximum instead of unit type life maximum, i really do need this(i dont want to make a workaround with custom value and all abilities changing the number)
Hoping someone can answer a question about this for me I need a trigger where I can pull data from a field but the unit which Im pulling it from needs to be "Triggering Unit"
This was the best I could come up with on my own but it doesn't seem to work. Any suggestions would be greatly appreciated.
Edit: I just realized that probably why its not working is that Triggering Unit may not be using the Unit ID as the reference, not sure what to do about that but just a thought.
My question is as in topic:
How can I, by using triggers get the range of a certain weapon. I wanna use the Weapon Range as a variable. Is there something similiar to the "UnitGetPropertyInt()" function?
GetCatalogItem().
You can choose the catalog Weapons and set key and section (or whatever they're called) to the weapon name and range.
Catalog Field Value Get
Catalog: Weapons
Entry: "Marine"
Field Path: "Range"
Player: 1
Will return "5" as a string, which easily can be converted to a integer/real. Entry is the unit ID, not the name.
Thanks alot guys! One more question though, i can only find the Set function and not the Get, where is it? :o
Edit: I know how to do it with custom script, but why can't i find it in the "trigger menu" of functions? o.O
The function returns a string value.
You can't find it in the trigger menu because it isn't a "direct" function. You will for example find it as "indirect" function if you do "Set Variable" on a string variable, and on the value parameter you can use the function "Catalog Field Value Get". Hopefully that was a clear enough explanation.
Thanks! That made totally sense, since there is no need to use a GET-function if theres nowhere to place the returned value inside.. :D
How to find a units life points? i tried it with
Catalog Field Value Get Catalog: Units Entry: "Marine" Field Path: "Life Maximum" Player: 1
But this doesnt work...
You could just use "unit type property (max life)" in that perticular case:)
hm yes right... i got the damage already so this also works thanks ^^
Anyone knows if theres a way to get the acutal damage a unit deals? because if you have any abilities increasing it you cant use the value from the catalog, for life you can use units life maximum instead of unit type life maximum, i really do need this(i dont want to make a workaround with custom value and all abilities changing the number)
Hoping someone can answer a question about this for me I need a trigger where I can pull data from a field but the unit which Im pulling it from needs to be "Triggering Unit"
This was the best I could come up with on my own but it doesn't seem to work. Any suggestions would be greatly appreciated.
Edit: I just realized that probably why its not working is that Triggering Unit may not be using the Unit ID as the reference, not sure what to do about that but just a thought.