I have two weapons added to the Reaper. Both weapons attack the same targets. One is disabled from the start via a behaviour. When an upgrade is reaserched, the starting weapon becomes disabled, and the new weapon becomes enabled. You can see it on the pictures below.
Problems:
1) Both weapons are visible in the unit info area from the start.
2) It says "disabled" on the grey weapon icons.
This just looks bad. Is it possible to only have ONE weapon visible all the time in the unit info area?
(When the upgrade is researched, the weapon is just replaced.)
Of course it is.
Easiest way would be to create two behaviors that will add two different weapons to your unit.
Then, make two validators for these behaviors - one returning false when upgrade is researched
and one returning false when upgrade is NOT researched.
Put these validators in behaviors' Behavior: Validator (Disable) field.
Now, if you apply both behaviors to your unit it will add desired weapon depending on state of the upgrade.
I do as you describe: Both behaviors are added to the Reaper. I use Player requirement - validators. When the upgrade is researched the weapon becomes switched. So it works so far.
The problem is that both weapons are still visible all the time, BOTH before and after the upgrade.
I want one weapon to replace the old one. (And only one weapon icon.)
I know and easiest way, as you said there's and upgrade which switch from one weapon to another. Just put the weapon you want to use when upgrade is researched on its Weapon: Options + field to be Hidden and Disabled. In the upgrade just do this but with the weapon you want to kick and enabling and making visible the other weapon.
Hello.
I have two weapons added to the Reaper. Both weapons attack the same targets. One is disabled from the start via a behaviour. When an upgrade is reaserched, the starting weapon becomes disabled, and the new weapon becomes enabled. You can see it on the pictures below.
Problems:
1) Both weapons are visible in the unit info area from the start. 2) It says "disabled" on the grey weapon icons.
This just looks bad. Is it possible to only have ONE weapon visible all the time in the unit info area? (When the upgrade is researched, the weapon is just replaced.)
Hi,
Of course it is.
Easiest way would be to create two behaviors that will add two different weapons to your unit.
Then, make two validators for these behaviors - one returning false when upgrade is researched
and one returning false when upgrade is NOT researched.
Put these validators in behaviors' Behavior: Validator (Disable) field.
Now, if you apply both behaviors to your unit it will add desired weapon depending on state of the upgrade.
Regards
I do as you describe: Both behaviors are added to the Reaper. I use Player requirement - validators. When the upgrade is researched the weapon becomes switched. So it works so far.
The problem is that both weapons are still visible all the time, BOTH before and after the upgrade.
I want one weapon to replace the old one. (And only one weapon icon.)
Hi,
I'm not sure what is the problem.
Check attached map. You will see that after 10 seconds marine weapon will switch.
Modified Tabs are: Units; Behaviors; Upgrades; Validators; Requirements;
@Kabelkorven: Go
I know and easiest way, as you said there's and upgrade which switch from one weapon to another. Just put the weapon you want to use when upgrade is researched on its Weapon: Options + field to be Hidden and Disabled. In the upgrade just do this but with the weapon you want to kick and enabling and making visible the other weapon.
Weapons have a hidden flag. I guess you can check/uncheck it through the same upgrade you used to enable/disable.
Thank you for all your help.
I looked at your map maticpl. I had done something wrong with the requirement. I fixed it and now it works.
Thank you!