[DECORATE] VictimTID

Moderator: GZDoom Developers

User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm

Post by Xaser »

Hmm... if this is added, it would make possible an idea that someone was discussing on IRC earlier today... the ability to make a weapon that behaves like the Demi attack from the FF series (cuts an enemy's health in half). Either way, this would be quite useful for several different things, assuming it's even possible. :P
NiGHTMARE
Posts: 3463
Joined: Sat Jul 19, 2003 8:39 am

Post by NiGHTMARE »

What happens if two or more target get hit by VictimTID projectiles at the same time?
User avatar
Lumpy
Posts: 256
Joined: Tue Jul 15, 2003 5:29 pm
Location: Pa,USA

Post by Lumpy »

The special would be applied to all of them when, and if they got hit. That is the point of Cutty's request. He wants the weapon special to be applied to every thing that gets hit by it's projectile no matter what their tid is.

And the easiest way of doing that is generalizing it into VictimTID.

Either that or write a line in DECORATE for each tid possile. Which is what 255, or 999?
NiGHTMARE
Posts: 3463
Joined: Sat Jul 19, 2003 8:39 am

Post by NiGHTMARE »

I get that. But think about the sequence of events for a moment:

1) There's a script which checks for VictimTID to be set.

2) Target is hit by projectile, and VictimTID is set.

3) Script begins.

4) While the script is still running, another target is hit by projectile.

Since the script is still running when a new VictimTID is set, I'm thinking that thereotically either the second target wouldn't trigger the script at all, or it would immediately transfer from the first target to the second.

Basically, there are two potential problems:

1) How can a script detect that a new VictimTID is set when the script has just been triggered and hasn't yet terminated?

1) Can a single script be running more than once, at the same time?
Last edited by NiGHTMARE on Sat Sep 10, 2005 6:32 pm, edited 2 times in total.
User avatar
Belial
Posts: 1616
Joined: Wed Feb 09, 2005 3:09 pm

Post by Belial »

I guess he wants it for a special weapon which probably has a very low refire rate.
User avatar
Lumpy
Posts: 256
Joined: Tue Jul 15, 2003 5:29 pm
Location: Pa,USA

Post by Lumpy »

Oh O.K. Nightmare I see your point. I don't believe more than one instance of a script can be running at the same time. So I totally get your point now. I never thought about that.
User avatar
Caligari87
Admin
Posts: 6246
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him

Post by Caligari87 »

I would think that VictimTID would be a unique identifier, not any particular number, and once the weapon, projectile, or script that was using stopped, the tid would be freed. As for multiple instances of the script, that would be up to what special was being used to execute said script, and the unique victimTID would go to each instance.

Basicly, this would be an "invisible TID", that existed, but only for what was calling it. Theroeticly, it would be a byte, so up to 255 monsters could be affected individually.

8-)
User avatar
Doomguy0505
Posts: 625
Joined: Tue Mar 29, 2005 4:53 am

Post by Doomguy0505 »

User avatar
Enjay
 
 
Posts: 27380
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Post by Enjay »

What about 2 monsters who get hit by the same shot? eg a ripper projectile or an explosion damage.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

First hit counts.
User avatar
Caligari87
Admin
Posts: 6246
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him

Post by Caligari87 »

Or they're assigned the same victimtid.

8-)

Return to “Closed Feature Suggestions [GZDoom]”