Hello everyone, I'm currently making a complex unit, so I will have new questions coming that I will post later on.
So basically, I'm doing a "Parasite" unit, that can "infest" any other units (It infests the target unit on the head). So I did a simple model that is attached to SOPAttachHead when a dummy behavior is applied to the "infested" unit from the dummy infest ability. Model works fine, but here comes my problem :
• I need to hide the real unit while it is "attached" to another unit. So I did a "hide" action on the triggering unit. Problem is: selection. How can I make the "Parasite" visual on the infested unit selectable, but only by the owner of the parasite (Let's say that you would select the parasite automatically when you click on the infested unit) ? Or is there a proper way with actors to make a model addition selectable (but only for allies/player ?)
Thank you again in advance for your help SC2Mapster !
that's why i asked if it has to be selected. if thats the case you have to attach a unit to a unit. i attached an example map. your might have to move the unit in 3D.
Oh ok, that's rather simple, just a loop moving constantly the unit with the other unit. But how can I make it attached to the head of the "host" unit ? Also, is there a way to make the "PArasite" only selectable by owner player while he infests another unit ?
All right I found a way ! For anyone reading this and having the same problem as me, do as follow :
• Make a non-unit dummy model addition attached to the head, created when a dummy behavior is on
• Remove Collision and add invulnerability to your unit when she "infests" another unit
• Set Actor opacity of your parasite to 0 when the No collision buff is on (see previous bullet point)
• In triggers, like FunkyUserName said, make your parasite unit teleport in a loop every 0.01 to the triggering ability target unit location, WITH A BLEND
• That's it, dragging your mouse over the host unit will give only the triggering player the selection of the parasite. All other players (particularly enemies) will select the host automatically. :)
Thank all of you guys for your help, particularly you Funky, I think we're starting to know each other <3 ;), so I can say I love you now :3
all right, so I got everything working well, but now I'm trying to give a fraction of the ressources the host unit is harvesting/gaining to my parasite while it is infesting. I didn't find any triggers related to the income coming from a unit. I would need that, because there are different types of units in the game, some gets ressources by attacking, others by harvesting with an ability, and I need my "parasite" to gain those ressources, no matter where they come from.
Thank you again for your help in advance Sc2Mapster :)
Is there a way to refer to the exact quantity that the unit just harvested tho ? For exemple if the parasite is on a worker gaining 10 minerals each trip, I want my parasite (player) to gain those 10 minerals like the worker was his. Same thing if my parasite is on a unit gaining minerals each time it attacks. Would you know how to do that too ? :)
Ugh, I'm working on XP currently (I didn't had time to look at resources yet), and I have a problem.
I want my parasite to gain 20XP every time the hosts attacks. I tried everything : I setted a trigger modifying the Parasite's XP (I know the trigger is good because if I change "Experience" property" to Life instead, it works), I tried applying an effect that modifies the Parasite's XP, I tried applying a behavior modifying the Parasite's XP, I tried creating and killing a hidden dummy unit with the wanted XP gain (I'm not sure if I did this one correctly). Nothing works. I think the problem is with the veterancy behavior of my unit. Is there something special I need to do for the behavior to accept that XP from the triggers/effects ?
If you have any other solutions or ideas, it would be greatly appreciated.
Hmmm another question for you guys also. Right now when my parasite "infests" a host unit, everything is fine, it's hidden etc, except for its pathing. The host unit can't build any structures while infested because it gets in the way of the building. Is there a way via trigger to make the parasite flying, or to remove the "ground" pathing, or do you have any other ideas ??
My bad, I forgot to add the attributes to the behaviors of the unit ' Thanks !
For the mover of the unit, can you explain me catalogs ? I never used those, I don't even know where there are and what they do ...
And another question : I have an ability that applies stacks of 2 different behaviors on my host unit. Is there a way to show how many stacks of each behavior (a number) are applied to the host unit ? Is there a way to create a little number (modifiable) on the button of the command card, or anywhere else ??
catalogs are trigger actions to change values of data entries on a per player basis.
you can get the number of stacks of a behaviour in triggers. you can use this information for many things. settings charges of an ability, add your own dialog, use UI-editor to add to unit information. really up to you where to show this info.
All right, I have many questions concerning charges, they seemed pretty ... Fucked up ?
1) I'm trying to add 1 charge to one of my abilities (has a 10 Max charges, but starts at 0). So I tried adding a "used charges" of -1 via trigger, and a modify unit effect adding a -1 used charge to my ability, but each time, it increases the charges by 8, not by 1. Does anyone have any explanation for this ? Could someone explain me how to manage charges ?
2) I have a learn ability, and I would like some abilities to cost more than 1 charge to upgrade/learn. Is that possible ? I tried putting "charges-used" to 4 under the learn ability command of my specific ability, but it still costs 1 charge. (I thought about adding an additionnal cost via triggers, but couldn't find a requirement checking charges of an ability to only enable the learn ability when the player has at least the cost charges available).
1) try setting starting value and using value to 1 (and max value anything greater than 0) and try again with triggers.
2) use requirements to determine how many points to spend are available and remove the addiotnal ones with triggers (set starting points -1 of learn ability with catalogs)
Ok for the first one it was my stupid mistake, it worked, it's just that in my trigger I had "Unit uses abilty at any stage", and there are 8 stages to default abilities so ... You get my problem
For the second point, how would you make such a requirement ?? Could you give me little bit more details.
Also, another question. In the trigger "Add used charge for ability", how do you do the link with a learn ability ? I setted "charge" field to "Abil/NameofMyAbility" and "ability" field to my ability, but it doesn't work. It works for all other abilities, but not the "learn" types ...
keep track of the available points with a dummy buff which is also used in the requirement. add one stack with lvl up (lvl up effect of veterancy) and remove one stack when using the learn ability + the additional points you want to remove.
the number of points to spend is the "points" field
if you really want to get the charges you also need to specify the index of the learn ability (i assume).
after some tests you can't set the charges of an ability with array, neither with triggers nor with an modify unit effect.
Hello everyone, I'm currently making a complex unit, so I will have new questions coming that I will post later on.
So basically, I'm doing a "Parasite" unit, that can "infest" any other units (It infests the target unit on the head). So I did a simple model that is attached to SOPAttachHead when a dummy behavior is applied to the "infested" unit from the dummy infest ability. Model works fine, but here comes my problem :
• I need to hide the real unit while it is "attached" to another unit. So I did a "hide" action on the triggering unit. Problem is: selection. How can I make the "Parasite" visual on the infested unit selectable, but only by the owner of the parasite (Let's say that you would select the parasite automatically when you click on the infested unit) ? Or is there a proper way with actors to make a model addition selectable (but only for allies/player ?)
Thank you again in advance for your help SC2Mapster !
that's why i asked if it has to be selected. if thats the case you have to attach a unit to a unit. i attached an example map. your might have to move the unit in 3D.
Oh ok, that's rather simple, just a loop moving constantly the unit with the other unit. But how can I make it attached to the head of the "host" unit ? Also, is there a way to make the "PArasite" only selectable by owner player while he infests another unit ?
Thank you again for your help btw :P
All right I found a way ! For anyone reading this and having the same problem as me, do as follow :
• Make a non-unit dummy model addition attached to the head, created when a dummy behavior is on
• Remove Collision and add invulnerability to your unit when she "infests" another unit
• Set Actor opacity of your parasite to 0 when the No collision buff is on (see previous bullet point)
• In triggers, like FunkyUserName said, make your parasite unit teleport in a loop every 0.01 to the triggering ability target unit location, WITH A BLEND
• That's it, dragging your mouse over the host unit will give only the triggering player the selection of the parasite. All other players (particularly enemies) will select the host automatically. :)
Thank all of you guys for your help, particularly you Funky, I think we're starting to know each other <3 ;), so I can say I love you now :3
I'm back with another question guys !
all right, so I got everything working well, but now I'm trying to give a fraction of the ressources the host unit is harvesting/gaining to my parasite while it is infesting. I didn't find any triggers related to the income coming from a unit. I would need that, because there are different types of units in the game, some gets ressources by attacking, others by harvesting with an ability, and I need my "parasite" to gain those ressources, no matter where they come from.
Thank you again for your help in advance Sc2Mapster :)
Event: unit uses ability "harvest" at stage "HarvestStageDropOff"
Event: PlayerEffectUsed "incomeEffect" "anyplayer"
Thank you (again) for your help ! :D
Is there a way to refer to the exact quantity that the unit just harvested tho ? For exemple if the parasite is on a worker gaining 10 minerals each trip, I want my parasite (player) to gain those 10 minerals like the worker was his. Same thing if my parasite is on a unit gaining minerals each time it attacks. Would you know how to do that too ? :)
there is an event player property changed. use global variables to save the latest change.
Ugh, I'm working on XP currently (I didn't had time to look at resources yet), and I have a problem.
I want my parasite to gain 20XP every time the hosts attacks. I tried everything : I setted a trigger modifying the Parasite's XP (I know the trigger is good because if I change "Experience" property" to Life instead, it works), I tried applying an effect that modifies the Parasite's XP, I tried applying a behavior modifying the Parasite's XP, I tried creating and killing a hidden dummy unit with the wanted XP gain (I'm not sure if I did this one correctly). Nothing works. I think the problem is with the veterancy behavior of my unit. Is there something special I need to do for the behavior to accept that XP from the triggers/effects ?
If you have any other solutions or ideas, it would be greatly appreciated.
Thank you again !
Hi,
have you already deleted this melee stuff in the map ini ?
If not delete and try again.
Shows your unit already a progression bar and level ?
Yes I did that a long, long time ago aha ! thanks for the help tho :)
Hmmm another question for you guys also. Right now when my parasite "infests" a host unit, everything is fine, it's hidden etc, except for its pathing. The host unit can't build any structures while infested because it gets in the way of the building. Is there a way via trigger to make the parasite flying, or to remove the "ground" pathing, or do you have any other ideas ??
it's possible to change the mover of the unit via upgrades, so it should be possible to change from ground to air via catalogs.
can you change the xp of the parasite while it didnt infest anything yet?
@FunkyUserName: Go
My bad, I forgot to add the attributes to the behaviors of the unit ' Thanks !
For the mover of the unit, can you explain me catalogs ? I never used those, I don't even know where there are and what they do ...
And another question : I have an ability that applies stacks of 2 different behaviors on my host unit. Is there a way to show how many stacks of each behavior (a number) are applied to the host unit ? Is there a way to create a little number (modifiable) on the button of the command card, or anywhere else ??
catalogs are trigger actions to change values of data entries on a per player basis.
you can get the number of stacks of a behaviour in triggers. you can use this information for many things. settings charges of an ability, add your own dialog, use UI-editor to add to unit information. really up to you where to show this info.
All right, I have many questions concerning charges, they seemed pretty ... Fucked up ?
1) I'm trying to add 1 charge to one of my abilities (has a 10 Max charges, but starts at 0). So I tried adding a "used charges" of -1 via trigger, and a modify unit effect adding a -1 used charge to my ability, but each time, it increases the charges by 8, not by 1. Does anyone have any explanation for this ? Could someone explain me how to manage charges ?
2) I have a learn ability, and I would like some abilities to cost more than 1 charge to upgrade/learn. Is that possible ? I tried putting "charges-used" to 4 under the learn ability command of my specific ability, but it still costs 1 charge. (I thought about adding an additionnal cost via triggers, but couldn't find a requirement checking charges of an ability to only enable the learn ability when the player has at least the cost charges available).
1) try setting starting value and using value to 1 (and max value anything greater than 0) and try again with triggers.
2) use requirements to determine how many points to spend are available and remove the addiotnal ones with triggers (set starting points -1 of learn ability with catalogs)
Ok for the first one it was my stupid mistake, it worked, it's just that in my trigger I had "Unit uses abilty at any stage", and there are 8 stages to default abilities so ... You get my problem
For the second point, how would you make such a requirement ?? Could you give me little bit more details.
I know it would look like this :
USE
Greater than or equal to
Count ?????
Constant : 4
SHOW
Also, another question. In the trigger "Add used charge for ability", how do you do the link with a learn ability ? I setted "charge" field to "Abil/NameofMyAbility" and "ability" field to my ability, but it doesn't work. It works for all other abilities, but not the "learn" types ...
keep track of the available points with a dummy buff which is also used in the requirement. add one stack with lvl up (lvl up effect of veterancy) and remove one stack when using the learn ability + the additional points you want to remove.
the number of points to spend is the "points" field
if you really want to get the charges you also need to specify the index of the learn ability (i assume).
after some tests you can't set the charges of an ability with array, neither with triggers nor with an modify unit effect.