Giving me error for not defining idle animation of a unit

idle sequence has been defined but it is giving error

Information and discussion for custom maps and mods.
Post Reply
umairazfar
Posts: 92
Joined: Mon Sep 08, 2014 1:01 pm

Giving me error for not defining idle animation of a unit

Post by umairazfar »

I have created my own unit named AGNI using the V2RL code in the vehicles.yaml

Code: Select all

AGNI:
	Inherits: ^Vehicle
	Buildable:
		Queue: Vehicle
		BuildPaletteOrder: 80
		Prerequisites: dome, ~vehicles.soviet, ~techlevel.medium
		Hotkey: v
	Valued:
		Cost: 100
	Tooltip:
		Name: Agni Rocket
		Description: Long-range rocket artillery.\n  Strong vs Infantry, Buildings\n  Weak vs Tanks, Aircraft
	Health:
		HP: 200
	Armor:
		Type: Light
	Mobile:
		Speed: 85
	RevealsShroud:
		Range: 5c0
	Armament:
		Weapon: SCUD
	AttackFrontal:
	RenderUnitReload:
	AutoTarget:
	Explodes:
		Weapon: SCUD
		EmptyWeapon: UnitExplodeSmall
I have also duplicated the sequences for it just like V2RL like this:

Code: Select all

agni:
	idle:
		Start: 0
		Facings: 32
	empty-idle:
		Start: 32
		Facings: 32
	aim:
		Start: 64
		Facings: 8
	empty-aim:
		Start: 72
		Facings: 8
	icon: v2rlicon
		Start: 0
I start a skirmish and build agni, but as soon as the unit is complete, the game crashes and it gives me this error

Code: Select all

Dispute Mod at Version release-20150501
Operating System: Windows (Microsoft Windows NT 6.1.7601 Service Pack 1)
Runtime Version: .NET CLR 4.0.30319.34209
Exception of type `System.InvalidOperationException`: Unit `agni` does not have a sequence named `idle`
   at OpenRA.Graphics.SequenceProvider.GetSequence(String unitName, String sequenceName)
   at OpenRA.Graphics.Animation.PlayRepeating(String sequenceName)
   at OpenRA.Traits.RenderSimple..ctor(Actor self)
   at OpenRA.Mods.RA.Render.RenderUnitReload..ctor(Actor self, RenderUnitReloadInfo info)
   at OpenRA.Mods.RA.Render.RenderUnitReloadInfo.Create(ActorInitializer init)
   at OpenRA.Actor..ctor(World world, String name, TypeDictionary initDict)
   at OpenRA.Mods.RA.Production.<DoProduction>c__AnonStorey1A8.<>m__55F&#40;World w&#41;
   at OpenRA.World.Tick&#40;&#41;
   at OpenRA.Game.TickInner&#40;OrderManager orderManager&#41;
   at OpenRA.Game.Tick&#40;OrderManager orderManager&#41;
   at OpenRA.Game.Run&#40;&#41;
   at OpenRA.Program.Run&#40;String&#91;&#93; args&#41;
   at OpenRA.Program.Main&#40;String&#91;&#93; args&#41;
What am I doing wrong? :\ [/code]

User avatar
BaronOfStuff
Posts: 438
Joined: Sun May 22, 2011 7:25 pm

Post by BaronOfStuff »

Basic error, it's trying to read from the entry AGNI.SHP, which doesn't exist. Use this in SEQUENCES.YAML:

Code: Select all

agni&#58;
	idle&#58; v2rl
		Start&#58; 0
		Facings&#58; 32
	empty-idle&#58; v2rl
		Start&#58; 32
		Facings&#58; 32
	aim&#58; v2rl
		Start&#58; 64
		Facings&#58; 8
	empty-aim&#58; v2rl
		Start&#58; 72
		Facings&#58; 8
	icon&#58; v2rlicon
		Start&#58; 0

umairazfar
Posts: 92
Joined: Mon Sep 08, 2014 1:01 pm

Post by umairazfar »

Thank you, that worked! I had created other units but they worked without doing these changes, so that had me confused

Post Reply