GeorgNihilus
01-23-2008, 12:08 PM
Hi people :) this 'should' be pretty simple but it's not working for me :( ... well I'm trying to insert a delay of 15 seconds before firing a script but I'm not succeeding even though the script I'm using is compiling good.
Here's the script I'm dealing with:
//:: k_def_death01
/*
Default On Death Script
*/
//:: Created By: Preston Watamaniuk
//:: Copyright (c) 2002 Bioware Corp.
#include "k_inc_switch"
#include "k_inc_debug"
void main()
{
DelayCommand (15.0, ExecuteScript("k_spn_selk", OBJECT_SELF));
ExecuteScript("k_spn_selk", OBJECT_SELF);
ExecuteScript("k_ai_master", OBJECT_SELF, KOTOR_DEFAULT_EVENT_ON_DEATH);
/*
if(!GN_GetSpawnInCondition(SW_FLAG_AI_OFF))
{
SpeakString("GEN_I_AM_DEAD", TALKVOLUME_SILENT_TALK);
//Shout Attack my target, only works with the On Spawn In setup
SpeakString("GEN_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
}
if(GN_GetSpawnInCondition(SW_FLAG_EVENT_ON_DEATH))
{
SignalEvent(OBJECT_SELF, EventUserDefined(1007));
}
*/
}
I just added the red marked line, nothing more, but they delay is completely ignored when running the script from the .utc I'm using (OnDeath field). Maybe 'ExecuteScript' is not an action command ... is it? Any ideas? :confused:
thanks on advance guys! :waive1:
Here's the script I'm dealing with:
//:: k_def_death01
/*
Default On Death Script
*/
//:: Created By: Preston Watamaniuk
//:: Copyright (c) 2002 Bioware Corp.
#include "k_inc_switch"
#include "k_inc_debug"
void main()
{
DelayCommand (15.0, ExecuteScript("k_spn_selk", OBJECT_SELF));
ExecuteScript("k_spn_selk", OBJECT_SELF);
ExecuteScript("k_ai_master", OBJECT_SELF, KOTOR_DEFAULT_EVENT_ON_DEATH);
/*
if(!GN_GetSpawnInCondition(SW_FLAG_AI_OFF))
{
SpeakString("GEN_I_AM_DEAD", TALKVOLUME_SILENT_TALK);
//Shout Attack my target, only works with the On Spawn In setup
SpeakString("GEN_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
}
if(GN_GetSpawnInCondition(SW_FLAG_EVENT_ON_DEATH))
{
SignalEvent(OBJECT_SELF, EventUserDefined(1007));
}
*/
}
I just added the red marked line, nothing more, but they delay is completely ignored when running the script from the .utc I'm using (OnDeath field). Maybe 'ExecuteScript' is not an action command ... is it? Any ideas? :confused:
thanks on advance guys! :waive1: