View Issue Details

IDProjectCategoryView StatusLast Update
0000431Gameplay + OpenGL[All Projects] Featurepublic2017-03-14 11:03
ReporterTheCamaleonMaligno 
Assigned To 
PrioritylowSeverityminorReproducibilityhave not tried
Status closedResolutionwon't fix 
Summary0000431: Actor 'Tags' or something like that? and some functions (ZScript)
Descriptioni'd like a feature which allows modders to "classify" actors by using tags (maybe an extended version of the 'Species' property). An example:


This imp will destroy the nearest projectiles, but it'll ignore Magical projectiles (like hexen's spirits), Energy projectiles (like plasma/BFG) and visual effects (like the bouncing pieces of a destroyed stone monster)

Class MagicShieldImp : DoomImp
{
    Default
    {
        Tag "Magic shield imp";
        Health 500;
        Tags "Monster", "Demons", "MediumEnemy", "ImpVariant";
        
Scale 1.15;
    }
    Int Tickie;
    Override Void Tick()
    {
        Super.Tick();
        Tickie++;
        If(Tickie>=35)
        {
            Tickie=0;
            A_DestroyNearProjectiles();
        }
    }
    Virtual Void A_DestroyNearProjectiles()
    {
        Actor mo;
        [Insert thinker iterator snippet here]
        {
            If(mo && mo.bMissile && mo.CheckTag("Projectile") && !mo.CheckTag("MagicalProjectile") 
&& !mo.CheckTag("EnergyProjectile") && !mo.CheckTag("VisualEffect") 
&& mo.target!=self && Distance3D(mo)<=256)
            {
                Mo.ExplodeMissile(); // makes the projectile blow
            }
        }
    }
}
some new functions example:
CheckTag: self explanatory
A_AddTag: Adds a new tag
A_RemoveTag: Removes the specified tag
A_SetTags: Remove all tags and then adds the new ones
A_RemoveTags: Removes all tags

and properties:
Tags: same as A_SetTags
RemoveTag: same as A_RemoveTag
ClearTags: same as A_RemoveTags

the Monster flag combo will also set the "Monster" tag
same for the Projectile flag combo
If you are not sure about what's a flag combo: https://zdoom.org/wiki/actor_properties#Flag_Combos

Remember, this is just a suggestion, thanks for the attention.
TagsGZDoom, ZScript

Relationships

Activities

Graf Zahl

Graf Zahl

2017-03-14 03:55

administrator   ~0000979

This is lumping some stuff together into a clunky, hard to develop feature that will never see the light of day because it's too much work for things that mostly can be done by other means.

TheCamaleonMaligno

TheCamaleonMaligno

2017-03-14 11:03

reporter   ~0000995

Oh, i understand, at least i tried :b
anyways, thanks

Issue History

Date Modified Username Field Change
2017-03-14 00:14 TheCamaleonMaligno New Issue
2017-03-14 00:21 TheCamaleonMaligno Tag Attached: GZDoom
2017-03-14 00:21 TheCamaleonMaligno Tag Attached: ZScript
2017-03-14 03:55 Graf Zahl Status new => closed
2017-03-14 03:55 Graf Zahl Resolution open => won't fix
2017-03-14 03:55 Graf Zahl Note Added: 0000979
2017-03-14 11:03 TheCamaleonMaligno Note Added: 0000995