ACS Prefab Database
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.
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.
- Apothem
- Posts: 2070
- Joined: Sat Nov 29, 2003 7:13 pm
- Location: Performing open heart surgery on an ACS compiler.
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*)
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
}
}
- Apothem
- Posts: 2070
- Joined: Sat Nov 29, 2003 7:13 pm
- Location: Performing open heart surgery on an ACS compiler.
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.
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.
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.
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 longReport any bugs in the code, please.
- Shadelight
- Posts: 5113
- Joined: Fri May 20, 2005 11:16 am
- Location: Labrynna
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.
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.
- Doomguy0505
- Posts: 625
- Joined: Tue Mar 29, 2005 4:53 am
- Contact:
- Shadelight
- Posts: 5113
- Joined: Fri May 20, 2005 11:16 am
- Location: Labrynna
- Deathsong12
- Posts: 1083
- Joined: Sat May 07, 2005 1:29 pm
- Location: On the hunt
- Shadelight
- Posts: 5113
- Joined: Fri May 20, 2005 11:16 am
- Location: Labrynna