SC2Mapster Forums

Development > Data

Trying to attach an actor and destroy it.

  • 9 posts
    #1 Aug 22, 2013 at 01:45 UTC - 0 likes

    Hey all, I'm kinda stuck on this problem...

    So I have a unit picking up an item, which gives it a behavior. I'm trying to creating a cool looking aura type thing for this behavior.

    What I'm trying to do: Have some kind of special actor get attached to a unit and then remove it when the behavior ends.
    What I have:

    Aura Actor Events:
    Behavior AURA on
    Behavior AURA off

    This creates my Aura actor on the unit, but as soon as it is destroyed I can't click back on original unit, it becomes unselectable?

    I think my method of attaching actors is wrong and how to destroy them.
    What is the common method for this?

    Last edited Aug 22, 2013 by Juxtapozition

    Looking for a data editor for a tactical shooter. PM for application.

    #2 Aug 22, 2013 at 04:32 UTC - 0 likes

    That sounds about right, could you post the XML data of the actor?

    #3 Aug 22, 2013 at 19:43 UTC - 0 likes

    @Kueken531: Go

    How do I post the XML data of the actor?

    #4 Aug 22, 2013 at 19:47 UTC - 0 likes

    @Juxtapozition: Go

    Theres an option in flags + that says Allow Hit Test, Make sure thats off. this bug happens to me from time to time.

    Last edited Aug 22, 2013 by RedeyesFrenzyDragon
    #5 Aug 22, 2013 at 20:32 UTC - 0 likes

    @RedeyesFrenzyDragon: Go

    This didn't seem to work :/
    Do I disable that on the original actor or the actor being added?

    #7 Aug 23, 2013 at 15:25 UTC - 0 likes
    Quote from Juxtapozition: Go

    @Kueken531: Go

    How do I post the XML data of the actor?

    You switch to XML view (CTRL + 3), then select your actor. It should highlight the first line of XML data of your actor, the actor looks like this:

        (previous actor)
        <CActorBla id="MyActor" parent="SomeParent" Some=OtherStuff>  <!-- this line should be highlighted-->
               (a bunch of stuff)
        (next actor)

    There will probably be a lot more entrys like this, make sure to only copy the actor you want to share.
    Copy everyhing between these 2 tags (including the tags themselves) to pastebin or in your post.

    Last edited Aug 23, 2013 by Kueken531
    #8 Aug 23, 2013 at 16:23 UTC - 0 likes

    @Kueken531: Go

    Here's the xml for the actor being attached:
    <CActorUnit id="SpeedBoost" parent="GenericUnitStandard" unitName="DefensiveWall45GateLargeEastLowered">
    <EditorCategories value=""/>
    <On Terms="Behavior.SpeedBoost.Off" Send="Destroy"/>
    <On Terms="Item.SpeedBoost" Send="Create"/>
    <Model value="SpeedBoost"/>
    <Scale value="0.100000"/>
    <BuildModel value="RedFlag"/>
    <DeathArray index="Normal" ModelLink="RedFlag"/>
    <PlacementModel value="RedFlag"/>
    <HighlightTooltip value="Unit/Name/Bogus"/>
    <ModelFlags index="AllowHitTest" value="0"/>

    and here's the xml for the actor it is being attached to:

    <CActorUnit id="xGhost" parent="GenericUnitStandard" unitName="xReaper">
    <Macros value="UnloadDropAnim"/>
    <EditorCategories value=""/>
    <On index="45" Terms="Abil.TacNukeStrike.SourceCastStart" Send="AnimPlay SpellA Spell,A"/>
    <On index="46" Terms="Abil.TacNukeStrike.SourceCastStop" Send="AnimClear SpellA"/>
    <On index="47" Terms="Abil.TacNukeStrike.SourceChannelStart" Send="AnimPlay SpellB Spell,B PlayForever"/>
    <On index="48" Terms="Abil.TacNukeStrike.SourceChannelStop" Send="AnimClear SpellB"/>
    <On index="49" Terms="Abil.TacNukeStrike.SourceFinishStart" Send="AnimPlay SpellC Spell,C"/>
    <On Terms="Abil.TacNukeStrike.SourceFinishStop" Send="AnimClear SpellC"/>
    <On Terms="Abil.Snipe.SourceCastStart" Send="AnimBaselineStop"/>
    <On Terms="Abil.Snipe.SourceCastStart" Send="AnimPlay SpellA Spell,A"/>
    <On Terms="Abil.Snipe.SourceCastStop" Send="AnimClear SpellA"/>
    <On Terms="Abil.Snipe.SourceCastStop" Send="AnimBaselineStart"/>
    <On Terms="Abil.Snipe.SourceChannelStart" Send="AnimPlay SpellB Spell,B PlayForever"/>
    <On Terms="Abil.Snipe.SourceChannelStop" Send="AnimClear SpellB"/>
    <On Terms="Abil.Snipe.SourceFinishStart" Send="AnimPlay SpellC Spell,C"/>
    <On Terms="UnitMovementUpdate.*.Walk; AnimPlaying SpellC" Send="AnimBracketStop Desecrate Instant"/>
    <On Terms="Abil.EMP.SourceCastStart" Send="AnimPlay SpellC Spell,C 0 0.000000 0.300000"/>
    <On Terms="Abil.attack.ReadyStart" Send="AnimGroupApply Ready"/>
    <On Terms="Behavior.GhostHoldFireB.On" Send="AnimGroupApply Cover"/>
    <On Terms="Behavior.GhostHoldFireB.On" Send="AnimPlay MorphStart Cover,Start"/>
    <On Terms="Behavior.GhostHoldFireB.On" Send="AnimClear MorphEnd"/>
    <On Terms="Behavior.GhostHoldFireB.Off" Send="AnimPlay MorphEnd Cover,End"/>
    <On Terms="Behavior.GhostHoldFireB.Off" Send="AnimClear MorphStart"/>
    <On Terms="Behavior.GhostHoldFireB.Off" Send="AnimGroupRemove Cover"/>
    <On Terms="WeaponStart.*.AttackStart; WeaponTargetElevation GE 20.000000" Send="AnimBracketStart Attack Attack,Superior"/>
    <On Terms="WeaponStart.*.AttackStart; WeaponTargetElevation LE -20.000000" Send="AnimBracketStart Attack Attack,Inferior"/>
    <On Terms="WeaponStart.*.AttackStart" Send="AnimBracketStart Attack Attack {} {} 0 -0.100000"/>
    <On Terms="WeaponStop.*.AttackStop" Send="AnimBracketStop Attack"/>
    <On Terms="Abil.attack.ReadyStop" Send="AnimGroupRemove Ready"/>
    <On Terms="Abil.EchoRifle.SourceCastStart" Send="AnimBracketStart Desecrate Attack {} Stand ContentNonLooping,ContentPlayOnce 0.450000 AsDuration"/>
    <On Terms="Abil.PulseRifle.SourceCastStart" Send="AnimBracketStart Desecrate Attack {} Stand ContentNonLooping,ContentPlayOnce 0.450000 AsDuration"/>
    <On Terms="Abil.StormStriker.SourceCastStart" Send="AnimBracketStart Desecrate Attack {} Stand ContentNonLooping,ContentPlayOnce 0.450000 AsDuration"/>
    <On Terms="Behavior.VoidChanneling.On" Send="AnimBracketStart ae {} Attack {} OpeningPlayForever"/>
    <On Terms="Abil.VoidRayChannel.SourceChannelStart" Send="AnimPlay ae Spell,B PlayForever"/>
    <On Terms="Abil.VoidRayChannel.SourceChannelStop" Send="AnimClear Beam1"/>
    <On Terms="Behavior.VoidChanneling.Off" Send="AnimClear Beam1"/>
    <On Terms="Effect.CreateUnitSlivanCreep" Send="AnimClear Beam1"/>
    <On Terms="Behavior.VoidChanneling.Off" Send="AnimBracketStop ae"/>
    <Scale value="1.450000,1.450000,1.630000"/>
    <AnimBlendTime value="-0.800000"/>
    <EventDataFootprint index="0" Actor="" Model=""/>
    <EventDataSound index="0" Actor=""/>
    <DeathArray index="Normal" ModelLink="GhostDeath" SoundLink="Ghost_Explode"/>
    <DeathArray index="Blast" ModelLink="GhostDeathBlast"/>
    <DeathArray index="Disintegrate" ModelLink="GhostDeathAcid" SoundLink="Uni_DeathFXAcid"/>
    <DeathArray index="Eviscerate" ModelLink="GhostDeathEviscerate" SoundLink="Uni_DeathFXEviscerate"/>
    <DeathArray index="Fire" ModelLink="GhostDeathFire" SoundLink="Uni_DeathFXFire"/>
    <DeathCustoms index="0" ModelLink="" Name=""/>
    <DeathCustoms index="1" ModelLink="" Name=""/>
    <DeathCustoms index="2" ModelLink="" Name=""/>
    <DeathCustoms index="3" ModelLink="" Name=""/>
    <PortraitModel value="GhostPortrait"/>
    <WalkAnimMoveSpeed value="2.25"/>
    <AbilSoundArray AbilCmd="GhostCloak,On" Sound="Ghost_CloakOnVO"/>
    <AbilSoundArray AbilCmd="EMP,Execute" Sound="Ghost_EmpVO"/>
    <AbilSoundArray AbilCmd="TacNukeStrike,Execute" Sound="Ghost_NuclearStrikeVO"/>
    <BarHeight value="1"/>
    <BarOffset value="50"/>
    <BarWidth value="42"/>
    <Image value="Assets\Textures\"/>
    <HeroIcon value="Assets\Textures\"/>
    <HighlightTooltip value="Unit/Name/xGhost"/>
    <LifeArmorIcon value="Assets\Textures\"/>
    <SelectAbilCmd value="EMP,Execute"/>
    <UnitIcon value="Assets\Textures\"/>
    <Image value="Assets\Textures\"/>
    <Model value="Ghost2"/>
    <BuildModel value="Ghost2"/>
    <PlacementModel value="Ghost2"/>
    <SoundArray index="Ready" value="Ghost_Ready"/>
    <SoundArray index="Help" value="Ghost_Help"/>
    <SoundArray index="What" value="Ghost_What"/>
    <SoundArray index="Yes" value="Ghost_Yes"/>
    <SoundArray index="Attack" value="Ghost_Attack"/>
    <SoundArray index="Pissed" value="Ghost_Pissed"/>
    <ModelFlags index="AllowHitTest" value="0"/>

    Last edited Aug 23, 2013 by Juxtapozition
    #9 Aug 24, 2013 at 06:06 UTC - 0 likes

    Do not use a Unit type actor as an attachment, any unit can only support one unit actor in its scope. Use a Model actor instead (for attachments, I usually use type Model, based on Model Animation Style Continuous)

    Also do not try to change your existing Unit type actor to a Model type, it produces a lot of strange errors. Delete it and create a new one from scratch.

    Last edited Aug 24, 2013 by Kueken531
    #10 Aug 25, 2013 at 19:01 UTC - 0 likes

    You can also use range and splat type actors too.

  • 9 posts

You must login to post a comment. Don't have an account? Register to get one!