44 lines
1.8 KiB
Plaintext
44 lines
1.8 KiB
Plaintext
void main()
|
|
{
|
|
|
|
object oBall1 = GetObjectByTag("ba2_chaosball1");
|
|
object oBall2 = GetObjectByTag("ba2_chaosball2");
|
|
object oBall3 = GetObjectByTag("ba2_chaosball3");
|
|
object oBall4 = GetObjectByTag("ba2_chaosball4");
|
|
|
|
effect eBallvis = EffectVisualEffect(VFX_IMP_KNOCK);
|
|
|
|
SetLocalInt(GetObjectByTag("ba2_chaosdivice"), "Activate", 1);
|
|
|
|
int nChaos1 = d4(1);
|
|
float fChaos1 = IntToFloat(nChaos1);
|
|
DelayCommand(fChaos1, AssignCommand(oBall1, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)));
|
|
DelayCommand(fChaos1, SetLocalInt(oBall1, "X2_L_PLC_ACTIVATED_STATE", TRUE));
|
|
DelayCommand(fChaos1, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBallvis, oBall1));
|
|
|
|
int nChaos2 = d4(1);
|
|
while(nChaos2 == nChaos1) {nChaos2 = d4(1);}
|
|
float fChaos2 = IntToFloat(nChaos2);
|
|
DelayCommand(fChaos2, AssignCommand(oBall2, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)));
|
|
DelayCommand(fChaos2, SetLocalInt(oBall2, "X2_L_PLC_ACTIVATED_STATE", TRUE));
|
|
DelayCommand(fChaos2, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBallvis, oBall2));
|
|
|
|
int nChaos3 = d4(1);
|
|
while(nChaos3 == nChaos1 || nChaos3 == nChaos2) {nChaos3 = d4(1);}
|
|
float fChaos3 = IntToFloat(nChaos3);
|
|
DelayCommand(fChaos3, AssignCommand(oBall3, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)));
|
|
DelayCommand(fChaos3, SetLocalInt(oBall3, "X2_L_PLC_ACTIVATED_STATE", TRUE));
|
|
DelayCommand(fChaos3, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBallvis, oBall3));
|
|
|
|
int nChaos4 = d4(1);
|
|
while(nChaos4 == nChaos1 || nChaos4 == nChaos2 || nChaos4 == nChaos3) {nChaos4 = d4(1);}
|
|
float fChaos4 = IntToFloat(nChaos4);
|
|
DelayCommand(fChaos4, AssignCommand(oBall4, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)));
|
|
DelayCommand(fChaos4, SetLocalInt(oBall4, "X2_L_PLC_ACTIVATED_STATE", TRUE));
|
|
DelayCommand(fChaos4, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBallvis, oBall4));
|
|
|
|
int nDRoll = d8(1);
|
|
SetLocalInt(OBJECT_SELF, "DRoll", nDRoll);
|
|
|
|
}
|