A couple ACS questions, mainly about 'who did what'
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.
- SirTimberWolf
- Posts: 337
- Joined: Tue Sep 16, 2003 3:45 pm
- Location: Syracuse New York
- Contact:
A couple ACS questions, mainly about 'who did what'
alirhgt, im working on a little squad based coop map set and I want to impliment classes and a level up system... However Im at a loss (this is all in the planning stages) as to
1) Can zdoom check who killed what monsters.
2) Can tids be assigned in multiplayer.
3) Can tids or values be carried in between maps without a complex array system (Im not very proficient in acs as you might have guessed >_>;;)
4) Can tids be checked when someone does something; Example: Player 1 opens a door and scores xyz experience points for it or something.
5) Can a weapon be made that actualy heals damage instead of causing it? (im sure i've seen this around before but im in a rush so I'll ask again *sorry*)
Help is greatly appriciated, thanks for reading
1) Can zdoom check who killed what monsters.
2) Can tids be assigned in multiplayer.
3) Can tids or values be carried in between maps without a complex array system (Im not very proficient in acs as you might have guessed >_>;;)
4) Can tids be checked when someone does something; Example: Player 1 opens a door and scores xyz experience points for it or something.
5) Can a weapon be made that actualy heals damage instead of causing it? (im sure i've seen this around before but im in a rush so I'll ask again *sorry*)
Help is greatly appriciated, thanks for reading
- GeeDougg
- Posts: 3651
- Joined: Fri Jul 16, 2004 2:39 pm
- Location: VanCity, British Colonies, Isolated Republic Of Canuckistan
- Contact:
Actually I think that's possible right now. Number 5 shouldn't be something you wait for to become possible in .64 I think. As far as I know (err, think) it's a reverse value dealie, so you'd mess around and turn a positive value into a negative value or visa versa and make the weapon heal instead. You could have some sort of Half-Life-like weapon or item that a medic character would use in a TC of sorts. Correct me if I'm wrong, ZDooM super-pros.... 

Re: A couple ACS questions, mainly about 'who did what'
If your intending to use this for multi-player purposes you'll have to wait along with the rest of us for the next zdoom release. However it is possible with a few tricks to make this work in single player mode, but it's a bit messy. (via Dehacked and ACS)SirTimberWolf wrote: 5) Can a weapon be made that actualy heals damage instead of causing it? (im sure i've seen this around before but im in a rush so I'll ask again *sorry*)
- SirTimberWolf
- Posts: 337
- Joined: Tue Sep 16, 2003 3:45 pm
- Location: Syracuse New York
- Contact:
- Cutmanmike
- Posts: 11351
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
- Contact:
Are you all mad? 5 can be done with simple dehacked editing. I've seen it in INSANE.wad.
http://www.doomworld.com/idgames/index.php?id=4442
http://www.doomworld.com/idgames/index.php?id=4442
heh, unfortunately, it also causes the side-effect of a permanently red screen, which gets annoying to the point of all hell after a while... Why not just use ACS with healthing, or use Hexen's Ambit Incant which heals everyone next to you as well as you yourself when used? And if all of the players are going to have tids, you can just use a script to check the distance between them and the person calling the script and heal them accordingly.. Shouldn't be too complicated...
EDIT: I made these two functions, 1 using sqrt, for an abandoned project I was doing, maybe they could be of use:
EDIT: I made these two functions, 1 using sqrt, for an abandoned project I was doing, maybe they could be of use:
Code: Select all
Function Int FindTIDAngle (Int Tid1, Int Tid2)
{
Int X1 = GetActorX(Tid1);
Int Y1 = GetActorY(Tid1);
Int X2 = GetActorX(Tid2);
Int Y2 = GetActorY(Tid2);
Return VectorAngle(X2-X1, Y2-Y1);
}
Function Int FindDistance (Int Tid1, Int Tid2)
{
Int X1 = GetActorX(Tid1)/1.0;
Int Y1 = GetActorY(Tid1)/1.0;
Int X2 = GetActorX(Tid2)/1.0;
Int Y2 = GetActorY(Tid2)/1.0;
Int FirstHalf;
Int SecondHalf;
If (X2 > X1)
FirstHalf = (X2 - X1);
Else
FirstHalf = (X1 - X2);
If (Y2 > Y1)
SecondHalf = (Y2 - Y1);
Else
SecondHalf = (Y1 - Y2);
Return Sqrt((FirstHalf^2)+(SecondHalf^2));
}
Last edited by Kate on Sun Sep 26, 2004 1:35 am, edited 1 time in total.
- darkhaven3
- Posts: 502
- Joined: Mon Jan 05, 2004 5:33 am
- Location: East Germany, 2023
- Contact:
Risen wrote: 3. TIDs, no
Code: Select all
#include "zcommon.acs"
Script 1 OPEN
{
SetActorProperty(0, ( tid ( tid=PlayerNumber() ) );
}
Last edited by darkhaven3 on Sun Sep 26, 2004 2:11 am, edited 1 time in total.
- David Ferstat
- Posts: 1113
- Joined: Wed Jul 16, 2003 8:53 am
- Location: Perth, Western Australia
- Contact:
Try this:
Set up a script to generate a health-kit, and give it a ThrustThing in the direction the player is facing. If you're near enough to your team-mate (assuming that this the situation you have in mind) the health-pack should hit the target and be immediately used by the target.
You may have to experiment with the spawn location of the health-pack, because if it spawns on the player, and the player has less than 100% health, then the player will use it, which probably ain't what you want.
Set up a script to generate a health-kit, and give it a ThrustThing in the direction the player is facing. If you're near enough to your team-mate (assuming that this the situation you have in mind) the health-pack should hit the target and be immediately used by the target.
You may have to experiment with the spawn location of the health-pack, because if it spawns on the player, and the player has less than 100% health, then the player will use it, which probably ain't what you want.
Last edited by David Ferstat on Sun Sep 26, 2004 9:09 am, edited 1 time in total.
tids aren't carried over, but they're assigned by player number(or should be), so they should always stay the same if you use playernumber to determine tid, IE:
should change the player's tid according to his console number(256 for player 1, 257 for player 2, etc.), and console numbers always stay the same throughout the entire game, so it should always assign the same player the same tid. No arrays needed.
Code: Select all
Script 1 enter
{
Thing_ChangeTID(0, 256+PlayerNumber());
}
- darkhaven3
- Posts: 502
- Joined: Mon Jan 05, 2004 5:33 am
- Location: East Germany, 2023
- Contact: