Jump to content


Photo

ChildObject does not inherit Animations from ParentObject


Best Answer Miraak5, 09 August 2020 - 04:34 PM

It's simply because the animations are part of the "Draw = W3DScriptedModelDraw"
and since u replaced it in your child object for using a diffrent model, u also need to add the animations back

Go to the full post


  • Please log in to reply
2 replies to this topic

#1 amit5530

amit5530
  • Members
  • 114 posts
  • Location:Israel

Posted 08 August 2020 - 07:29 PM

Hi, i am trying to create a unit based on the rohan peasant, using the build variation

 

I want the child obj to be the same as the parent beside the weapon set

 

They both use the same skeleton, but still the child obj does not have animations in game while the parent working properly

 

this is my parent object:

in this object all the animations are set

Object RohanSwordman

and this is my child object:

;=============================
ChildObject RohanSpearman     RohanSwordman
	; ***ART Parameters ***
	
	Draw = W3DScriptedModelDraw ModuleTag_01  

		StaticModelLODMode = yes ; Will append M or L to the skin name depending on GameLOD
			
		  OkToChangeModelColor = Yes	
;;====================== MODELS ================================================================	
		DefaultModelConditionState
			Model               = RUSpearman_SKM
			Skeleton 			= RUTheoden_SKL			
		End
	End
	
	;;;; WEAPON SETS ;;;;
	WeaponSet
		Conditions          = None 
		Weapon              = PRIMARY		RohanSpear
	End
	
	WeaponSet
		Conditions			= PLAYER_UPGRADE
		Weapon				= PRIMARY		RohanSpearUpgraded
	End
	
	CrushableLevel = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
	
	CrushRevengeWeapon = SuperInfantryCrushRevenge
	EquivalentTo = RohanMelee
End

and the main object:

Object RohanMelee
	; *** ART Parameters ***
	SelectPortrait         = UPRohan_Melee
	Draw = W3DScriptedModelDraw ModuleTag_DRAW
;;================ MODELS =================================================================
		DefaultModelConditionState
			Model 		= RUSwordman_SKN		
			Skeleton 	= RUTheoden_SKL
		End
	End
	; ***DESIGN parameters ***
	Side = Rohan
	EditorSorting = UNIT
	BuildVariations = RohanSwordman RohanSpearman
	KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS INFANTRY PATH_THROUGH_EACH_OTHER SCORE THROWN_OBJECT ATTACK_NEEDS_LINE_OF_SIGHT NOTIFY_OF_PREATTACK GRAB_AND_DROP
	
End

any solution other than copying the same animations to my RohanSpearman aswell?



#2 Miraak5

Miraak5

    title available

  • Members
  • 389 posts
  • Location:France
  • Projects:ROTWK Patch 2.02, Wars of the North, BFME1 1.08 Complete Edition
  •  BIG coding, Map scripting and AI coding

Posted 09 August 2020 - 04:34 PM   Best Answer

It's simply because the animations are part of the "Draw = W3DScriptedModelDraw"
and since u replaced it in your child object for using a diffrent model, u also need to add the animations back


He was the first...


#3 amit5530

amit5530
  • Members
  • 114 posts
  • Location:Israel

Posted 10 August 2020 - 06:57 PM

Thank you for the explanation!






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users