ACS Prefab Database

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
Apothem
Posts: 2070
Joined: Sat Nov 29, 2003 7:13 pm
Location: Performing open heart surgery on an ACS compiler.

Post by Apothem »

Well, ease of use is rather important, and lets not forget that we're looking for well commented code, and also efficentcy is somewhat of an issue. Lets make sure that the way you're doing your prefab is an easy to reproduce method that can be easily applied to anything you're doing. (*Adds a guidleline to the list*)
farlowj
Posts: 389
Joined: Mon Feb 16, 2004 1:33 pm
Location: Michigan

Post by farlowj »

Well, here's one, I'm pretty sure it works. It makes a line transparent, or opaqe, depending on the initial state of it.

Code: Select all

#include"zcommon.acs"
script 1 (void)  //any script number, just activate it, makes line translucent
}
        int line;
	line=255;  //variable to control transparency
	While(line>=1){  //going translucent
		TranslucentLine(3,line,0);  //any line ID will do, just make sure to have a texture on it
		line--;  //makes it a little more translucent
		Delay(1);  //necessary to avoid a run away script
	}
}
script 2 (void)  //makes line opaque
{
        int line2;
        line2=255;  //variable to control opaquness
	While(line2<=255){ //becoming opaque
		TranslucentLine(3,line2,0);  //once again, any line ID will do
		line2++;  //makes it more opaque
		Delay(1);  //necessary to avoid a run away script
	}
}
Dr_Ian
Posts: 41
Joined: Wed Sep 07, 2005 4:19 pm
Location: Edinburgh

Post by Dr_Ian »

That's really good. A slight bug: the second line=255 should be line=0. After that it works perfectly. You could make the lineid a parameter of the script therefore making it really general?
User avatar
Apothem
Posts: 2070
Joined: Sat Nov 29, 2003 7:13 pm
Location: Performing open heart surgery on an ACS compiler.

Post by Apothem »

Line 3, got } expected {. Aside from that, It looks like it should run properly. I'll check it for syntax more closely when I have time later today. After looking at your script, I think I'm gonna have to add a thing or two to the guidlines... *updates*

Make sure to add a description at the top with an explanation of all tid's, line id's, and sector id's used.

EDIT: I'm going to break off the camera script I'm using for vehicles, fix it up a bit, comment and document it and post it here in this thread. I know some of you may want to have this.
User avatar
jallamann
Posts: 2271
Joined: Mon May 24, 2004 8:25 am
Location: Ålesund, Norway
Contact:

Post by jallamann »

RPG script. Note that this isn't the same version as the one on my home page. I haven't tried compiling it, but if I don't suck too hard, it should work.
To make a monster give XP on death, make one of the death frames have ACS_Execute(scriptnum,0,0,0,0) in it.
Spoiler: this thing is kinda long
Report any bugs in the code, please.
User avatar
Apothem
Posts: 2070
Joined: Sat Nov 29, 2003 7:13 pm
Location: Performing open heart surgery on an ACS compiler.

Post by Apothem »

Are you sure that will require a decorate monster and not just the assignment of the acs_execute as a thing special to the monster? I'm not at a computer to check that but I'm pretty sure you only need to do that in order for it to work right without a decorate entry.
User avatar
jallamann
Posts: 2271
Joined: Mon May 24, 2004 8:25 am
Location: Ålesund, Norway
Contact:

Post by jallamann »

Well, with DECORATE, you don't have to assign specials to every damn monster thing. And maybe you want to have a monster give xp in addition to having a special?
User avatar
Apothem
Posts: 2070
Joined: Sat Nov 29, 2003 7:13 pm
Location: Performing open heart surgery on an ACS compiler.

Post by Apothem »

Well, if that's the case, you might as well pack a decorate with that script as to help with implementation.
User avatar
Shadelight
Posts: 5113
Joined: Fri May 20, 2005 11:16 am
Location: Labrynna

Post by Shadelight »

@jallamann: also, make it so the RPG script works with all the regular Doom2 monsters.
User avatar
Apothem
Posts: 2070
Joined: Sat Nov 29, 2003 7:13 pm
Location: Performing open heart surgery on an ACS compiler.

Post by Apothem »

KingofFlames wrote:@jallamann: also, make it so the RPG script works with all the regular Doom2 monsters.
That's why I said for him to pack a decorate with the script. That would solve that problem.
User avatar
jallamann
Posts: 2271
Joined: Mon May 24, 2004 8:25 am
Location: Ålesund, Norway
Contact:

Post by jallamann »

No. I havent given a rat's ass about the mod that I originally made it for. That's the only reason why I released the script. If someone else wants to do it, fine.
Besides, it would just be adding a line to each monster that you want to give xp's death frame. Even I managed to do that when I was making the mod (and I still don't know much DECORATE). If someone that wants to use these scripts can't be arsed to learn something, they don't deserve ready scripts on a golden platter.
User avatar
Doomguy0505
Posts: 625
Joined: Tue Mar 29, 2005 4:53 am
Contact:

Post by Doomguy0505 »

Making maps in Zen Dynamics
User avatar
Shadelight
Posts: 5113
Joined: Fri May 20, 2005 11:16 am
Location: Labrynna

Post by Shadelight »

What in hell's name does Doomguy's post mean?!
User avatar
Deathsong12
Posts: 1083
Joined: Sat May 07, 2005 1:29 pm
Location: On the hunt

Post by Deathsong12 »

It means he's trying to be Xaser. Unless (Like WWE, which will have a Doom Builder config) you make your mod so that it can be mapped for, people shouldn't even try. I'm touching that file, as it may ruin my memories of Zen Dynamics forever.
User avatar
Shadelight
Posts: 5113
Joined: Fri May 20, 2005 11:16 am
Location: Labrynna

Post by Shadelight »

So what you mean, is, that people can make configs for their maps, so people can make maps using the map? that dosen't seem right to me...... :?
Locked

Return to “Editing (Archive)”