Friendly Detection(resurrection)

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
Discount Ninja
 
Posts: 38
Joined: Tue Dec 18, 2012 11:28 pm
Location: Behind The Drapes

Friendly Detection(resurrection)

#1

Post by Discount Ninja » Mon Oct 26, 2015 5:07 pm

Question: Is there a way to detect if a monster has been raised to a friendly state? I'd like to apply special stats and variables if the monster goes into a state like this. Or even a way to separate the raise states if by an enemy or friend.

Why: It'd be nice to see who was friendly and not in my mod, and give slightly different abilities.

Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

RE: Friendly Detection(resurrection)

#2

Post by Lollipop » Mon Oct 26, 2015 5:27 pm

Although not pretty, you can destinguish non-player actors from each other with inventory items. You will have to check for these items on both ends of an action for this to be conciderable though, and I don't remember how to pull that off.
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there

User avatar
Discount Ninja
 
Posts: 38
Joined: Tue Dec 18, 2012 11:28 pm
Location: Behind The Drapes

RE: Friendly Detection(resurrection)

#3

Post by Discount Ninja » Mon Oct 26, 2015 6:57 pm

That'd be pretty easy to do if I can find a way to detect if a monster is friendly or not.

User avatar
CloudFlash
Zandrone
Posts: 1074
Joined: Mon Jun 04, 2012 5:35 pm
Location: Wonderland (except not really)

RE: Friendly Detection(resurrection)

#4

Post by CloudFlash » Mon Oct 26, 2015 7:08 pm

My suggestion: modify the archvile so that he makes a small a_explode with unique damage type after he is done reviving a monster, modify the monster so that if it's hit by the special damage type, he disappears and instead spawns the friendly version of itself.
Alternatively, you could try peeking at how Zdoomwars did it, because I'm pretty sure Zdoomwars did it somehow
https://i.imgflip.com/i5tpe.jpg
*Hey, who wants to hear my solution to the modern world's problems? ^Me! %Me! @Me! #Me! *WELL TOO BAD @Did he just stab himself with this butcher knife? %Looks like it ^Hey, the pizza guy arrived! %Pizza! Yey

User avatar
Ænima
Addicted to Zandronum
Posts: 3579
Joined: Tue Jun 05, 2012 6:12 pm

RE: Friendly Detection(resurrection)

#5

Post by Ænima » Mon Oct 26, 2015 8:44 pm

Put this in a script and call it via ACS_ExecuteAlways in the monster's "Raise" state:

Code: Select all

if (GetActorProperty(0, APROP_Friendly) == TRUE)
{
// give inventory item, set a different DECORATE state, spawn a different actor instead, do whatever you want here
}
Last edited by Ænima on Mon Oct 26, 2015 8:45 pm, edited 1 time in total.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

User avatar
Discount Ninja
 
Posts: 38
Joined: Tue Dec 18, 2012 11:28 pm
Location: Behind The Drapes

RE: Friendly Detection(resurrection)

#6

Post by Discount Ninja » Tue Oct 27, 2015 8:24 am

That works too, thanks!

But, I found a simpler way.
TNT1 A 0 A_CheckFlag("Friendly","State goes here",AAPTR_DEFAULT)

Figures I'd find a solution as soon as I ask. =P
Last edited by Discount Ninja on Tue Oct 27, 2015 8:24 am, edited 1 time in total.

User avatar
Ænima
Addicted to Zandronum
Posts: 3579
Joined: Tue Jun 05, 2012 6:12 pm

RE: Friendly Detection(resurrection)

#7

Post by Ænima » Tue Oct 27, 2015 9:22 am

Discount Ninja wrote: That works too, thanks!

But, I found a simpler way.
TNT1 A 0 A_CheckFlag("Friendly","State goes here",AAPTR_DEFAULT)

Figures I'd find a solution as soon as I ask. =P
Ah. I forgot about A_CheckFlag.


You're welcome anyways. :p
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Post Reply