Hello there !
I'm having a problem coding a kindof hunting system. Here's the scenario.
I'm using monster lairs replaced with animals, so the player can kill the animals (here rabbits). But the problem is I tried changing my code and searching indefinitely for it, I did not find what was making a unit attackable or not. So you can't kill the bunnies and that's my problem.
If you could help me, it would be awesome.
Here's the code:
Object Rabbit Draw = W3DScriptedModelDraw ModuleTag_01 DefaultModelConditionState Model = CURabbit1_SKN End IdleAnimationState StateName = STATE_Idle Animation = IdleB AnimationName = CURabbit1_SKL.CURabbit1_IDLA AnimationPriority = 10 AnimationMode = ONCE End BeginScript Prev = CurDrawablePrevAnimationState() if Prev == "STATE_Alert" then CurDrawableSetTransitionAnimState("TRANS_AlertToIdle") end EndScript End AnimationState = MOVING WANDER Animation = WLKA AnimationName = CURabbit1_SKL.CURabbit1_WLKA AnimationBlendTime = 20 AnimationMustCompleteBlend = yes End End AnimationState = MOVING PANICKING Animation = RUNA AnimationName = CURabbit1_SKL.CURabbit1_RUNA AnimationMode = LOOP End Flags = RANDOMSTART End AnimationState = MOVING StateName = STATE_moving Animation = Moving AnimationMode = LOOP AnimationName = CURabbit1_SKL.CURabbit1_WLKA End Flags = RANDOMSTART End TransitionState = TRANS_AlertToIdle Animation = CURabbit1_IDLD AnimationName = CURabbit1_SKL.CURabbit1_IDLD AnimationMode = ONCE End End TransitionState = TRANS_IdleToAlert Animation = ATNA AnimationName = CURabbit1_SKL.CURabbit1_IDLC AnimationMode = ONCE End End AnimationState = EMOTION_ALERT StateName = STATE_Alert Animation = ALERT_1 AnimationName = CURabbit1_SKL.CURabbit1_IDLB AnimationMode = ONCE End BeginScript Prev = CurDrawablePrevAnimationState() if Prev == "STATE_Idle" then CurDrawableSetTransitionAnimState("TRANS_IdleToAlert") end EndScript Flags = RESTART_ANIM_WHEN_COMPLETE ; acts like an idle animation & keeps running the animations. End AnimationState = DYING DEATH_1 Animation AnimationName = CURabbit1_SKL.CURabbit1_IDLA AnimationMode = LOOP End End AnimationState = DYING Animation = CURabbit1_DIEA AnimationName = CURabbit1_SKL.CURabbit1_DIEA AnimationMode = ONCE End End End ; ***DESIGN parameters *** EditorSorting = UNIT TransportSlotCount = 1 ArmorSet Conditions = None Armor = NoArmor DamageFX = None End VisionRange = 121 DisplayName = OBJECT:Prop CrushableLevel = 0 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles ; *** ENGINEERING Parameters *** RadarPriority = NOT_ON_RADAR KindOf = PRELOAD SELECTABLE PATH_THROUGH_EACH_OTHER PATH_THROUGH_INFANTRY GRAB_AND_DROP HAS_HEALTH_BAR CREEP Body = ActiveBody ModuleTag_02 MaxHealth = 1.0 End Behavior = AnimalAIUpdate ModuleTagWanderAround FleeRange = 200 ; how close enemies have to be before we panic FleeDistance = 800 ; how far the animal will run once spooked WanderPercentage = 10 ;percentage of the time we should move MaxWanderDistance = 50 ;maximum distance to move at once MaxWanderRadius = 1000 ; how far to wander on our own UpdateTimer = 10000 ; temp disable 9 ; how often do we want to check for enemies End LocomotorSet Locomotor = HumanLocomotor Condition = SET_NORMAL Speed = 9 End LocomotorSet Locomotor = HumanLocomotor Condition = SET_PANIC Speed = 33 End Behavior = PhysicsBehavior ModuleTag_04 End Behavior = SlowDeathBehavior ModuleTag_FadeoutDeath DeathTypes = NONE +FADED DeathFlags = DEATH_1 FadeDelay = 0 FadeTime = 3500 DestructionDelay = 4000 End Behavior = SlowDeathBehavior ModuleTag_05 DeathTypes = ALL -FADED SinkDelay = 600000 SinkRate = 0.40 ; in Dist/Sec DestructionDelay = 700000 End Behavior = SquishCollide ModuleTag_06 End Geometry = CYLINDER GeometryMajorRadius = 0.8 GeometryHeight = 0.8 GeometryIsSmall = No Shadow = SHADOW_DECAL End
Thanks a lot for your attention and your help ! ^^