I have written the script below to play when the pc first enter the area with his party. He has been teleported in and I want to run a star trek style entrance.
Not working so far. Can anyone see why?
Functionally I start an conversation on enter and then run this script from the conversation (after a couple of intro screens)
* * * * * * * * * * * * * * * * * * * * * * * * *
//Arrival fx for Beregost.
void main()
{
object oPC = GetPCSpeaker();
object oTarget = oPC;
object oHon = GetObjectByTag("hon");
object oEmb = GetObjectByTag("ember");
effect eEffect = EffectDazed();
effect heal = EffectNWN2SpecialEffectFile("sp_sonic_aoe_2",oTarget);
effect nova = EffectNWN2SpecialEffectFile("fx_cleansing_nova",oTarget);
//Apply Nova
DelayCommand(0.2f,ApplyEffectToObject(DURATION_TYPE_INSTANT,nova,oTarget));
DelayCommand(0.2f,ApplyEffectToObject(DURATION_TYPE_INSTANT,nova,oHon));
DelayCommand(0.2f,ApplyEffectToObject(DURATION_TYPE_INSTANT,nova,oEmb));
//Apply Sonic
DelayCommand(0.5f,ApplyEffectToObject(DURATION_TYPE_INSTANT,heal,oTarget));
DelayCommand(0.5f,ApplyEffectToObject(DURATION_TYPE_INSTANT,heal,oHon));
DelayCommand(0.5f,ApplyEffectToObject(DURATION_TYPE_INSTANT,heal,oEmb));
//apply daze
DelayCommand(0.8f,ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 5.0f));
DelayCommand(0.8f,ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oHon, 5.0f));
DelayCommand(0.8f,ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oEmb, 5.0f));
oTarget = OBJECT_SELF;
DestroyObject(oTarget, 0.0);
}
* * * * * * * * * * * * * * * * * * * * * * * * *
Help would be appreciated,
PJ
Numpty fx scripting
Débuté par
PJ156
, oct. 28 2012 09:46
#1
Posté 28 octobre 2012 - 09:46
#2
Posté 28 octobre 2012 - 09:56
Is the line "object oPC = GetPCSpeaker();" redundant since I get the PC as oTarget or perhaps the other way round? Either way I define the Pc twice, does that matter?
PJ
PJ
#3
Posté 28 octobre 2012 - 10:30
Hi Pj,
Looks to me as if you may be destroying the placeable/whatever that's running the script. So the DelayCommand's won't work. At least I think that may be what your problem is.
Regards, Bardil
Looks to me as if you may be destroying the placeable/whatever that's running the script. So the DelayCommand's won't work. At least I think that may be what your problem is.
Regards, Bardil
#4
Posté 28 octobre 2012 - 11:18
Ahh yes. At the start this was to fire direct off the trigger without the conversation.
Oooops and thank you
PJ
Oooops and thank you
PJ





Retour en haut







