Jump to content


Photo

my horde wont die and disappear


  • Please log in to reply
5 replies to this topic

#1 ZenBKage

ZenBKage

    Ini Coder/BFME2 Arcade Edition Creater

  • Hosted
  • 427 posts

Posted 30 May 2006 - 07:59 AM

i made a horde using the blackrider horses. they spawn great and everything. but the problem lies in when they die. they dont die. they stay on the field of play. the child object for the mounted version is the one i duplicated so i could just spawn that object minus the rider of course. the other thing to i noticed is that the normal horde selection ring isnt shown here on the bottom left. its still using the hero icon around each one but if u click on it it still acts and moves all together as a horde.

ive posted 2 lots of code. the first lot is the childobject of the unit u can see above. the second is of the horde im using to create it.

i used the gondor cavalry horde code to duplicate the horde. this small bit of code here bothers me because there is no horde skin or model for this unit.

ModelConditionState = WORLD_BUILDER
			Model = HordeMarkGUKni
		End
	End


Posted Image


;------------------------------------------------------------------------------
ChildObject EvilMenBlackRiderUnMounted EvilMenBlackRider

	Draw = W3DScriptedModelDraw ModuleTag_W3DModelDrawInWorldBuilder
	   ;When in Worldbuilder, show the mounted version of the Black Rider!
		
		OkToChangeModelColor = Yes
		
		DefaultModelConditionState
			Model = None
		End
		ModelConditionState = WORLD_BUILDER
			Model = MUBlkRider_SKN
		End		
	End

	ArmorSet
		Conditions	  = MOUNTED
		Armor		   = KnightArmor;CavalryArmor
		DamageFX		= NormalDamageFX
	End
	
	CommandSet = EvilMenBlackRiderUnMountedCommandSet

	CommandPoints = 6
	BuildCost			= 500
	BuildTime			= 30

	KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS SCORE GRAB_AND_DROP CAVALRY ARMY_SUMMARY HEAVY_MELEE_HITTER

   ;--- AUDIO Parameters ---

	SoundMoveStart				= GondorHorseMoveStart

   ;-------
	Behavior = SpecialPowerModule ModuleTag_HorseToggleStarter					  
		SpecialPowerTemplate		= SpecialAbilityToggleMounted
		UpdateModuleStartsAttack	= Yes
	   	StartsPaused				= No
	End
	Behavior = ToggleMountedSpecialAbilityUpdate ModuleTag_HorseToggle
		 SpecialPowerTemplate			= SpecialAbilityToggleMounted
		 MountedTemplate				= MordorFellBeast
		 SynchronizeTimerOnSpecialPower	= SpecialAbilityScreech SpecialAbilityBlackRiderMorgulBlade SpecialAbilityHaradrimArcherSummon
		 UnpackTime					  = 2000
		 PreparationTime		 		= 0
		 PackTime						= 0
		 OpacityTarget					= .0
		 AwardXPForTriggering			= 0
		 IgnoreFacingCheck				= Yes
	End

	Behavior = ModelConditionUpgrade ModuleTag_MakeUsMounted
		TriggeredBy			= Upgrade_MordorFaction Upgrade_WildFaction Upgrade_IsengardFaction Upgrade_MenFaction Upgrade_ElfFaction Upgrade_DwarfFaction
		AddConditionFlags	= MOUNTED
		Permanent			= Yes
End

	Behavior = SubObjectsUpgrade ForgedBlade_Upgrade
		TriggeredBy		= Upgrade_DainRoyalGuard
		HideSubObjects	= NAZGUL_SKIN
	End
Body			= ActiveBody ModuleTag_02
	MaxHealth			= 50
End

End

