Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Doomguy94

Scripting Help

Recommended Posts

I am making a boos level in my wad and I want the floor to lower when he reaches half of his health lost. This is what I have so far.

 

#include "zcommon.acs"

Script 1 (Void)
{
Ambientsound("misc/chat",120);
log(s:"\cm???:\c-You have done well so far, human...");
Delay (35*3); 
Ambientsound("misc/chat",120);
log(s:"\cm???:\c-However, your luck stops here. You will learn not to mess \nwith the army of Satan!");
}

Script 2 (Void)
{
SpawnSpot("Teleportfog",1);
delay(35);
SpawnSpot("cyberdemonboss",1,4,270);
ACS_ExecuteAlways(26,0,0,0,0);
}

script 3 (int tid)
{
GetActorProperty(4,APROP_Health);
if (GetActorProperty(4,APROP_Health) <=4000)
{
Floor_LowerByValue(3,30,100);
Delay(30);
ReplaceTextures("FLOOR6_1","Lava1");
Sector_setdamage(3,100,14);
}
}

Script 26 (void) //boss fight!!!
{
hudmessagebold (s:"\chCyberdemon's \cghealth: ",d:GetActorProperty(2,APROP_Health),s:"";HUDMSG_PLAIN,3,CR_RED,0.95,0.2,1.0,1);
 delay(1);
restart;
}

Share this post


Link to post

Script 2 (Void)
{
SpawnSpot("Teleportfog",1);
delay(35);
SpawnSpot("cyberdemonboss",1,4,270);
ACS_ExecuteAlways(3,0,0,0,0);
ACS_ExecuteAlways(26,0,0,0,0);
}



script 3 (void)
{
While(GetActorProperty(4,APROP_Health) >=4000)
Delay(1);

Floor_LowerByValue(3,30,100);
Delay(30);
ReplaceTextures("FLOOR6_1","Lava1");
Sector_setdamage(3,100,14);

}

Script 26 (void) //boss fight!!!
{
hudmessagebold (s:"\chCyberdemon's \cghealth: ",d:GetActorProperty(4,APROP_Health),s:"";HUDMSG_PLAIN,3,CR_RED,0.95,0.2,1.0,1);
 If(GetActorProperty(4,APROP_Health)<=0)
 Terminate;
 Delay(1);
restart;
}
#2 also starts #3, rest of #3 triggers when he's under 4000 health, #26 doesn't keep printing his health after he is dead.

Share this post


Link to post
Boon said:

Script 2 (Void)
{
SpawnSpot("Teleportfog",1);
delay(35);
SpawnSpot("cyberdemonboss",1,4,270);
ACS_ExecuteAlways(3,0,0,0,0);
ACS_ExecuteAlways(26,0,0,0,0);
}



script 3 (void)
{
While(GetActorProperty(4,APROP_Health) >=4000)
Delay(1);

Floor_LowerByValue(3,30,100);
Delay(30);
ReplaceTextures("FLOOR6_1","Lava1");
Sector_setdamage(3,100,14);

}

Script 26 (void) //boss fight!!!
{
hudmessagebold (s:"\chCyberdemon's \cghealth: ",d:GetActorProperty(4,APROP_Health),s:"";HUDMSG_PLAIN,3,CR_RED,0.95,0.2,1.0,1);
 If(GetActorProperty(4,APROP_Health)<=0)
 Terminate;
 Delay(1);
restart;
}
#2 also starts #3, rest of #3 triggers when he's under 4000 health, #26 doesn't keep printing his health after he is dead.


Ok, I will try this

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×