• 0

    posted a message on Issue with ability targeting over 'space' terrain.

    My intent is to have land terrain which represent planets, that have a Landing Pad structure on them. Outside of these planets there is space terrain. In space, near each Landing Pad, is a Space Beacon. A unit with the "SpaceTravel" ability merely has to right click on a Landing Pad, and they are moved to the nearest Space Beacon, and look like a drop ship.

    The Ability applies "ChooseTransportEffect" which is a Switch that checks a Unit Type Validator for either the Landing Pad or Space Beacon unit type. The Switch chooses either "TransportSet" if the caster need to goto space, or "LandSet" if the caster needs to go to the planet. Each set applies two Behaviors, and runs a Modify Unit Effect.

    The "TransportSet" applies a permanent buff called "DropshipTransportation" which removes the caster's combat capabilities, and abilities. Units also have an Actor Event which changes their model to a dropship (or overlord / warp prism). The "TransportSetHeight" effect causes the unit to be raised 8 units to make them the same height as flying units are in space.

    The "LandSet" applies a temporary buff called "GSickness" which removes "DropshipTransporation" and makes the unit slower for a short amount of time. The "LandSetHeight" lowers the unit by 8 units.

    Both of the sets apply a behavior which lasts only for a second, which has an initial effect that applies a Search Behavior ("TransportFindTarget" and "LandFindTarget") These searches find the proper building, via Unit Type Validators, then apply a Transport effect to the target. The caster is then transported to the target.

    Again, works fine when they are both on ground, but not when one is on space. The caster seems to be infinitely trying to approach the building, and the ability seems to be continuing to target which the caster tries.

        <CAbilEffectTarget id="SpaceTravel">
            <EditorCategories value="AbilityorEffectType:Units"/>
            <Effect index="0" value="ChooseTransportEffect"/>
            <Flags index="RequireTargetVision" value="0"/>
            <Flags index="Smart" value="1"/>
            <TargetFilters value="Psionic,Structure,Invulnerable;Player,Ally,Enemy"/>
            <Range value="500"/>
        </CAbilEffectTarget>
    
        <CEffectApplyBehavior id="ApplyTransportBehavior">
            <EditorCategories value=""/>
            <WhichUnit Value="Caster"/>
            <Behavior value="DropshipTransportation"/>
        </CEffectApplyBehavior>
        <CEffectApplyBehavior id="ApplyTransportBehavior2">
            <ValidatorArray index="0" removed="1"/>
            <EditorCategories value=""/>
            <WhichUnit Value="Caster"/>
            <Behavior value="OrbitalTransporterFind"/>
        </CEffectApplyBehavior>
        <CEffectSwitch id="ChooseTransportEffect">
            <EditorCategories value=""/>
            <CaseArray Validator="IsTransportUp" Effect="TransportSet" FallThrough="1"/>
            <CaseArray Validator="IsTransportDown" Effect="LandSet" FallThrough="1"/>
        </CEffectSwitch>
        <CEffectApplyBehavior id="LandApplyLandBehaviorFind">
            <ValidatorArray index="0" removed="1"/>
            <EditorCategories value=""/>
            <Marker Link="Effect/ApplyTransportBehavior2"/>
            <WhichUnit Value="Caster"/>
            <Behavior value="TeleportFindTargetonGround"/>
        </CEffectApplyBehavior>
        <CEffectApplyBehavior id="LandApplyWeakenedBehavior">
            <ValidatorArray index="0" removed="1"/>
            <EditorCategories value=""/>
            <Marker Link="Effect/ApplyTransportBehavior"/>
            <WhichUnit Value="Caster"/>
            <Behavior value="GSickness"/>
        </CEffectApplyBehavior>
        <CEffectModifyUnit id="LandSetHeight">
            <EditorCategories value=""/>
            <ImpactUnit Value="Caster"/>
            <Height value="-8"/>
        </CEffectModifyUnit>
        <CEffectEnumArea id="TransportFindTarget">
            <EditorCategories value=""/>
            <SearchFilters value="Psionic,Structure,Invulnerable;Self"/>
            <AreaArray MaxCount="1" Radius="10" Effect="TransportTeleport"/>
            <MaxCount value="1"/>
        </CEffectEnumArea>
        <CEffectEnumArea id="LandFindTarget">
            <EditorCategories value=""/>
            <Marker Link="Effect/TransportFindTarget"/>
            <SearchFilters value="Psionic,Structure,Invulnerable;Self"/>
            <AreaArray MaxCount="1" Radius="10" Effect="LandTeleport"/>
            <MaxCount value="1"/>
        </CEffectEnumArea>
        <CEffectSet id="TransportSet">
            <EditorCategories value=""/>
            <EffectArray value="ApplyTransportBehavior"/>
            <EffectArray value="TransportSetHeight"/>
            <EffectArray value="ApplyTransportBehavior2"/>
            <ValidatorArray value="IsTransportUp"/>
        </CEffectSet>
        <CEffectSet id="LandSet">
            <ValidatorArray value="IsTransportDown"/>
            <EditorCategories value=""/>
            <Marker Link="Effect/TransportSet"/>
            <EffectArray value="LandApplyWeakenedBehavior"/>
            <EffectArray value="LandSetHeight"/>
            <EffectArray value="LandApplyLandBehaviorFind"/>
        </CEffectSet>
        <CEffectModifyUnit id="TransportSetHeight">
            <EditorCategories value=""/>
            <ImpactUnit Value="Caster"/>
            <Height value="8"/>
        </CEffectModifyUnit>
        <CEffectTeleport id="TransportTeleport">
            <EditorCategories value=""/>
            <WhichUnit Effect="TransportFindTarget" Value="Source"/>
            <PlacementArc value="360"/>
            <PlacementAround Value="TargetUnitOrPoint"/>
            <PlacementRange value="5"/>
            <Range value="50"/>
            <TargetLocation Value="TargetUnitOrPoint"/>
            <ValidatorArray value="IsTransportDown"/>
            <MinDistance value="0"/>
            <TeleportFlags index="TestFog" value="0"/>
            <SourceLocation Value="SourceUnitOrPoint"/>
        </CEffectTeleport>
        <CEffectTeleport id="LandTeleport">
            <ValidatorArray value="IsTransportUp"/>
            <EditorCategories value=""/>
            <Marker Link="Effect/TransportTeleport"/>
            <WhichUnit Effect="LandFindTarget" Value="Source"/>
            <MinDistance value="0"/>
            <PlacementArc value="360"/>
            <PlacementAround Value="TargetUnitOrPoint"/>
            <PlacementRange value="5"/>
            <Range value="50"/>
            <SourceLocation Value="SourceUnitOrPoint"/>
            <TargetLocation Value="TargetUnitOrPoint"/>
            <TeleportFlags index="TestFog" value="0"/>
        </CEffectTeleport>
    
        <CBehaviorBuff id="DropshipTransportation">
            <InfoIcon value="Assets\Textures\btn-ability-terran-setrallypoint.dds"/>
            <BehaviorCategories index="Permanent" value="1"/>
            <EditorCategories value="AbilityorEffectType:Units"/>
            <Modification>
                <ModifyFlags index="Detected" value="1"/>
                <StateFlags index="SuppressAttack" value="1"/>
                <StateFlags index="SuppressBuildOn" value="1"/>
                <StateFlags index="SuppressCloak" value="1"/>
                <StateFlags index="SuppressDetection" value="1"/>
                <StateFlags index="SuppressRadar" value="1"/>
            </Modification>
            <RemoveValidatorArray value="HasNotLanded"/>
        </CBehaviorBuff>
        <CBehaviorBuff id="GSickness">
            <Alignment value="Negative"/>
            <Cost>
                <Charge Link="Behavior/DropshipTransportation"/>
                <Cooldown Link="Behavior/DropshipTransportation"/>
            </Cost>
            <InfoIcon value="Assets\Textures\btn-ability-neutral-ursadonleap.dds"/>
            <BehaviorCategories index="Temporary" value="1"/>
            <EditorCategories value="AbilityorEffectType:Units"/>
            <Duration value="10"/>
            <Modification MoveSpeedMultiplier="0.5" AttackSpeedMultiplier="0.5">
                <ModifyFlags index="Detected" value="1"/>
                <DeathResponse>
                    <Cost>
                        <Charge Link="Behavior/DropshipTransportation"/>
                        <Cooldown Link="Behavior/DropshipTransportation"/>
                    </Cost>
                </DeathResponse>
            </Modification>
            <DamageResponse>
                <Cost>
                    <Charge Link="Behavior/DropshipTransportation"/>
                    <Cooldown Link="Behavior/DropshipTransportation"/>
                </Cost>
            </DamageResponse>
        </CBehaviorBuff>
        <CBehaviorBuff id="OrbitalTransporterFind">
            <InfoFlags index="Hidden" value="1"/>
            <EditorCategories value="AbilityorEffectType:Units"/>
            <Duration value="0.1"/>
            <InitialEffect value="TransportFindTarget"/>
        </CBehaviorBuff>
        <CBehaviorBuff id="TeleportFindTargetonGround">
            <Cost>
                <Charge Link="Behavior/OrbitalTransporterFind"/>
                <Cooldown Link="Behavior/OrbitalTransporterFind"/>
            </Cost>
            <InfoFlags index="Hidden" value="1"/>
            <EditorCategories value="AbilityorEffectType:Units"/>
            <Duration value="0.1"/>
            <InitialEffect value="LandFindTarget"/>
            <Modification>
                <DeathResponse>
                    <Cost>
                        <Charge Link="Behavior/OrbitalTransporterFind"/>
                        <Cooldown Link="Behavior/OrbitalTransporterFind"/>
                    </Cost>
                </DeathResponse>
            </Modification>
            <DamageResponse>
                <Cost>
                    <Charge Link="Behavior/OrbitalTransporterFind"/>
                    <Cooldown Link="Behavior/OrbitalTransporterFind"/>
                </Cost>
            </DamageResponse>
        </CBehaviorBuff>
    
    Posted in: Data
  • 0

    posted a message on Issue with ability targeting over 'space' terrain.

    No. The only validators I use are to check the unit type of the target structure.

    Ability (Effect with Target) -Effect (Set of two behavior placers): Place behaviors on caster. -Behavior A (Buff): Permanent buff to denote 'on ground' or 'in space'. The actor has an event to replace the marine's model with a dropship when the 'in space' behavior is on, and swap back to a marine when it is removed. -Behavior B (Buff): Runs an effect. -Effect (Search): Finds the corresponding building. Beacon if on ground, landing pad if in space. Run an effect on this building. -Effect (Teleport): Teleports the buff placer to the building. -Validator: Ensures that the target of this effect is the right building.

    As mentioned, it works fine when both are on regular ground. I realize that I could do the order differently to ensure they are in range before placing the model change buff, but the buildings can't move or die, and therefore will always in range.

    Posted in: Data
  • 0

    posted a message on Issue with ability targeting over 'space' terrain.

    I have created a unit ability which, when targeted on a specific building, teleports the unit using the ability to a corresponding second building, and the opposite.

    The ability works fine when both buildings are on standard terrain.

    I have 'space' terrain, lowest level cliff with the space background. I have added ground pathing to this 'space' terrain, and added one of the teleport buildings to the space area. I have marines (for instance) which can teleport from ground, to space, but cannot teleport back. When using the ability on the building in space, the marine gets as close as possible to the building, and continues to attempt to use the ability, but never does. The ability's targeting UI remains on the building, so I know they are still trying to target it.

    I have attempted to change the range of the ability, making it usable from anywhere on the map, and the problem persists. I have tinkered with the unit, the ability, the pathing, yet nothing seems to change this. Thoughts?

    Posted in: Data
  • 0

    posted a message on Click fires event 2 times

    If it ALWAYS triggers twice, why don't you have a toggle variable for each player.

    Click 1 -> Toggle Variable -> Run Code Click 2 -> Variable is Toggled -> Do Nothing -> Toggle Variable

    This seems to be what Paranoiks was suggesting as well, I don't see the issue if this always toggles twice.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Resurrection of the old maps

    Llythia: The Forgotten Caves?

    Someone already mentioned The Thing - that was great as well!

    Posted in: Miscellaneous Development
  • 0

    posted a message on Changing Texture for a Unit

    You spelled your own name wrong.

    Seriously though - I think you should be looking into multiple model variations, like the civilian unit. I am not quite sure how this works and would love an answer to this question as well.

    Posted in: Data
  • To post a comment, please or register a new account.