Giving a unit the selection icon when overlay
#1
Posted 03 January 2007 - 12:12 AM
#2
Posted 03 January 2007 - 12:17 AM
Bounding Box
If the model you are using does not have a bounding box already, you can add it using code, in order to simplify selection of the Object.
This is the typical code for a human-sized Object :
Geometry = CYLINDER GeometryMajorRadius = 8.0 GeometryMinorRadius = 8.0 GeometryHeight = 19.2 GeometryIsSmall = Yes Shadow = SHADOW_DECAL ShadowSizeX = 20; ShadowSizeY = 20; ShadowTexture = ShadowI;
edit the values accordingly, with the help of RenX (draw a box with the settings above, and see how it fits with your unit)
#3
Posted 03 January 2007 - 01:35 AM
;------------------------------------------------------------------------------ Object FireDragons ; *** ART Parameters *** Draw = W3DScriptedModelDraw ModuleTag_Draw DefaultModelConditionState Model = EXDrogoth_FW ;Texture = Drogoth_C.tga GBFire.tga ;Texture = Drogoth_C2.tga GBFire.tga ;Texture = DrogothArmor.tga GBFire.tga ; ParticleSysBone B_TAIL03 DrogothFlightFire FollowBone:yes ; ParticleSysBone B_TAIL03 DrogothFlightSmoke FollowBone:yes ParticleSysBone B_HEAD DrogothFlightSmoke FollowBone:yes ParticleSysBone B_HEAD DrogothFlightFire FollowBone:yes ParticleSysBone B_HEAD DrogothFlightFire FollowBone:yes ParticleSysBone B_HEAD DrogothFlightFire FollowBone:yes ParticleSysBone B_HEAD DrogothFlightFire FollowBone:yes End IdleAnimationState Animation = EXDrogoth_FW AnimationName = EXDrogoth_FW.EXDrogoth_FW AnimationMode = LOOP AnimationBlendTime = 0 End End End ; *** AUDIO Parameters ***; VoiceAttack = DrogothVoxAttack VoiceAttackCharge = DrogothVoxAttackCharge VoiceCreated = EVA:DrogothCreated VoiceFullyCreated = EVA:DrogothCreated VoiceFear = EVA:DrogothHelpMe VoiceGuard = DrogothVoxMoveMS VoiceMove = DrogothVoxMoveMS VoicePriority = 90 VoiceSelect = DrogothVoxSelect VoiceEnterStateAttack = DrogothVoxEnterStateAttack VoiceEnterStateAttackCharge = DrogothVoxEnterStateAttackCharge VoiceEnterStateAttackStructure = DrogothVoxEnterStateAttackBuilding SoundAmbient = DrogothVoxAmbientLoop SoundImpact = ImpactHorse SoundMoveStart = FellBeastMoveStart ; ***DESIGN parameters *** Side = Men DisplayName = OBJECT:FireDragons EditorSorting = UNIT VisionRange = VISION_FLIER ShroudClearingRange = SHROUD_CLEAR_FLIER Scale = 0.75 BuildCost = 750 BuildTime = 30 ShockwaveResistance = SHOCKWAVE_RESISTANCE_STRONG CommandSet = FireDragonCommandSet CommandPoints = 75 CrushableLevel = 2;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles WeaponSet ; Primary is for special powers. Weapon = SECONDARY NazgulPlowAttack PreferredAgainst = SECONDARY STRUCTURE MACHINE HORDE INFANTRY CAVALRY Weapon = TERTIARY NazgulClawAttack OnlyAgainst = TERTIARY MONSTER ReadyStatusSharedWithinSet = Yes End ArmorSet Conditions = None Armor = DrogothArmor DamageFX = FellBeastDamageFX End ; *** ENGINEERING Parameters *** RadarPriority = UNIT KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS SCORE NO_FREEWILL_ENTER SCARY MONSTER CANNOT_RETALIATE GIANT_BIRD Body = ActiveBody ModuleTag_Body MaxHealth = 2000.0 End Behavior = DestroyDie ModuleTag_DestroyDie End Behavior = BezierProjectileBehavior ModuleTag_Bezier FirstHeight = 9 ; Height of Bezier control points above highest intervening terrain SecondHeight = 9 FirstPercentIndent = 20%; Percentage of shot distance control points are placed SecondPercentIndent = 100% FlightPathAdjustDistPerSecond = 50; Can allow a max speed this can attempt to follow a target. Units are their velocity we can tag. (45 is default human speed) DetonateCallsKill = Yes CurveFlattenMinDist = 50.0 End #include "..\..\..\includes\StandardUnitEvaEvents.inc" Behavior = PhysicsBehavior ModuleTag_Physics KillWhenRestingOnGround = Yes GravityMult = 0.0 End Behavior = GiantBirdAIUpdate ModuleTag_GiantBirdAI AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS MoodAttackCheckRate = 500 AILuaEventsList = FellBeastFunctions FollowThroughDistance = 200 FollowThroughCheckStep = 50 FollowThroughGradient = 1.0 GrabTossTimeTrigger = 2.5 GrabTossHeightTrigger = 100.0 TossFX = FX_DiebyFalling SpecialContactPoints = Swoop AttackPriority = AttackPriority_FellBeast End LocomotorSet Locomotor = FellBeastLocomotor Condition = SET_NORMAL Speed = 75 End LocomotorSet Locomotor = FellBeastLocomotor; BALANCE FellBeast Condition = SET_SUPERSONIC Speed = 100 End LocomotorSet Locomotor = FellBeastLocomotor; BALANCE FellBeast Condition = SET_WANDER Speed = 78 End LocomotorSet Locomotor = FellBeastSwoopLocomotor; BALANCE FellBeast Condition = SET_PANIC Speed = 160 End Behavior = FXListDie ModuleTag_Die DeathTypes = ALL DeathFX = FX_DrogothFlamingProjectileExplosion End Behavior = StancesBehavior ModuleTag_StancesBehavior StanceTemplate = Hero End Geometry = CYLINDER GeometryMajorRadius = 30.0 GeometryMinorRadius = 30.0 GeometryHeight = 16.0 GeometryIsSmall = No End
#5
Posted 03 January 2007 - 01:54 AM
#6
Posted 03 January 2007 - 03:06 AM
#8
Posted 03 January 2007 - 10:14 AM
#9
Posted 03 January 2007 - 11:23 AM
it's just the cursor change when you move over something selectable (from arrow to animated square thing).
so the problem is probably that the unit is not selectable due to the absence of a bounding box
#11
Posted 03 January 2007 - 05:13 PM
#12
Posted 04 January 2007 - 12:25 AM
really, everyone should read it. it's not just crap, you know
Edited by 2playgames, 04 January 2007 - 12:26 AM.
Einstein: "We can’t solve problems by using the same kind of thinking we used when we created them."
#13
Posted 04 January 2007 - 04:16 PM
#14
Posted 04 January 2007 - 05:34 PM
Edited by 2playgames, 04 January 2007 - 08:24 PM.
#15
Posted 04 January 2007 - 08:43 PM
#16
Posted 05 January 2007 - 08:03 PM
i think the SDK documentation has a small bit about BBoxes
really, everyone should read it. it's not just crap, you know
Is there an SDK Documentation?
*checks*
Yes, there is!
Edit: I even found an typo.
Edited by Hard_Sander, 05 January 2007 - 08:12 PM.
#17
Posted 06 January 2007 - 06:36 PM
#18
Posted 06 January 2007 - 07:53 PM
just to clarify, a bbox (bounding box) is not the pulsing cursor, it's 3d box around your object. if the cursor touches that box it will change into the 'pulsing box'.by adding the SELECTABLE term to its KindOf a bbox appears for it
so the bag has always had a bbox, it just wasn't used
Einstein: "We can’t solve problems by using the same kind of thinking we used when we created them."
#19
Posted 06 January 2007 - 10:17 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users