The hard way: Use triggers. Create three variables. Two real varibles and a timer. One real variable would represent the real time cooldown and the other the displayed incorrect cooldown. There's unit A and unit B. The ability you want to sync cooldown to game time is in Unit A.
Trigger 1:
Event = TriggerAddEventUnitAbility(Ability you want to sync)
Action = Timer Start(The timer you created)
Trigger 2:
Event = TriggerAddEventUnitAbility(Morphing from unit A to unit B)
Action = Set Variable(Var: Incorrect cooldown variable, Val: UnitGetCooldown{Ability you want to sync} )
Trigger 3:
Event = TriggerAddEventTimePeriodic(dur: 0.1)
TriggerAddEvenUnitAbility(Morphing from unit B to unit A)
Action = Set Variable(Var: Real time cooldown variable, Val: TimerGetRemaining{t: The timer you created} )
UnitAbilityAddCooldown(inVal: ArithmeticReal{val1: Real time cooldown variable, op: minus, val2: Incorrect cooldown variable } )
Figured out myself. There's an easy way and the hard way.
The easy way: Just add the ability you want to share cooldown to both interchangeable units. Ex) Siege Tank Tank Mode and Siege Tank Siege Mode
And then just hide the ability in the command card for units you don't want to have the ability. I'm not sure if other methods to hide such as validator would work. But if it doesn't, then this method would be troublesome for abilities with auto cast since it can be casted whether or not it's hidden
I have an ability on my siege tank with cooldowns and I want the cooldown to be active and therefore to decrease over time even after the unit is sieged into another form.
For example, if the unit is in Tank mode and I use the ability, when I morph to Siege mode the cooldown would just stop elapsing. The cooldown remains the same as it was the last moment this unit was in tank mode.
The text shown on chat is the remaining cooldown of the ability. You can see that even after a lot of time has passed in Siege mode, the cooldown was halted. How can I resume the cooldown? Tried using triggers but couldn't find an action modifying the cooldown. They just wouldn't work
Hi I think I'm having several problems with my mengsk units.
First of all when I first opened the mengsk dependency file, all of the Royal guard(Except Blackhammer, the Thor unit) units had two models overlapped. Probably created by UnitRevive.(Name) - Create in actors cause when I removed the line the problems just simply disappeared. Never knew why but might be related to other problems. How it's like:
Secondly, 'some' units attack is dealt twice. Some don't. For example Siege tanks (Tank mode, unsieged) attack only once but Siege tanks (Siege mode) attacks twice. And Aegis Guard(Marauder) attacks twice but all of the other units don't. I'm not sure if they're firing two projectiles because to the naked eye I can't tell the difference. Here's an image of the unit shooting one
I am trying to make a veterancy system and I'm using triggers to gain xp. Basically i just want to gain xp from the enemies not from my own units or my allies units dying. Should I just use Comparison((UnitGetOwner((EventUnit()))),!=1)? I believe this would still gain xp from our allies? Does anyone have an idea?
I've been trying to make an endless attack wave that goes towards the player's base. But I want this to be applied to other maps as well. As I try to make an extension mod something like I said before, I realized I cannot place any relay points or gather points. Is it even possible to make the attack wave head for the player's base wherever it is, as an extension mod? If so how?
This is the triggers I'm using. It's about adding XP whenever a unit kills anything and it works. But only once. I want it to occur every time a unit kills something. Why is this happening?
0
The hard way: Use triggers. Create three variables. Two real varibles and a timer. One real variable would represent the real time cooldown and the other the displayed incorrect cooldown. There's unit A and unit B. The ability you want to sync cooldown to game time is in Unit A.
Trigger 1:
Event = TriggerAddEventUnitAbility(Ability you want to sync)
Action = Timer Start(The timer you created)
Trigger 2:
Event = TriggerAddEventUnitAbility(Morphing from unit A to unit B)
Action = Set Variable(Var: Incorrect cooldown variable, Val: UnitGetCooldown{Ability you want to sync} )
Trigger 3:
Event = TriggerAddEventTimePeriodic(dur: 0.1)
TriggerAddEvenUnitAbility(Morphing from unit B to unit A)
Action = Set Variable(Var: Real time cooldown variable, Val: TimerGetRemaining{t: The timer you created} )
UnitAbilityAddCooldown(inVal: ArithmeticReal{val1: Real time cooldown variable, op: minus, val2: Incorrect cooldown variable } )
0
Figured out myself. There's an easy way and the hard way.
The easy way: Just add the ability you want to share cooldown to both interchangeable units. Ex) Siege Tank Tank Mode and Siege Tank Siege Mode
And then just hide the ability in the command card for units you don't want to have the ability. I'm not sure if other methods to hide such as validator would work. But if it doesn't, then this method would be troublesome for abilities with auto cast since it can be casted whether or not it's hidden
0
I have an ability on my siege tank with cooldowns and I want the cooldown to be active and therefore to decrease over time even after the unit is sieged into another form.
For example, if the unit is in Tank mode and I use the ability, when I morph to Siege mode the cooldown would just stop elapsing. The cooldown remains the same as it was the last moment this unit was in tank mode.
Here's an representation. https://vimeo.com/562643111
The text shown on chat is the remaining cooldown of the ability. You can see that even after a lot of time has passed in Siege mode, the cooldown was halted. How can I resume the cooldown? Tried using triggers but couldn't find an action modifying the cooldown. They just wouldn't work
0
Have you tried changing the construction mover?
0
You need to add an event named UnitMovementUpdate,*, Walk/AnimClear (Specify Name)
0
In reply to mangmury:
Finally worked it out.
First you need to disable the melee initialization thingy using triggers. If you're using an extension mod you'll have to make a trigger like this:
https://imgur.com/a/2gJfRor
Then you use triggers to gain xp:
https://imgur.com/a/5C11IjT
0
Hi I think I'm having several problems with my mengsk units.
First of all when I first opened the mengsk dependency file, all of the Royal guard(Except Blackhammer, the Thor unit) units had two models overlapped. Probably created by UnitRevive.(Name) - Create in actors cause when I removed the line the problems just simply disappeared. Never knew why but might be related to other problems. How it's like:
https://vimeo.com/545324421
Secondly, 'some' units attack is dealt twice. Some don't. For example Siege tanks (Tank mode, unsieged) attack only once but Siege tanks (Siege mode) attacks twice. And Aegis Guard(Marauder) attacks twice but all of the other units don't. I'm not sure if they're firing two projectiles because to the naked eye I can't tell the difference. Here's an image of the unit shooting one
https://imgur.com/a/VIMCBB0
And to the main question: The units just stand there like they're stunned after it sieges/unsieges. How it's like:
https://vimeo.com/545324325
Did anyone experience the same problem? I couldn't find a way to solve them.
0
I am trying to make a veterancy system and I'm using triggers to gain xp. Basically i just want to gain xp from the enemies not from my own units or my allies units dying. Should I just use Comparison((UnitGetOwner((EventUnit()))),!=1)? I believe this would still gain xp from our allies? Does anyone have an idea?
0
I've been trying to make an endless attack wave that goes towards the player's base. But I want this to be applied to other maps as well. As I try to make an extension mod something like I said before, I realized I cannot place any relay points or gather points. Is it even possible to make the attack wave head for the player's base wherever it is, as an extension mod? If so how?
0
This is the triggers I'm using. It's about adding XP whenever a unit kills anything and it works. But only once. I want it to occur every time a unit kills something. Why is this happening?
0
In reply to BummKnallPeng:
I found the CM_Mengsk_VeterencyEarned file but I have no clue how to change this XD
0
I am new to this sc2 editor thing but I wanted to make the veterancy system for mengsk units work and maybe add a few more ranks.
But for some reason the units won't gain experiences even after I tweaked a few options(I am not an expert :c)
Could someone help me