Object EvilMenBlackRiderUnMountedHorde

	// This is required for garrisoned objects - please put in all objects.
	ButtonImage		= WOR_GondorKnights
	SelectPortrait	= UPGondor_Knight

	Draw = W3DScriptedModelDraw ModuleTag_W3DModelDraw
		DependencySharedModelFlags = EMOTION_ALERT EMOTION_MORALE_HIGH EMOTION_MORALE_LOW EMOTION_AFRAID EMOTION_COWER SELECTED EMOTION_TERROR EMOTION_LOOK_TO_SKY
		DefaultModelConditionState
			Model = None //InvisHrdeTmp5x1
		End
		ModelConditionState = HORDE_EMPTY
			Model = None
		End		
		ModelConditionState = WORLD_BUILDER
			Model = HordeMarkGUKni
		End
	End
	
	Side = Mordor
	EditorSorting = UNIT
	EmotionRange = 240
	DisplayName = OBJECT:BlackRiders
	DisplayNameStrategic = CONTROLBAR:LW_Unit_BlackRiders
	DescriptionStrategic = CONTROLBAR:LW_ToolTip_BlackRiders
	
	WeaponSet
		Conditions = None 
		Weapon = PRIMARY	NormalMeleeHordeRangefinder
	End
	
	CommandSet = EvilMenBlackRiderUnMountedHordeCommandSet


	// *** AUDIO Parameters ***//
	// Note: Don't put voice parameters here -- they will be ignored. Voice play requests
	// are always passed through to members
	#include "..\..\..\includes\StandardHordeEvaEvents.inc"

	BuildCost 			= 500
	BuildTime 			= 30 
	VisionRange 			= GONDOR_KNIGHT_HORDE_VISION_RANGE
	VisionSide 			= 35%
	VisionRear 			= 25%
	MaxVisionBonusPercent		= 300%
	VisionBonusTestRadius		= 200
	VisionBonusPercentPerFoot 	= 5.0%
	ShroudClearingRange 		= GONDOR_KNIGHT_HORDE_SHROUD_RANGE	
	
	CommandPoints = 60
		  
	FormationWidth = 2 // Width it occupies in formations. Current choices are 1 or 2.
	FormationDepth = 1 // Depth it occupies in formations. Current choices are 1 or 2.
	
	CrushableLevel = 2  //What am I?:		0 = for infantry, 1 = for trees, 2 = general vehicles
	CrusherLevel = 1 
	MinCrushVelocityPercent = 50% // Has to be moving at at least 25% of full speed.
	CrushDecelerationPercent = 50 // Lose 10 percent (100/5 horde members) of max velocity when crushing.
	CrushKnockback = 40  // how hard we knock back crushed units.
	CrushZFactor = 1.0  // How much we knock upwards.
		
	
	TransportSlotCount = TRANSPORTSLOTCOUNT_SMALL_HORDE
	KindOf = SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAVALRY HORDE MELEE_HORDE ARMY_SUMMARY LARGE_RECTANGLE_PATHFIND//UNATTACKABLE 
	
	Body = ImmortalBody ModuleTag_ImmortalBody
		MaxHealth = 1
	End
	
	ThreatLevel = GONDOR_KNIGHT_HORDE_THREAT
	ThreatBreakdown GondorKnightHorde_DetailedThreat
		AIKindOf = CAVALRY
	End
	
	#include "..\..\..\includes\CaptureBuilding.inc"
	
	Behavior = StancesBehavior ModuleTag_StancesBehavior
		StanceTemplate = CavalryHorde
	End
	
	Behavior = HordeAIUpdate ModuleTag_HordeAIUpdate
		AutoAcquireEnemiesWhenIdle	= Yes ATTACK_BUILDINGS
		MoodAttackCheckRate			= 500
		MaxCowerTime				= 5000
		MinCowerTime				= 3000
		AILuaEventsList				= CavalryFunctions  
		AttackPriority				= AttackPriority_Cavalry
	End

	Behavior = HorseHordeContain ModuleTag_HordeContain
		
		FrontAngle = 270
		FlankedDelay = 2000
		ObjectStatusOfContained = 
		InitialPayload = EvilMenBlackRiderUnMounted  GOOD_RIDER_LARGE_HORDE_SIZE
		Slots = 10
		PassengerFilter = NONE +CAVALRY
		ShowPips = No
		ThisFormationIsTheMainFormation = Yes	//Used to determine which armorset to use (and anything else we want!)
		RandomOffset=X:0 Y:0
		MeleeBehavior = Amoeba
		End

		RankInfo = RankNumber:1 UnitType:EvilMenBlackRiderUnMounted Position:X:40 Y:0		Position:X:40 Y:15		Position:X:40 Y:-15		Position:X:40 Y:30		Position:X:40 Y:-30 
		RankInfo = RankNumber:2 UnitType:EvilMenBlackRiderUnMounted Position:X:10 Y:0 Leader 1 0	Position:X:10 Y:15 Leader 1 1	Position:X:10 Y:-15 Leader 1 2	Position:X:10 Y:30 Leader 1 3	Position:X:10 Y:-30 Leader 1 4
		
		RanksToReleaseWhenAttacking = 1 2

		MeleeAttackLeashDistance = 1   //How far the hordes	can	move from the center of	the	horde when melee attacking.				  
		BackUpMinDelayTime		 = 1	//The minimum amount of	time to	delay before backing up
		BackUpMaxDelayTime		 = 3000	//The maximum amount of	time to	delay before backing up
		BackUpMinDistance		 = 1	//The minimum number of	cells to backup
		BackUpMaxDistance		 = 3	//The maximum number of	cells to backup
		BackupPercentage		 = 80%	//The amount of	chance that	a unit will	back up.	
	End
	
	
	

	Behavior = HordeNotifyTargetsOfImminentProbableCrushingUpdate ModuleTag_NotifyCrushScan
		ScanWidth = 70.0; A little less than the width of the horde (which is 2 * 40 = 80)
	End

	Behavior = PhysicsBehavior ModuleTag_PhysicsBehavior
		GravityMult = 1.0
	End
	
	Behavior = EmotionTrackerUpdate	Module_EmotionTracker
		TauntAndPointDistance		=	INFANTRY_TAUNT_POINT_RADIUS		// max distance to taunted/pointed objet
 		TauntAndPointUpdateDelay	=	1000	// how often scan (milliseconds)
 		TauntAndPointExcluded		=	NONE
 		AfraidOf					=	EMOTION_AFRAIDOF_OBJECTFILTER
		AlwaysAfraidOf				=	EMOTION_ALWAYS_AFRAIDOF_OBJECTFILTER
 		PointAt						=	EMOTION_POINTAT_OBJECTFILTER
 		HeroScanDistance			=	150
 		FearScanDistance			=	INFANTRY_FEAR_SCAN_RADIUS
 		
		AddEmotion			=	Terror_Base
		AddEmotion			=	Doom_Base
		AddEmotion			=   BraceForBeingCrushed_Base
		AddEmotion			=	UncontrollableFear_Base
		AddEmotion			=	FearIdle_Base
		AddEmotion			=	FearBusy_Base
		AddEmotion			=	Point_Base
		AddEmotion			=	Taunt_Base
 		AddEmotion			=	CheerIdle_Base
		AddEmotion			=	CheerBusy_Base
		AddEmotion			=	HeroCheerIdle_Base
		AddEmotion			=	HeroCheerBusy_Base
		AddEmotion			=	Alert_Base
		AddEmotion				=   CheerForAboutToCrush_Base
 	End	
	
	LocomotorSet
		Locomotor	 = NormalCavalryHordeLocomotor 
		Condition	 = SET_NORMAL
		Speed		 = 75
	End

	Behavior = ProductionUpdate ProductionUpdateModuleTag
		GiveNoXP = Yes
	End

	Behavior = PickupStuffUpdate ModuleTag_PickupStuffUpdate
		SkirmishAIOnly = Yes
		StuffToPickUp = NONE +CRATE
		ScanRange = 200
		ScanIntervalSeconds = 0.5
	End
	
	/////////////////////
	// AISpecialPowers
	/////////////////////
	
	Behavior = AISpecialPowerUpdate GondorKnightHordeCaptureBuildingAI
		CommandButtonName = Command_CaptureBuilding
		SpecialPowerAIType = AI_SPECIAL_POWER_CAPTURE_BUILDING
	End
	
	Geometry = BOX
	GeometryMajorRadius = 30.0
	GeometryMinorRadius = 40.0
	GeometryHeight = 20.0
	GeometryIsSmall = No
	
	
	// *** AUTO RESOLVE DATA *** 
	AutoResolveUnitType = AutoResolveUnit_Cavalry
	AutoResolveCombatChain = AutoResolve_CavalryCombatChain

	AutoResolveBody = AutoResolve_GondorKnightHordeBody

