Jump to content
Sign in to follow this  
Madin

Special power cursor question

Recommended Posts

I have a 'SpecialPowerDispatchSpecialPower' that controls a number of 'ActivateModuleSpecialPower' and 'GrantUpgradeAreaOfEffectSpecialPower' powers.

At the moment it is using a special power button that is in the units command buttons, that brings up the cursor (there is only a single allowed target).

 

What I would like is to not have to use the button, but for the special power cursor to come up when the mouse is placed over the single valid target.

The reason that I want to do this, is because I have some units whose command buttons are full (ie all four taken), so I would like for this power to activate in a manner similar to, for example, the Beam cannon and the way the charge defence cursor just comes up if you hover the mouse over a valid target (in that case an Obelisk).

 

Does anyone have any idea how (or if) that can be done. I know that there are a number of instances of this happening, but I imagine that a number of them (for example the C4 charge) are hard coded.

 

Thanks for any help or advice.

 

PS: This is for coding epic upgrades, so the special power will be across a large number of units.

PPS: The code is based off the Denato public Narv code.

Share this post


Link to post

work of the beamcannon special power:

 

SpecialPower_ChargeDefensesTrigger

 

<LogicCommand
        Options="NEED_TARGET_ALLY_OBJECT"
        Type="SPECIAL_POWER"
        id="Command_ChargeDefenses">
        <SpecialPower>SpecialPower_ChargeDefensesTrigger</SpecialPower>
    </LogicCommand>
 

but try to change the option to

<xs:enumeration value="NEED_TARGET_ENEMY_OBJECT"/>
 

have

SpecialPower_ChargeDefensesTrigger
 

trigger your special power dispatch

 

and change the object filter in the special power to match what you want to betargetable? not just obelisks

 

 

<SpecialPowerTemplate
        id="SpecialPower_ChargeDefensesTrigger"
        Flags="NEEDS_OBJECT_FILTER"
        ReloadTime="20s"
        TargetType="OBJECT"
        PreventConditions="OUT_OF_PHASE"
        NameOfVoiceNameToUseAsInitiateIntendToDoVoice="InitiateChargeDefensesTrigger" >
        <ObjectFilter
            Relationship="ALLIES"
            Rule="NONE">
            <IncludeThing>NODOBELISK</IncludeThing>  <--- you should be able to define your targets with this
        </ObjectFilter>
    </SpecialPowerTemplate>
 

have the logiccommand in your commandset but without a matching unitabilitybutton, thats how the beamcannon is set up

 

<LogicCommandSet
        id="NODBeamCannonCommandSet">
    <Cmd>Command_StanceDrillDown</Cmd>
        <Cmd>Command_ChargeDefenses</Cmd>  <--- has a command but no unitabilitybutton for it-- prob controled by the NEED_TARGET_ENEMY_OBJECT
        <Cmd>Command_ReflectorAttack</Cmd>
        <Cmd>Command_AttackMove</Cmd>
        <Cmd>Command_NodCallForTransportVehicle</Cmd>
    </LogicCommandSet>
 

worth a shot?

Edited by Ravendark

Share this post


Link to post

Cursors without the sp button are hardcoded with a combination of SP and KindOf.

  • Upvote 1

Share this post


Link to post

Cursors without the sp button are hardcoded with a combination of SP and KindOf.

That's what I was afraid of!

 

The only unit I really need it for is a C&C3 version of the Prodigy. Since it has a Blink pack, I can try and combine the power with the blink pack for the Prodigy version.

Edited by Madin

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.

×