PDA

View Full Version : Scripts in ZDoom


Sphagne
May 3rd, 2001, 09:18 PM
I wanted to test some ZDoom scripts, so:

I designed a cubic room with a raised box in the middle.

I added a Player 1 object in the room and a Red fountain over the box.

Then I added a MapSpot over the fountain and some scripts to throw out some imp fireballs from that spot to around the room.

The level hanged. http://forums.newdoom.com/ubb/smilies/cwm10.gif

What have I done wrong, please?

The script? It`s here:

#include "zcommon.acs"

script 100 open
{
delay(const:4);
Thing_ProjectileGravity (0,T_IMPFIREBALL, random(const:0,255), random(const:10,40), random(const:10,40));
}

X-DOOM
May 5th, 2001, 02:39 PM
Sphagne i can help if you send me the wad by my email box. But please zip him in a .zip files.
Thanks

mailto:x-doom@caramail.comx-doom@caramail.com</A>



------------------
I'll teach you some move during the Deathmatch.
So are you the choosen one who beat me in a Deatchmatch?
I Thinks not, I never lost a DM since the begginning! :)
But, check my DooM Site here : http://www.newdoom.com/x-doom and I willn't frags you.

Sphagne
May 8th, 2001, 08:30 PM
Thanx pal, but I worked it out myself, and the moral of my discoveries was:

"NEVER use windows based editors for editing scripts." http://forums.newdoom.com/ubb/smilies/cwm21.gif

or you shall end like myself.

P.S. Just look at this script:

#include "zcommon.acs"
script 100 open
{
int sw1,a,b;
b = 40;
sw1 = 0;
while (1) {
delay(random(const:3,10));
a = random(1,b);
if (a == 1) {
sw1 += 1;
if (sw1 &gt; 2) sw1 = 1;
}
switch (sw1) {
case 1:
b = 30;
Thing_ProjectileGravity (1, T_IMPFIREBALL, random(const:0,255),
random(const:10,40), random(const:10,40));
break;
case 2:
b = 15;
Thing_ProjectileGravity (1, T_IMP, random(const:0,255),
random(const:40,60), random(const:40,60));
sw1 = 0;
break;
default:
a = random(const:1,10);
if (a == 1) {
a = random(const:3,7);
Radius_Quake (a, 10*a, 0, 50, 2);
TagWait(const:1);
}
}
}
}

You shall have two MapSpots with tids 1,2 in a level and MapSpot(2) on a sector with Tag:1 and it works wonders.

A real fire cracker! Just try it.