I would try Effect,X,Vitals.Life or Vitals.Life
Just so you know, the experience function thing isn't separate from veterancy behavior. It is the only way to add xp through triggers is what I was saying. It is used with the veterancy behavior.
You have to make an experience function. The function applys effects to the hero, the effects being Modify Unit effects that give certain amounts of xp. IE:
function parameters: Unit, XP (to give to it)
while XP >= 1000:
apply effect xp1000
xp = xp - 1000
while XP >= 100:
apply effect xp100
xp = xp - 100
while XP >= 10:
apply effect xp10
xp = xp - 10
while XP >= 1:
apply effect xp1
xp = xp - 1
this is not the most efficient way to do it (a bitmask would be better) but it works
edit: forgot the subractions
Thats exactly what Word of String does. You give it an index (1 or up) and it will get the word corresponding to the index. So -comm <integer> you would get index 2. If you wanted to store it in an integer variable then you would use the convert string to integer function.
My guess is that you have the tower selected, you click morph, and then it never sends the SelectionLocalUpdate.*.Stop to the previous level tower because you now have to level 2 tower selected. You never deselected the first level and you can't deselect it because it's gone. I think this is what you need to do on all the range actors:
AbilMorph.<Upgrade to next level morph>.Finish:
and on the next level tower you would have
AbilMorph.<Upgrade to this level morph>.Finish:
I found out how to get the kill experience a unit is supposed to give. You make a trigger for Unit dies event. You put a condition for if the hero is inside the vehicle and a condition to see if the Killing Unit is the vehicle. To get how much experience to give to the hero, you put a temporary string variable and set it to Catalog Field Value Get. The Catalog is the Preset: Unit, the entry is the game link to the Triggering Unit, the field is KillXP. You just pass that string as convert string to real to your hero xp function.
I don't really know a good way to do this, but here's what I know. You can add experience to a unit manually by making Modify Unit effects that add experience. You would make a bunch of these effects with different amounts and make a function that applies them so they give the unit the exact exp you want to give them. There is a tutorial on hero exp in the tutorials forum that has a function for this.
The second problem is figuring out how much xp to give the hero everytime the vehicle kills something. I don't know if theres a way to get the "Kill Experience" field from a unit's data with triggers. Otherwise you could do it all manually through triggers, but that's no fun. I can think of a couple of elaborate ways to do it with the data editor but they are probably really bad.
what is IntVar set to? if its set to 0 it wont work. the first word is index 1. i just tried this trigger exactly like yours and it works.
Game - Player Any Player types a chat message containing (Entered chat string), matching Exactly
(Entered chat string) == (Word 2 of "test words for chat string")
UI - Display (Text((Entered chat string))) for (All players) to Subtitle area
it shows "words" whenever i type "words"
Sorry for being vague, I think the best way would be to do this in the actions:
If ((Triggering unit) is Excluded: Air, Missile, Dead, Hidden for player 1) == true:
kill triggering unit
Edit: did it a better way
In your event, are you putting a variable that contains "Point 1" or is it a point already placed on the map? You could try setting a point variable to the point placed on the map, and then use the variable in the Event instead.
Units In Region Matching Condition
Unit Type: Any
Region: <your death region>
Player: Any Player
Unit Filter: Excluded: Air, Missile, Dead, Hidden
Count: Any Amount
Here's one way:
Have a trigger that does this
Event: Unit uses an ability
Condition: ability is <build ability>
if Triggering Ability Stage == Build Complete or triggering ability stage == build pause:
workers_building_unit_group remove triggering unit
workers_building_unit_group add triggering unit
workers building unit group is a unit group variable that will contain all workers currently building