Help me on a script code,please
- MagicWazard
- Moderator
Less
More
- Posts: 808
8 years 10 months ago #11
by MagicWazard
Try this then. It's a modified version of the example from the ThingCount wiki page that waits until all the specified monsters are dead. An "If" statement will run right away, but only once. A "while" statement will keep running until it's no longer true.
Also, you are looking for an "Evilmarine" with a TID of "669". Are you assigning that monster the TID correctly? If there's only one "Evilmarine" in the map at the time, you can omit the TID altogether.
Replied by MagicWazard on topic Help me on a script code,please
Code:
script 3 (void)
{
While(ThingCountName("Evilmarine", 669) > 0)
Delay(35);
setfont("dbigfont");
HudMessageBold(s:"Hi,i am script" ;HUDMSG_TYPEON|HUDMSG_LOG,0,CR_BRICK,512.0,384.0,1.0,0.5,0,255);
}
Try this then. It's a modified version of the example from the ThingCount wiki page that waits until all the specified monsters are dead. An "If" statement will run right away, but only once. A "while" statement will keep running until it's no longer true.
Also, you are looking for an "Evilmarine" with a TID of "669". Are you assigning that monster the TID correctly? If there's only one "Evilmarine" in the map at the time, you can omit the TID altogether.
Please Log in or Create an account to join the conversation.
- CaptainManiac
- Topic Author
- Cacodemon
Less
More
- Posts: 103
8 years 10 months ago - 8 years 10 months ago #12
by CaptainManiac
Replied by CaptainManiac on topic Help me on a script code,please
you were right. i used this to spawn the enemy:
and was part of the previous script.Yes,the problem is there,cus of that the script does not detect the enemy 669(cus it does not exist) and runs away(and then terminates as an runaway script)
Code:
SpawnSpotFacing("EvilMarine",12,669);
Last edit: 8 years 10 months ago by CaptainManiac. Reason: Missing important information
Please Log in or Create an account to join the conversation.