my idea is to create a unit with multiple attacks (e.g. a stalker attack, a collosus attack, a marauder attack and so on). At the beginning this unit has 0 attacks and can add a number of attaks via upgrade.
Until now i created a unit with multiple attacks in the editor by simply adding an attack to the weapon array. This works fine.
But i cant figure out how to add an attack via upgrade.
I thought about something like adding all possible attacks beforehand, disable them and activate them later via upgrade. For this i couldnt find options in the editor. Or maybe it is possible to add an attack simply via update, but this i couldnt figure out either.
Any tips what i could try?
I don't think triggers would be the right choice. I have made (and still working on) the same topic as you toomuchtongueguy.
If you have already created a couple of working weapons, the rest should be easy for you:
disable every weapon in their own stats
add all your weapons to your unit.
setup some buttons like this :
"Research Water Pistol" (used on the research building)
"Water Pistol" (used at the unit stats window and if you like at the command card)
make upgrades for every weapon
they refer to the disable flag of the weapons
make some requirements like this
"Learn Water Pistol" (used on the research building)
"Have Water Pistol" (used at the unit)
make an ability for your research unit
add your upgrades there
use the "Learn ..." requirements as restricted requirement
The rest depends on ...
Does your unit use different turrets?
Do you really want to enable all your weapons to be usable at the same time ???
(Switching weapons during game play might be a better choice)
(Allowing only one or two weapons per unit might be an even better choice. Read here: Emplacement Crusta. In the uploaded version there is not the customization included, yet. I am having trouble with the animation of that f*ck turret o.O )
Thanks JanChris. This is exactly what i was looking for.
Yes i want to allow 4-5 weapons to be active at the same time. I tried also adding more which will work fine but more than 4-5 weapon will not be displayed in the ui. So i will limit it to this amount.
About your turret problem:
I set up one "main weapon" which will be linked to an arbitrary turret
all the other weapons are not linked to any turret type
I want to create a defense tower with these weapons, so it should not be overpowered ;)
Now i have a problem with enabling the weapon. I did as you suggested, add the weapon and disable it in his options. Then i build an upgrade and a researcg ability. Also i hide the weapon with the "hidden" weapon option. In my upgrade i deactivate the hidden and disable option for this weapon.
If i research this upgrade ingame the weapon shows up, but is still disabled.
Is there anything else i have to do with the upgrade to enable the weapon?
Step 2: Set Flag field to hidden,(to hide it ingame)
Step 3: Add 'none' value for modification weapon turret field(If your weapons use turret, if not ignore it and go step 4.)
Step 4: Add 'none' value for modification weapon weapons.
Step 5: Add 'none' value for modification weapon Enable.
This 'none' values required because if you let it empty, it can't be change in upgrade buff fields.(when I tested it, they won't work without this set up)
If you want Different weapons with different upgrades than you can reapet it "number of weapon" times.
for exmaple:
Stalker Weapon Buff
Colossus Weapon Buff
Marauder Weapon Buff
etc.
Step 6: Go to your weapons and set their options field to hidden,disable,(disable requires only if you want to it hide ingame).
Step 7: Creat and Upgrade and Set Data Reference: type=behavior, than field weapons enable 'none' to '"your weapon"'.
for example:
Stalker Weapon Upgrade, Set Data Reference: type=Behavior=Stalker Weapon Buff, weapons enable=Stalker Weapon.
Hi guys,
my idea is to create a unit with multiple attacks (e.g. a stalker attack, a collosus attack, a marauder attack and so on). At the beginning this unit has 0 attacks and can add a number of attaks via upgrade.
Until now i created a unit with multiple attacks in the editor by simply adding an attack to the weapon array. This works fine. But i cant figure out how to add an attack via upgrade. I thought about something like adding all possible attacks beforehand, disable them and activate them later via upgrade. For this i couldnt find options in the editor. Or maybe it is possible to add an attack simply via update, but this i couldnt figure out either. Any tips what i could try?
i found triggers to be perfect for this. Also takes so little code
I don't think triggers would be the right choice. I have made (and still working on) the same topic as you toomuchtongueguy.
If you have already created a couple of working weapons, the rest should be easy for you:
The rest depends on ...
@JanChris: Go
Thanks JanChris. This is exactly what i was looking for.
Yes i want to allow 4-5 weapons to be active at the same time. I tried also adding more which will work fine but more than 4-5 weapon will not be displayed in the ui. So i will limit it to this amount. About your turret problem:
The animation looks fine for me.
@toomuchtongueguy: Go
Don't you think a unit with 4-5 weapons might be a tiny little bit too overpower?
The animation is still not working. Read more here Howto inherit continued the position of attachment points?.
The actors and their events are still not understood by me to a satisfying degree. Nobody is perfect ... that's the reason for learning.
@JanChris: Go
I want to create a defense tower with these weapons, so it should not be overpowered ;)
Now i have a problem with enabling the weapon. I did as you suggested, add the weapon and disable it in his options. Then i build an upgrade and a researcg ability. Also i hide the weapon with the "hidden" weapon option. In my upgrade i deactivate the hidden and disable option for this weapon.
If i research this upgrade ingame the weapon shows up, but is still disabled. Is there anything else i have to do with the upgrade to enable the weapon?
Could always use disabled buffs to add the weapons as well.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Step 1: Creat a Behavior(type=Buff)
Step 2: Set Flag field to hidden,(to hide it ingame)
Step 3: Add 'none' value for modification weapon turret field(If your weapons use turret, if not ignore it and go step 4.)
Step 4: Add 'none' value for modification weapon weapons.
Step 5: Add 'none' value for modification weapon Enable.
This 'none' values required because if you let it empty, it can't be change in upgrade buff fields.(when I tested it, they won't work without this set up) If you want Different weapons with different upgrades than you can reapet it "number of weapon" times.
for exmaple: Stalker Weapon Buff
Colossus Weapon Buff
Marauder Weapon Buff
etc.
Step 6: Go to your weapons and set their options field to hidden,disable,(disable requires only if you want to it hide ingame).
Step 7: Creat and Upgrade and Set Data Reference: type=behavior, than field weapons enable 'none' to '"your weapon"'.
for example:
Stalker Weapon Upgrade, Set Data Reference: type=Behavior=Stalker Weapon Buff, weapons enable=Stalker Weapon.