PDA

View Full Version : Shoot lots of Imps. Activate one effect.


Cyberman
October 2nd, 2007, 11:37 AM
Hello...

I cant finish my level . I made a big room with 260 (or little more) of Imps.
I had also made a script with count down effect at the same time I should kill the imps.
When the count down is going down, the big room will shake very much and I die. The problem is to make a door to open when I had shoot all the imps.*sniper*

ace
October 2nd, 2007, 12:55 PM
What port are you scripting for? (G)ZDoom(GL)/Skulltag/Vavoom, which all use ACS (http://208.78.96.242/wiki/ACS)? Or Legacy, which uses FraggleScript (http://legacywiki.net/index.php/FraggleScript)?

Please, try to be as specific as possible, always! ;)

Cyberman
October 3rd, 2007, 07:44 AM
I use zdoom (doom in hexen format). And I have the newest version of doom.
I dont know to make one script, and make one effect (Door_open) when I kill all the imps.

Cyberman
October 9th, 2007, 09:22 PM
Sorry if my english is bad. But I live in denmark. In the highschool I got bad marks in english (5). I will hope someone will write a script I can use in my level.

ReX
October 12th, 2007, 04:46 AM
When the count down is going down, the big room will shake very much and I die. The problem is to make a door to open when I had shoot all the imps.
Try using this script:

Script 6 (void)

{ while (thingcount (T_IMP, 0))
{
delay (70);
}
Door_Open(15,128);
}

Make sure that you assign the script number (in this case, Script 6) to each imp, and the tag number (in this case, Tag 15) to the door.

Cyberman
October 12th, 2007, 08:22 AM
I couldn´t get it to work. But I could maybe use something with "Thingcount"
But if I use the word "While", should I so use another word to activate it?

ReX
October 12th, 2007, 11:24 AM
I couldn“t get it to work. But I could maybe use something with "Thingcount"
But if I use the word "While", should I so use another word to activate it?
If you only have more than one condition in your logic you'd need to use an operator such as "Else". However, in the script I posted there is only one condition and no other operator is needed. I have successfully used this script, so I know it works.

One other question. Are there other imps elsewhere in your level? If so, and you've assigned them the same tag number as the imps in your main room, the script will not work as intended.

Please post your script so that I can see what the problem may be.

Cyberman
October 12th, 2007, 02:21 PM
http://img218.imageshack.us/my.php?image=cmap1zc3.png
All the red things in the big room is imps. First I shoot 1 revenant and then the countdown will start. A door (The grey square in the big room) will open, and I have to shoot over 260 imps, before the countdown will go to "0". If it can be done, I will make a new door to open, but first when I kill all the imps.

ReX
October 12th, 2007, 06:56 PM
Cyberman, I think you misunderstood me. I didn't want a picture of the map in the editor, I wanted the text of the script you are using for the timer countdown and the imp countdown.

Cyberman
October 12th, 2007, 11:04 PM
øhh. I dont know how I place a script file on this site, so you can download it.
But I can copy the script like this:

#include "zcommon.acs"

