[DECORATE] VictimTID
Moderator: GZDoom Developers
-
Cutmanmike
- Posts: 11354
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
[DECORATE] VictimTID
Would this be possible at all? Say if I shot a projectile at a monster which had Thing_Spawn(VictimTID, 98, 0, 0), it would spawn Archvileflames on the monster (Not the same effect as an archvile though, just an example).
-
solarsnowfall
- Posts: 1581
- Joined: Thu Jun 30, 2005 1:44 am
-
Cutmanmike
- Posts: 11354
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
-
Bio Hazard
- Posts: 4019
- Joined: Fri Aug 15, 2003 8:15 pm
- Location: ferret ~/C/ZDL $
-
Cutmanmike
- Posts: 11354
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
-
Enjay
-

- Posts: 27393
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
So, you want to be able to have an attack that, if it hits a specified enemy, it does something clever, but if it hits another enemy it will have a different effect?
Or maybe your just looking for a way for things that can not normally target an action specifically on another thing to be able to do so?
Or maybe your just looking for a way for things that can not normally target an action specifically on another thing to be able to do so?
-
Cutmanmike
- Posts: 11354
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
-
Caligari87
- Admin
- Posts: 6246
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
-
Lumpy
- Posts: 256
- Joined: Tue Jul 15, 2003 5:29 pm
- Location: Pa,USA
actually I think he is asking for a general VictimTID to be applied to the reciever of your punishment.
So that way if you kill a baron with tid 1, or 2, or 3, or etc... etc... The special applied to the weapon would not need to know the TID of every single enemy on every single map to do the special, cuz the tid of every shootable thing, that you would shoot with the gun would get generalized into VictimTID.
Boy explaining that almost confused ME! Anyway I hope that's what he is asking for, if not then I'm a blathering idiot.
So that way if you kill a baron with tid 1, or 2, or 3, or etc... etc... The special applied to the weapon would not need to know the TID of every single enemy on every single map to do the special, cuz the tid of every shootable thing, that you would shoot with the gun would get generalized into VictimTID.
Boy explaining that almost confused ME! Anyway I hope that's what he is asking for, if not then I'm a blathering idiot.
-
Caligari87
- Admin
- Posts: 6246
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
-
wildweasel
- Posts: 21706
- Joined: Tue Jul 15, 2003 7:33 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): A lot of them
- Graphics Processor: Not Listed
-
Cutmanmike
- Posts: 11354
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
-
Enjay
-

- Posts: 27393
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
-
TheDarkArchon
- Posts: 7656
- Joined: Sat Aug 07, 2004 5:14 am
- Location: Some cold place
-
Caligari87
- Admin
- Posts: 6246
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
That's it, except the victim doesn't need a tid already. VictimTID just refers to whatever the projectile hit, and probably wouldn't be available outside of the code for the weapon, unless each victimTID was essentially unique and the DECORATE weapon/projectile called the script with VictimTID as a parameter. This might need a new "HitActor" state for projectiles, though.
The effect of this projectile would be spawning flames on the hit actor for a random length of time, through the Death state.
this one would do the effects by calling an ACS script with VictimTID sent as a parameter.
Please excuse my horrible syntax, it's just psudo-code.
Both would create flames on the hit actor for a random amount of time, although the script gives you greater control (1 to 10 seconds).This might require a HitActor deathstate on projectiles, or an A_JumpIfNoHit(x) action special, so that the effect isn't done with no target, creating an error.

The effect of this projectile would be spawning flames on the hit actor for a random length of time, through the Death state.
Code: Select all
ACTOR ElectroMissile : DoomImpBall
{
Death:
XXXX ABCDE 5
XXXX E 0 A_jump(50, 1)
XXXX E 35 Thing_Spawn("Fire", VictimTID) //I can't remember my syntax, but you get the idea
Goto Death+6
XXXX E 1
Stop
}Code: Select all
ACTOR ElectroMissile : DoomImpBall
{
Death:
XXXX ABCDE 5
XXXX E 1 ACS_Execute(1,0,VictimTID,0,0)//More syntax forgetfulness
Stop
}
Script 1 (int Victim)
{
int j=random(1,10);
for(int i=1;i<j;i++) {
Thing_Spawn("Fire", VictimTID);
delay(35);
}
}Both would create flames on the hit actor for a random amount of time, although the script gives you greater control (1 to 10 seconds).This might require a HitActor deathstate on projectiles, or an A_JumpIfNoHit(x) action special, so that the effect isn't done with no target, creating an error.