A couple ACS questions, mainly about 'who did what'

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.
Locked
User avatar
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'

Post by SirTimberWolf »

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
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Post by Risen »

1. Yes. A map can be set so that the killer of a monster is the activator of its death script.
2. Yes.
3. TIDs, no. Values, yes, though you are limited to 64 values or arrays.
4. Yes.
5. I don't know... wait for .64?
User avatar
Macil
Posts: 2529
Joined: Mon Mar 22, 2004 7:00 pm
Preferred Pronouns: He/Him
Location: California, USA. Previously known as "Agent ME".
Contact:

Post by Macil »

5) Most likely yes in .64
User avatar
GeeDougg
Posts: 3651
Joined: Fri Jul 16, 2004 2:39 pm
Location: VanCity, British Colonies, Isolated Republic Of Canuckistan
Contact:

Post by GeeDougg »

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.... :lol:
User avatar
Macil
Posts: 2529
Joined: Mon Mar 22, 2004 7:00 pm
Preferred Pronouns: He/Him
Location: California, USA. Previously known as "Agent ME".
Contact:

Post by Macil »

The only way to do #5 right now is to hijack a hexen weapon (or some other game) thru KEYCONF
skadoomer
Posts: 1026
Joined: Fri Sep 05, 2003 12:49 pm

Re: A couple ACS questions, mainly about 'who did what'

Post by skadoomer »

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*)
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)
User avatar
SirTimberWolf
Posts: 337
Joined: Tue Sep 16, 2003 3:45 pm
Location: Syracuse New York
Contact:

Post by SirTimberWolf »

Thanks for the answers guys, too bad about the medic thing =(
oh well.. Thanks again
User avatar
Cutmanmike
Posts: 11351
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Post by Cutmanmike »

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
User avatar
Kate
... in rememberance ...
Posts: 2975
Joined: Tue Jul 15, 2003 8:06 pm

Post by Kate »

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:

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.
User avatar
darkhaven3
Posts: 502
Joined: Mon Jan 05, 2004 5:33 am
Location: East Germany, 2023
Contact:

Post by darkhaven3 »

Risen wrote: 3. TIDs, no

Code: Select all

#include "zcommon.acs"

Script 1 OPEN
{

    SetActorProperty(0, ( tid ( tid=PlayerNumber() ) );

}

Not tested, but I believe that would be fairly close to the code you would use to carry over Player ID's. Of course, one would have to do a little defining of "tid"...
Last edited by darkhaven3 on Sun Sep 26, 2004 2:11 am, edited 1 time in total.
User avatar
David Ferstat
Posts: 1113
Joined: Wed Jul 16, 2003 8:53 am
Location: Perth, Western Australia
Contact:

Post by David Ferstat »

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.
Last edited by David Ferstat on Sun Sep 26, 2004 9:09 am, edited 1 time in total.
User avatar
Kate
... in rememberance ...
Posts: 2975
Joined: Tue Jul 15, 2003 8:06 pm

Post by Kate »

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:

Code: Select all

Script 1 enter
{
        Thing_ChangeTID(0, 256+PlayerNumber());
}
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.
User avatar
darkhaven3
Posts: 502
Joined: Mon Jan 05, 2004 5:33 am
Location: East Germany, 2023
Contact:

Post by darkhaven3 »

I always thought it was 1000+PlayerNumber(); to cancel out the need for a TID.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Dark: 1000+PlayerNumber just assigns tids 1000-1007 to the players, while 256+PlayerNumber assigns tids 256-263 to the players.
Locked

Return to “Editing (Archive)”