Script 1 (void)
{
Door_open(8,3);
print(s:"TIME COUNT DOWN FOR TOTAL DESTRUCTION IN THE AREA");
delay (const:600);
print(s:"KILL ALL ENEMYS IN THE AREA BEFORE COUNT IS DOWN OR YOU WILL BE SCREWED UP");
delay (const:600);
print(s:"READY? THEN START!!!");
delay (const:300);
print(s:"80");
delay (const:120);
print(s:"79");
delay (const:120);
print(s:"78");
delay (const:120);
print(s:"77");
delay (const:120);
print(s:"76");
delay (const:120);
print(s:"75");
delay (const:120);
print(s:"74");
delay (const:120);
print(s:"73");
delay (const:120);
print(s:"72");
delay (const:120);
print(s:"71");
delay (const:120);
print(s:"70");
delay (const:120);
print(s:"69");
delay (const:120);
print(s:"68");
delay (const:120);
print(s:"67");
delay (const:120);
print(s:"66");
delay (const:120);
print(s:"65");
delay (const:120);
print(s:"64");
delay (const:120);
print(s:"63");
delay (const:120);
print(s:"62");
delay (const:120);
print(s:"61");
delay (const:120);
print(s:"60");
delay (const:120);
print(s:"59");
delay (const:120);
print(s:"58");
delay (const:120);
print(s:"57");
delay (const:120);
print(s:"56");
delay (const:120);
print(s:"55");
delay (const:120);
print(s:"54");
delay (const:120);
print(s:"53");
delay (const:120);
print(s:"52");
delay (const:120);
print(s:"51");
delay (const:120);
print(s:"50");
delay (const:120);
print(s:"49");
delay (const:120);
print(s:"48");
delay (const:120);
print(s:"47");
delay (const:120);
print(s:"46");
delay (const:120);
print(s:"45");
delay (const:120);
print(s:"44");
delay (const:120);
print(s:"43");
delay (const:120);
print(s:"42");
delay (const:120);
print(s:"41");
delay (const:120);
print(s:"40");
delay (const:120);
print(s:"39");
delay (const:120);
print(s:"38");
delay (const:120);
print(s:"37");
delay (const:120);
print(s:"36");
delay (const:120);
print(s:"35");
delay (const:120);
print(s:"34");
delay (const:120);
print(s:"33");
delay (const:120);
print(s:"32");
delay (const:120);
print(s:"31");
delay (const:120);
print(s:"30");
delay (const:120);
print(s:"29");
delay (const:120);
print(s:"28");
delay (const:120);
print(s:"27");
delay (const:120);
print(s:"26");
delay (const:120);
print(s:"25");
delay (const:120);
print(s:"24");
delay (const:120);
print(s:"23");
delay (const:120);
print(s:"22");
delay (const:120);
print(s:"21");
delay (const:120);
print(s:"20");
delay (const:120);
print(s:"19");
delay (const:120);
print(s:"18");
delay (const:120);
print(s:"17");
delay (const:120);
print(s:"16");
delay (const:120);
print(s:"15");
delay (const:120);
print(s:"14");
delay (const:120);
print(s:"13");
delay (const:120);
print(s:"12");
delay (const:120);
print(s:"11");
delay (const:120);
print(s:"10");
delay (const:120);
print(s:"9");
delay (const:120);
print(s:"8");
delay (const:120);
print(s:"7");
delay (const:120);
print(s:"6");
delay (const:120);
print(s:"5");
delay (const:120);
print(s:"4");
delay (const:120);
print(s:"3");
delay (const:120);
print(s:"2");
delay (const:120);
print(s:"1");
delay (const:120);
print(s:"0");
delay (const:400);
print(s:"WARNING. TOTAL DESTRUCTION WILL BEGIN AT FEW SECONDS");
delay (const:400);
Radius_Quake(100,200,50,40,16);
Thing_projectile(16,98,0,0,0);
}

Script 2 (void)

{ while (thingcount (T_IMP, 0))
{
delay (70);
}
Door_Open(10,5);
}

ReX
October 13th, 2007, 06:07 AM
The scripts look fine to me. However, did you remember to assign the script number (in this case, Script 2) to each imp?

Also, I assume that the door that opens in the beginning of Script 1 is different from the door that opens at the end of script 2?

Cyberman
October 13th, 2007, 04:47 PM
I am not sure to use the effect "thingcount".
If I ex. give all the imps a tag of "15" . Should the script so be:

Script 2 (void)

{ while (thingcount (T_IMP, 15))
{
delay (70);
}
Door_Open(10,5);
}

ReX
October 13th, 2007, 08:35 PM
No, the thingcount number represents the number of imps remaining. Therefore, a value of 0 means that all imps have been killed. Each imp must be associated with a special, in this case the special is ACS_Execute (script, map, Arg1, Arg2, Arg3). In your case the first argument in the special, the script number, is 2. Remember, this is not a tag number (even though I mistakenly used the word 'tag' when I said " you've assigned them the same tag number as the imps in your main room").

In your editor you will need to (i) select all the imps and right click your mouse, (ii) in the dialog box assign them the ACS_Execute special, and (iii) put in the script number as your first value in the Arguments. (All other arguments can remain 0). In other words, the special will look like this in your dialog box:

Special: ACS_Execute
Arguments: (2, 0, 0, 0, 0)

[Depending on the map editor you are using, the dialog box may display the information slightly differently.]

Cyberman
October 14th, 2007, 05:07 PM
thx ReX. This time I got it to work. :) . I have not used script so much in doom, and I have never used "thingcount" before...

But now I can finish my map. :)