Home   Help Search Login Register  

Author Topic: Occasional CTD from script  (Read 469 times)

0 Members and 1 Guest are viewing this topic.

Kammak

  • Guest
Occasional CTD from script
« on: 21 Jul 2004, 19:33:32 »
Hello,

I've started getting an occasional CTD during a script execution, and wondered if someone has a quick answer.  Here's the script:

Code: [Select]
; Surrender.sqs
_arrGuys=_this select 0
{removeallweapons _x;_x setcaptive true;_x setbehaviour "CARELESS";_x switchmove "FXStandSurDown"} foreach _arrGuys

The script is called from a trigger, and the trigger condition makes sure there are no vehicles or helos in the array, just guys.

An example of the trigger condition in the latest mission that just crashed -

Code: [Select]
(count thislist>0) && (count thislist<3) && ("SuchRofficer" countType thislist==0) && ("APC" countTYpe thislist==0) && !kmkSecure

The Trigger is an East Present, Once, 30 second timeout.  The Activation field is:
Code: [Select]
[thislist] exec "Surrender.sqs";kmkSecure=true;"1" objstatus "DONE";hint "The area has been secured!"

The trigger effect is a Bottom Text of: "Survivors Surrender\nThe area has been secured!"

In this case, the mission has both Marine Assault Pack Russians and BIS East Soldiers, plus 3 x BMP2 vehicles.


The script works great in several mission, but as I've added it into more and more missions, I've started getting *occasional* CTDs.

I'm doing some testing now to try to isolate the issue, but does anyone have some ideas what is causing the crash?  Could it be certain classes of soldiers from addons that don't like the animation call?  Before I started using the script, I tested it on soldiers in various behaviours and stances, and never had a crash.  So I'm quite surprised to run into problems now.

Any informed input is appreciated!

Kevin