Jump to content
Sign in to follow this  
Egozi44

A way to start cooldown with a trigger?

Recommended Posts

So I have some thing I want to do and my issue is with the cooldown

I added some ability to structure, the ability have cooldown and can't be pressable till some upgrade will be present, however the cooldown will begin regardless of the set conditions,

 

Sure it won't be pressable but it will keep load the ability till you get the upgrade and then you can active the ability right away, I don't want it to be this way,  Is there any way to make the ability's cooldown to Wait till you get the upgrade?

UnpauseSpecialPowerUpgrade in the gameobject behavior or forbidden upgrade in the special power xml don't work (I mean they are but not for the cooldown)
 

Edited by Egozi44

Share this post


Link to post

Maybe "StartsPaused= "true" will help here? or it will just cause it to be paused forever? xD
 

 

Edit... yup seem like it paused forever...  Dx

Edited by Egozi44

Share this post


Link to post

try startspaused but use the unpausespecialpowerupgrade module to trigger it. Additionaly add ObeyRechageOnTrigger= true to the unpausepsecialpower. Try that.

Share this post


Link to post
13 hours ago, Ravendark said:

try startspaused but use the unpausespecialpowerupgrade module to trigger it. Additionaly add ObeyRechageOnTrigger= true to the unpausepsecialpower. Try that.

Didn't work :/

That what I did:

<UnpauseSpecialPowerUpgrade 
                            id="0x4A45D5R05A66" 
                            Permanent="True" 
                            SpecialPowerTemplate="SpecialPowerBlaBla" 
                            ObeyRechageOnTrigger="True">
                            <TriggeredBy>Upgrade_RareCrate</TriggeredBy>
</UnpauseSpecialPowerUpgrade>

<SpecialPower 
              id="0xCCBE6448EE" 
              SpecialPowerTemplate="SpecialPowerBlaBla" 
              AvailableAtStart="False" 
              StartsPaused="true" 
              UpdateModuleStartsAttack="True">
  <AttributeModifierAffects Rule="UNPARSED"/>
  <RequirementsFilterMP Rule="UNPARSED"/>
  <RequirementsFilterStrategic Rule="UNPARSED"/>
</SpecialPower>

 

 

I think I came up with a better idea though, how about replacing the button with upgrade button? I need it to spawn a unit from the structure though (but not the same way as product/train it)

Is there any OCL code that can trigger after X upgrade been activated? Or maybe FireWeaponNugget that will trigger from the upgrade and will have OCL instead,

(I also hope the upgrade will work with the upgrade object code so it won't effect other structures... or else I will need to have 9 different upgrades ids Dx)

I can tell the unit to disable the upgrade upon death and it will crate loop (hopefully... cause if the upgrade button will decide it stop being pressalbe after the upgrade been purchased I screwed...)

 

 

Edit

I found CreateObjectNugget which also have RequiredUpgrade in the definitions,  however since I never used it before on a unit I don't sure how to add it to gameobject's behavior code...

Edited by Egozi44

Share this post


Link to post

How do you even come up with these ids?

Share this post


Link to post

 The blabla ones aren't the real id, the numbers and letters are what WED extracted

Share this post


Link to post

What weird version of WE do you have that it magically creates a 40bit integer out of a 32bit one?

Share this post


Link to post

buggy 1.08

 

WED also randomly does it to random things 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×