Here´s the code
Code: Select all
actor ravishing 31198
{
MONSTER
Radius 20//31
Height 66
Health 5000000
Mass 10000
Speed 16
Vspeed 16
scale 0.065
PainChance 180
+FLOORCLIP +DONTHURTSPECIES +NOTARGET +BOSS +INVULNERABLE
SeeSound "EFF6"
PainSound "EFF9"
DeathSound "EFF7"
ActiveSound ""
AttackSound ""
MeleeSound ""
MeleeDamage 15
Obituary "%o was killed by the ravishing"
states
{
Spawn:
ghou A 0 ACS_Execute(10,0)
ghou A 0 A_ChangeFlag("NOCLIP",0)
ghou A 0 A_ChangeFlag("NOGRAVITY",0)
ghou A 0 A_UnsetFloat
ghou A 1 A_Look
Loop
See:
ghou A 3 A_Chase
ghou B 3 A_Chase
ghou C 3 A_Chase
ghou D 3 A_Chase
ghou E 3 A_Chase
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(9,0)==1,"GHOULALPHAIN")
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(9,0)==2,"GHOULALPHAOUT")
Loop
Melee:
TNT1 A 0 ACS_Execute(8,0)
ghou A 1 A_SetTranslucent (1.0,0)
ghou G 0 A_Playsound("EFF8")
ghou G 1 A_FaceTarget
ghou G 1 A_MeleeAttack
ghou HIJKJIH 1
ghou A 0 A_ChangeFlag("NOCLIP",0)
ghou A 0 A_ChangeFlag("NOGRAVITY",0)
ghou A 0 A_UnsetFloat
Goto See
Pain:
ghou a 2 A_Pain
Goto See
GHOULALPHAIN:
ghou A 0 A_ChangeFlag("NOCLIP",1)
ghou A 0 A_ChangeFlag("NOGRAVITY",1)
ghou A 0 A_SetFloat
ghou A 1 A_SetTranslucent (1.0,0)
ghou A 1 A_SetTranslucent (0.9,0)
ghou A 1 A_SetTranslucent (0.8,0)
ghou A 1 A_SetTranslucent (0.7,0)
ghou A 1 A_SetTranslucent (0.6,0)
ghou A 1 A_SetTranslucent (0.5,0)
ghou A 1 A_SetTranslucent (0.4,0)
ghou A 1 A_SetTranslucent (0.3,0)
ghou A 1 A_SetTranslucent (0.2,0)
ghou A 1 A_SetTranslucent (0.1,0)
ghou A 1 A_SetTranslucent (0.02,0)
Goto see
GHOULALPHAOUT:
ghou A 1 A_SetTranslucent (0.0,0)
ghou A 1 A_SetTranslucent (0.1,0)
ghou A 1 A_SetTranslucent (0.2,0)
ghou A 1 A_SetTranslucent (0.3,0)
ghou A 1 A_SetTranslucent (0.4,0)
ghou A 1 A_SetTranslucent (0.5,0)
ghou A 1 A_SetTranslucent (0.6,0)
ghou A 1 A_SetTranslucent (0.7,0)
ghou A 1 A_SetTranslucent (0.8,0)
ghou A 1 A_SetTranslucent (0.9,0)
ghou A 1 A_SetTranslucent (1.0,0)
ghou A 0 A_ChangeFlag("NOCLIP",0)
ghou A 0 A_ChangeFlag("NOGRAVITY",0)
ghou A 0 A_UnsetFloat
Goto see
Death:
ghou A 8
ghou B 8 A_Scream
ghou C 8
ghou D 8 A_SetTranslucent(1.0,0)
ghou E 8 A_Fall
ghou D 8
ghou E 8
tnt1 A -1 A_SetFloorClip
Stop
Raise:
SCPG A 8 A_UnSetFloorClip
SCPG A 8
Goto See
}
}
Code: Select all
script 8 (void)//GHOUL ATTACK
{
stuck_test=0;
ghoul_invtest=0;
user_ghoulactivesound=0;
timer_GHOUL=0;
user_invisible=0;
user_ghoulinvisible=0;
timer_GHOUL=0;
user_ghoulinvisible=0;
if(out_invisible==0)
{
out_invisible=50;
}
SetActorProperty(100,APROP_Speed,16.0);
}
script 9(void)//CHECK MONSTER IF NEED INVISIBLE/VISIBLE ANIMATION
{
script_test=1;
//IF HES INVISIBLE DO
if(user_invisible==1 && user_ghoulinvisible==0 && ghoul_invtest==0)
{
user_ghoulinvisible=1;
ghoul_invtest=1;
SetActorProperty(100,APROP_Speed,26.0);
}
//ELSE IF MONSTER IS VISIBLE DO
else if(user_invisible==0 && user_ghoulinvisible==0 && ghoul_invtest==1)
{
user_ghoulinvisible=2;
ghoul_invtest=0;
SetActorProperty(100,APROP_Speed,16.0);
}
setresultvalue(user_ghoulinvisible);
delay(1);
user_ghoulinvisible=0;
}
script 10(VOID)//DORMAINT SCRIPT
{
stuck_test=0;
user_ghoulactivesound=0;
ghoul_invtest=0;
timer_GHOUL=0;
user_invisible=0;
timer_GHOUL=0;
user_ghoulinvisible=0;
SetActorProperty(100,APROP_Speed,16.0);
}
script 11 (void)//SCRIPT THAT GIVIE RAVISHING LIFE, REPLACING DECORATE FUNCTIONs BY ACS
{
int pos_x=0,pos_y=0,pos_z=0;
//ravishing tag:24
ACS_EXECUTE(12,0,0,0,0);//RAVISHING SOUND CODE
while(true)
{
//print(s:"\nuser_ghoulactivesound:",d:user_ghoulactivesound,s:"\nstuck_test:",d:stuck_test,s:"\nsound_toplay:",d:sound_toplay,s:"\nuser_ghoulinvisiblecount:",d:user_ghoulinvisiblecount,s:"\ntimer_GHOUL:",d:timer_GHOUL,s:"\nuser_invisible:",d:user_invisible,s:"\nscript_test:",d:script_test,s:"\nout_invisible:",d:out_invisible);
/* TEST IF MONSTER IS STUCKED TO GET OUT*/
if(pos_x==getactorx(100) && pos_y==getactory(100) && pos_z==getactorz(100))
{
stuck_test++;
}
else
{
stuck_test=0;
pos_x=getactorx(100);
pos_y=getactory(100);
pos_z=getactorz(100);
}
if(stuck_test==50)
{
user_invisible=1;
user_ghoulinvisible=0;
ghoul_invtest=0;
timer_GHOUL=0;
}
//AVOID SUPER SPEED MONSTER
if(out_invisible>0)
{
SetActorProperty(100,APROP_Speed,16.0);
}
//------------------------------------------------------
/*SIMPLE TIMER TO COUNT IF THE RAVISHING IS NOT TOO MUCH TIME INVISIBLE*/
if(timer_GHOUL>=12 && user_invisible==1)
{
user_invisible=0;
timer_GHOUL=0;
SetActorProperty(100,APROP_Speed,16.0);
}
/*SIMPLE TIMER TO COUNT IF THE RAVISHING IS NOT TOO MUCH TIME VISIBLE*/
else if(timer_GHOUL>=7 && user_invisible==0)
{
timer_GHOUL=0;
user_invisible=1;
}
/*START SIMPLE FILTER TO SELECT WHAT SOUND TO PLAY*/
if(user_invisible==1)
{
sound_toplay=1;
}
else if(user_invisible==0)
{
sound_toplay=0;
}
//----------------------------------------------------
IF(out_invisible>0)
out_invisible--;
script_test=0;
delay(1);
}
}
script 12(void)//RAVISHING SOUND SCRIPT
{
while(true)
{
/*TWO LOOPS TO PLAY THE SOUNDS*/
if(sound_toplay==0)
{
while(user_ghoulactivesound<4 && user_invisible==0)
{
user_ghoulactivesound++;
delay(35);
}
timer_GHOUL++;
user_ghoulactivesound=0;
if(user_invisible==1)
{
ThingSound(100,"EFF5",127);
}
else if(user_ghoulinvisible==0)
{
ThingSound(100,"EFF10",127);
}
}
else
{
while(user_ghoulactivesound<2 && user_invisible==1)
{
user_ghoulactivesound++;
delay(35);
}
timer_GHOUL++;
user_ghoulactivesound=0;
if(user_invisible==1)
{
ThingSound(100,"EFF5",127);
}
else if(user_ghoulinvisible==0)
{
ThingSound(100,"EFF10",127);
}
}
//----------------------------------------------------
delay(1);
}
}
I think before it was the problem of three loops inside script 11, then i removed it and it still crash :S
So there´s some limitation on the zandronum that do it crash? I did some **** on the code and that´s the why it´s crashing? Should a monster with 100% decorate works?