End

- Freedom is Choice -

#2 -V4V3ND3TTA-

-V4V3ND3TTA-
  • Members
  • 13 posts

Posted 30 May 2006 - 09:55 AM

Unfortunatly I can't solve your problem but I do know that this is probably not a simple problem as I've seen this commonly in mods, including the latest beta of the Fellowship mod where the Balrog wouldn't disappear.

Anyways, good luck and this can be a bump for ya. :p

#3 ZenBKage

ZenBKage

    Ini Coder/BFME2 Arcade Edition Creater

  • Hosted
  • 427 posts

Posted 30 May 2006 - 10:00 AM

thanks. ive built many balrogs as either a hero or a regular unit and had no issues. were these balrogs a horde? ive had summons of balrogs which also die.
- Freedom is Choice -

#4 Mullers_11

Mullers_11

    Onlooker

  • Project Team
  • 806 posts
  • Location:England
  • Projects:Visions, The Four Ages
  •  Not active

Posted 30 May 2006 - 11:33 AM

Have you got a death behaviour? I couldn't see one quickly scanning over.

Retired


#5 zimoo

zimoo

    Ecthelion of the Fountain

  • Project Team
  • 2,009 posts
  • Location:Devon, England
  • Projects:Lurking until the off topic begins...
  •  Guardian of the Books

Posted 30 May 2006 - 11:35 AM

I think he has got that in the main object code, as he's had that unit for a while and he hasn't mentioned that the main unit can't disappear
Posted Image
Posted Image
Posted Image
Posted Image
Posted Image
Posted Image

Playing games? Ah, you'll never be a good modder if you get involved in actually playing them!


#6 ZenBKage

ZenBKage

    Ini Coder/BFME2 Arcade Edition Creater

  • Hosted
  • 427 posts

Posted 30 May 2006 - 12:05 PM

i do have the slowdeathbehavior code in the main object. ive been thinking that would having a kind of in the child object affect how it behaves to the main object?

Behavior = SlowDeathBehavior ModuleTag_08
	   ; Die and don't spawn horse
		DeathTypes = ALL -FADED
		SinkDelay = 3000
		SinkRate = 0.80	; in Dist/Sec
		DestructionDelay = 12000
	   ;ProbabilityModifier = 33
		Sound = INITIAL GondorSoldierVoiceDie
	End

- Freedom is Choice -




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users