Hello, everyone. I'm building a map where I have a few custom units, and one of them is a Marine (a War Pig, actually) who is a sniper. I changed the weapon data, so it shoots like a Ghost and even uses the Snipe skill. But I would like to know if there's a way for me to (maybe using attachment points in the model?) change the Gauss Rifle shown in the character model to a Sniper Rifle (either the Ghost's, the Spectre's or Jim Raynor's, whichever works best)
Hey, I just found the solution. I used UnitWeaponGet instead of the catalog, and it worked wonders. I can get any unit's weapon now. Had to create a "WeaponToString" function though. I'll post the map when I'm done with it :D
Thanks a lot!
Okay, let me go through my findings:
StringToText(UnitToString(inputUnitB)) works. I set it to send a chat message, and I received the unit in question.
SetVariable(effectString, (CatalogFieldValueGet(c_gameCatalogWeapon, weaponUnitValue, "DisplayEffect", c_playerAny))) doesn't seem to work, though. When set to send a message, it says "no text found in parameter"...
I think my version of the SC2 Editor is either bugged or outdated. It's 1.4.1, and I can't get Convert Game Link to String to work... When I check the generated code for the triggers, the function is empty. It's just a pair of parenthesis with the parameter in the middle, without calling the function before...
Just like the String to GameLink you provided, but with different value types.
Return type String
New parameter, type Unit called InputUnit
New Local Variable called Type = (Unit type of InputUnit) <Unit Type>
New action, type Custom Script (return lv_type;)
This part is working, now. My problem seems to be with getting WeaponUnitValue = CatalogFieldValueGet(Units, Unit To String(InputUnit), "WeaponArray[0]", Any Player) <String> to work... Unit To String takes a Unit and gives back a string based on it's UnitType. But ingame I get an error saying that "entry" wasn't found in the CatalogFieldValueGet, so there's something going wrong in that Unit To String
Got it right, now, removed "effect2" altogether and put "return StringToGameLink(effectString);" as the last action of the function. But I still can't get the effect.. Something's not right with one of the "CatalogFieldValueGet" functions...
I think I got as close as I could, but I get a Syntax Error at the line where it tries to do
Effect2=EffectString
I'm pretty sure that's because the Effect2 is a GameLink-Effect variable, and EffectString is a String variable, and it won't convert. I just need to know how to convert it...
Thanks a lot, guys. This helped me progress, but I'm still stuck. While I (think) I've got the correct field path for Weapon (WeaponArray[0]) I can't find the field path for Damage Effect.
Hey, everyone. Just started dabbling with SC2 Map Editing today, and had fair progress, but I got stuck in a small problem:
I need to get the Game Link - Effect of an unit's base attack (and if possible, of any other ability, etc.) It's something that must be done automatically, because it can be any unit, so it's no use just choosing the correct effect for it. You think this would be possible? How would I do it?
PS. I did use the search function, so sorry if that was already posted. The keywords I used were yielding a lot of unrelated results, found nothing of this.
0
Hello, everyone. I'm building a map where I have a few custom units, and one of them is a Marine (a War Pig, actually) who is a sniper. I changed the weapon data, so it shoots like a Ghost and even uses the Snipe skill. But I would like to know if there's a way for me to (maybe using attachment points in the model?) change the Gauss Rifle shown in the character model to a Sniper Rifle (either the Ghost's, the Spectre's or Jim Raynor's, whichever works best)
0
How do I get the last clicked unit?0
Aaand, I'm done: http://www.sc2mapster.com/forums/resources/trigger-libraries/7277-third-person-shooter-tps-engine-download-if-you-need/?page=13#p253 <- Posted it here. Thanks a lot! :D
1.86779136741805
Hey, everyone. I tweaked it around, and here's the result:
Features:
0
Hey, I just found the solution. I used UnitWeaponGet instead of the catalog, and it worked wonders. I can get any unit's weapon now. Had to create a "WeaponToString" function though. I'll post the map when I'm done with it :D Thanks a lot!
0
Okay, let me go through my findings: StringToText(UnitToString(inputUnitB)) works. I set it to send a chat message, and I received the unit in question.
SetVariable(effectString, (CatalogFieldValueGet(c_gameCatalogWeapon, weaponUnitValue, "DisplayEffect", c_playerAny))) doesn't seem to work, though. When set to send a message, it says "no text found in parameter"...
0
I think my version of the SC2 Editor is either bugged or outdated. It's 1.4.1, and I can't get Convert Game Link to String to work... When I check the generated code for the triggers, the function is empty. It's just a pair of parenthesis with the parameter in the middle, without calling the function before...
0
Just like the String to GameLink you provided, but with different value types.
Return type String
New parameter, type Unit called InputUnit
New Local Variable called Type = (Unit type of InputUnit) <Unit Type>
New action, type Custom Script (return lv_type;)
0
This part is working, now. My problem seems to be with getting WeaponUnitValue = CatalogFieldValueGet(Units, Unit To String(InputUnit), "WeaponArray[0]", Any Player) <String> to work... Unit To String takes a Unit and gives back a string based on it's UnitType. But ingame I get an error saying that "entry" wasn't found in the CatalogFieldValueGet, so there's something going wrong in that Unit To String
0
Got it right, now, removed "effect2" altogether and put "return StringToGameLink(effectString);" as the last action of the function. But I still can't get the effect.. Something's not right with one of the "CatalogFieldValueGet" functions...
0
@Kueken531: Go
Didn't work. Syntax error when doing lv_effect2 = StringToGameLink(effectString);
And I searched, looks like there's only for GameLink to String, but not the inverse...
0
I think I got as close as I could, but I get a Syntax Error at the line where it tries to do
I'm pretty sure that's because the Effect2 is a GameLink-Effect variable, and EffectString is a String variable, and it won't convert. I just need to know how to convert it...
0
Thanks a lot, guys. This helped me progress, but I'm still stuck. While I (think) I've got the correct field path for Weapon (WeaponArray[0]) I can't find the field path for Damage Effect.
0
Hey, everyone. Just started dabbling with SC2 Map Editing today, and had fair progress, but I got stuck in a small problem: I need to get the Game Link - Effect of an unit's base attack (and if possible, of any other ability, etc.) It's something that must be done automatically, because it can be any unit, so it's no use just choosing the correct effect for it. You think this would be possible? How would I do it?
PS. I did use the search function, so sorry if that was already posted. The keywords I used were yielding a lot of unrelated results, found nothing of this.