Jump to content


Photo

Error with ai slave object

ai ocl slave

  • Please log in to reply
1 reply to this topic

#1 SarumanBitch

SarumanBitch
  • New Members
  • 4 posts

Posted 07 May 2020 - 06:35 PM

Hi so i have a Hero: Shelob, that spawns an egg dummy unit which has a timed life, when that dummy unit dies it spawns a horde of spiderlings via an OCL, after a period of time Shelob will spawn another egg which will then go through the same process, my issue however is quite puzzling for my novice self, the system works without error for human players, however the moment the ai controled Shelob spawns her seconds egg the game crashes with no error code.....just gives a Runtime error.

 

Here is the code in Shelob's ini

;-------babies-------------------------------------------------------

	
 Behavior = ProductionUpdate ProductionUpdateModuleTag_1
    NumDoorAnimations            = 0
    DoorOpeningTime              = 0  ;in mSeconds how long you want doors to be in open state
    DoorWaitOpenTime             = 0  ;in mSeconds time the door stays open, so units can exit
    DoorCloseTime                = 0  ;in mSeconds how long you want doors to be in open state
    ConstructionCompleteDuration = 0  ;in mSeconds   wait time so if you have multiple units they don't run over each other
    GiveNoXP					 = Yes   ;will not give any xp when building units
    ;;;;;;;;;UnitPreparationTime			 = 4333		; time of the unit build animation
    ;;;;;;;;;; 4-1/3 second prep needs to be set in ThingTemplate, for Both trolls, now
  End


       Behavior = QueueProductionExitUpdate ModuleTag_11
		UnitCreatePoint			= X:-15.0 Y:0.0 Z:0.0
		NaturalRallyPoint		= X:-15.0 Y:0.0 Z:0.0
		ExitDelay				= 300
		NoExitPath				= Yes
	End

	Behavior = SpawnBehavior ModuleTag_SpawnFighters
		SpawnNumber				= 1
		InitialBurst			= 0
		SpawnTemplateName		= SpiderlingsShelobEgg
		SpawnReplaceDelay		= 30000
		FadeInTime				= 1000
	End

Here's the code for the egg dummy in the wildspiderling ini

//-----------------------------------------------------------------------------------------
Object SpiderlingsShelobEgg
	Draw = W3DScriptedModelDraw ModuleTag_Draw
		DefaultModelConditionState
			Model = MUSpiderEgg
		End
	End
	KindOf = INERT IMMOBILE UNATTACKABLE
	
	Body = ActiveBody ModuleTag_MakesKillWork
		MaxHealth = 1
	End
	Behavior = LifetimeUpdate ModuleTag_HatchTrigger
		MinLifetime = 20000.0
		MaxLifetime =  20000.0
	End
	Behavior = SlowDeathBehavior ModuleTag_HatchProcess
		DestructionDelay	= 3000
		FX = INITIAL FX_SpiderlingsSummonStart
		FX = FINAL FX_SpiderlingsSummonFinish
		OCL	= FINAL OCL_SpawnSpiderlingsShelobEgg
		
	End
End
;//------------------------------------------------------------------------------

ChildObject WildSpiderlingHordeMember WildSpiderling
	KindOf			= PRELOAD INFANTRY SCORE ATTACK_NEEDS_LINE_OF_SIGHT ENVIRONMENT SELECTABLE CAN_CLIMB_WALLS
End

I can include the code for the wildspiderling.ini and its horde code, but the only changes I made there was removing Command point cost.



#2 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 09 May 2020 - 09:14 PM

you have multiple posts ,

I would change 

 

SpawnNumber                = 1
        InitialBurst            = 1

 

then test

 

post this bit of code from the objectcreationlist if it is still an issue

 

OCL_SpawnSpiderlingsShelobEgg

 

or try this to test - OCL_SpawnSpiderlingsEgg


Edited by JUS_SAURON, 09 May 2020 - 09:57 PM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users