You would use a requirement to restrict the building. I highly recommend you search this site (particularly the tutorials section) for information on how to achieve this.
I think this is a known bug. However, if you change the xp using triggers or data, the good news is that it will still return that modified value to the trigger, but the veterancy behavior just won't use the modified value.
My work-aroud is this:
Turn off the xp gain in the veterancy behavior.
Track the xp using a trigger, and add it to a variable.
Assign the xp manually using said trigger to your hero unit.
This works just fine for me. PM me if you need clarification!
No, a function is trying to access an array element that is beyond the declared array length. (Array is 5 elements, and the function is trying to access element 6, for example).
But, like TheAlmaity said, if you need help debugging, post the trigger and we will help.
So, after further troubleshooting, I've become convinced this is an issue with turret object not activating properly when the turret is created. I suspect error is caused because the turret in question is an attachment actor type, and not a unit actor type. I'm not 100% on this, but I suspect as well that when the modelAddition actor is created, the turret object doesn't always see it's creation (due to hierarchical issues), and therefore doesn't enable itself.
I think this might be a bug.
To bypass this, I have tried to use triggers to add the weapons onto the unit after it's creation, with no luck. I've also looking into using triggers to send the turret object a message when the unit is created, but there is currently no way to address a turret object through triggers (that I could find, anyway).
I have no other ideas for working around this issue. I will be reporting it to blizzard as a potential bug.
I am still interested in hearing from anyone who has any other ideas on the subject, or has encountered this issue themselves.
Thanks for your help, especially to DrSuperEvil.
Edit: I forgot to specify that I can only confirm this issue with Terran Barracks. I have not tested it with any other race or type of building.
Well, this one will teach you about applying and removing behaviors, and using validators to check those behaviors. It's a bit far off from what you want to do, but the core mechanics should help you understand what is needed.
Ok. Well that makes sense. I don't know a sure fire way to do this via data off the top of my head. I think a trigger would work better for you anyway, but if that's not an option..... Perhaps there is a way of creating a validator that can read if a hidden behavior is on or off the character. The ability wont' trigger without the validator, and the validator won't return unless the behavior is on the character. This would require 2 abilities in addition to the actual ability, 1 to apply the behavior and one to remove it.
edit for clarification: You could then add these behavior abilities to a button on the command card, which, of course, can use the hotkey to toggle.
I don't know if that will work, but that's the first thing that comes to mind.
Is there any particular reason they have to be able to right-click the ability? The reason I ask is, it would seem more intuitive to me to use a hotkey to use an ability, rather than use a hotkey to turn an ability on and off, unless it was a buff of some sort.
0
@tohaaaa: Go
You would use a requirement to restrict the building. I highly recommend you search this site (particularly the tutorials section) for information on how to achieve this.
0
@maverck: Go
Look at this tutorial. Best dialog tutorial I've found, and it will show you exactly what you need.
0
@Sandtrout: Go
There is, but it requires you export the sounds from the campaign to an external location, then import them into your custom melee map.
0
@ Orbiter1987
I think this is a known bug. However, if you change the xp using triggers or data, the good news is that it will still return that modified value to the trigger, but the veterancy behavior just won't use the modified value.
My work-aroud is this:
Turn off the xp gain in the veterancy behavior.
Track the xp using a trigger, and add it to a variable.
Assign the xp manually using said trigger to your hero unit.
This works just fine for me. PM me if you need clarification!
0
I believe this is because the text data type allows for formatting, while strings do not.
0
@MrZentors: Go
Go check out the tutorials section. They will teach you what you need.
0
@mrTerryBogard: Go
Instructions are here.
0
Mass Effect, Skyrim, and Tron all incredibly well done. I had a hard time deciding. Voted for Skyrim in the end.
0
@panda100123: Go
OneTwo made a tutorial about it, here.
0
@grenegg: Go
No, a function is trying to access an array element that is beyond the declared array length. (Array is 5 elements, and the function is trying to access element 6, for example).
But, like TheAlmaity said, if you need help debugging, post the trigger and we will help.
0
@Eiviyn: Go
Much easier than my idea. Good info to have.
0
So, after further troubleshooting, I've become convinced this is an issue with turret object not activating properly when the turret is created. I suspect error is caused because the turret in question is an attachment actor type, and not a unit actor type. I'm not 100% on this, but I suspect as well that when the modelAddition actor is created, the turret object doesn't always see it's creation (due to hierarchical issues), and therefore doesn't enable itself.
I think this might be a bug.
To bypass this, I have tried to use triggers to add the weapons onto the unit after it's creation, with no luck. I've also looking into using triggers to send the turret object a message when the unit is created, but there is currently no way to address a turret object through triggers (that I could find, anyway).
I have no other ideas for working around this issue. I will be reporting it to blizzard as a potential bug.
I am still interested in hearing from anyone who has any other ideas on the subject, or has encountered this issue themselves.
Thanks for your help, especially to DrSuperEvil.
Edit: I forgot to specify that I can only confirm this issue with Terran Barracks. I have not tested it with any other race or type of building.
0
@swanky_yankie: Go
Well, this one will teach you about applying and removing behaviors, and using validators to check those behaviors. It's a bit far off from what you want to do, but the core mechanics should help you understand what is needed.
0
@swanky_yankie: Go
Ok. Well that makes sense. I don't know a sure fire way to do this via data off the top of my head. I think a trigger would work better for you anyway, but if that's not an option..... Perhaps there is a way of creating a validator that can read if a hidden behavior is on or off the character. The ability wont' trigger without the validator, and the validator won't return unless the behavior is on the character. This would require 2 abilities in addition to the actual ability, 1 to apply the behavior and one to remove it.
edit for clarification: You could then add these behavior abilities to a button on the command card, which, of course, can use the hotkey to toggle.
I don't know if that will work, but that's the first thing that comes to mind.
0
@swanky_yankie: Go
Is there any particular reason they have to be able to right-click the ability? The reason I ask is, it would seem more intuitive to me to use a hotkey to use an ability, rather than use a hotkey to turn an ability on and off, unless it was a buff of some sort.