[SOLVED] Actor Flag Change?

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
A-Bomb
Posts: 16
Joined: Sun Feb 21, 2016 4:56 pm
Location: Glengary, WV, US

[SOLVED] Actor Flag Change?

Post by A-Bomb »

Hello all, I've searched and not yet found any function or general method about changing an Actor's flags in a way that doesn't require:
  • Using A_ChangeFlag() within the actor's definition (by the way, I don't want to use this way about it simply because I want the functionality I'm adding to be able to apply to any arbitrary monster without the need to extend any specific monster classes)
  • Using SetActorProperty() in an ACS script (I just want to see if it can be done without ACS)
Is there any way to accomplish this without using the above? Here's an example:

Let's say I wanted to create a projectile that turns regular monsters into friendly monsters. In this projectile, I've enabled the HITTARGET flag so now upon Death I have the ability to obtain the Actor pointer of the monster which it hit. Using this information, would I be able to disable the FRIENDLY flag of the monster from within the Death state of the projectile?

Remember, the point of this is to have this work with any arbitrary monster class without extending existing classes or using ACS. Is this possible? Thank you for bearing with me, I'm still new to DECORATE!
Last edited by A-Bomb on Wed Mar 02, 2016 10:11 am, edited 1 time in total.
Blue Shadow
Posts: 5046
Joined: Sun Nov 14, 2010 12:59 am

Re: Actor Flag Change?

Post by Blue Shadow »

A-Bomb wrote:Let's say I wanted to create a projectile that turns regular monsters into friendly monsters. In this projectile, I've enabled the HITTARGET flag so now upon Death I have the ability to obtain the Actor pointer of the monster which it hit. Using this information, would I be able to disable the FRIENDLY flag of the monster from within the Death state of the projectile?
Through the Death state sequence of the projectile, give (via [wiki]A_GiveToTarget[/wiki], for instance) the monster a CustomInventory-derived item which has a Pickup state that calls A_ChangeFlag.
User avatar
A-Bomb
Posts: 16
Joined: Sun Feb 21, 2016 4:56 pm
Location: Glengary, WV, US

Re: Actor Flag Change?

Post by A-Bomb »

Through the Death state sequence of the projectile, give (via [wiki]A_GiveToTarget[/wiki], for instance) the monster a CustomInventory-derived item which has a Pickup state that calls A_ChangeFlag.
Ahah! I had heard about this "CustomInventory" stuff before but I'd never ventured far into this area. Much obliged friend, I shall look into this right away!
Locked

Return to “Editing (Archive)”