Zandronum Chat on our Discord Server Get the latest version: 3.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000661Zandronum[All Projects] Suggestionpublic2012-01-26 18:082018-09-30 23:07
ReporterMinigunner 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version2.0Fixed in Version2.0 
Summary0000661: Backport A_SetArg, as well as the DECORATE user-variable and user-array system
DescriptionA_SetArg (from ZDoom 2.5.0) allows an actors args, which are already definable via DECORATE, to be altered via DECORATE.

The user variable system (also from ZDoom 2.5.0) is different from the ACS variable system in that it is actor-specific and that the values carry over to and can be set via DECORATE. Same with the user array system. Despite the fact that these are two ZDoom versions ahead of ST, they should be backported as today's mods get more complex and use substantial amounts of ACS and variables.
Additional Information'http://zdoom.org/wiki/A_SetArg [^]'

'http://zdoom.org/wiki/A_SetUserVar [^]'
'http://zdoom.org/wiki/GetUserVariable [^]'
'http://zdoom.org/wiki/SetUserVariable [^]'

'http://zdoom.org/wiki/A_SetUserArray [^]'
'http://zdoom.org/wiki/GetUserArray [^]'
'http://zdoom.org/wiki/SetUserArray [^]'
Attached Files

- Relationships
child of 0001490closedTorr Samaho Backport ZDoom 2.5.0 

-  Notes
User avatar (0002644)
ZzZombo (reporter)
2012-02-19 07:15
edited on: 2012-07-30 11:40

I strongly support this issue, I'm damn currently very limited to use Inventory instead of normal variables.

Since Torr asked me to explain why I need this feature, I do so. I just leave here two examples of my usual work.
actor UACRobot:HumansTeam 30001
{//$Category Infected Horde NPCs
    Obituary "%o was shot down by a UAC Bot."
    Health 3000
    Radius 40
    Height 110
    Mass 3000
    Speed 16
    PainChance 0
    SeeSound "uacbsee"
    AttackSound "chainguy/attack"
    ActiveSound "uacbact"
    DeathSound "dsbarexp"
    DamageType "UACRobotBullet"
    DamageFactor "GunShot",0
    DamageFactor "Melee",0.5
    DamageFactor "UACRobotGrenade",1.7
    DamageFactor "UACRobotStomp",0
    DamageFactor "UACRobotBullet",0.9
    MONSTER
    +NOPAIN
    +NOBLOOD
    +BOSS
    +FLOORCLIP
    +NORADIUSDMG
    +DONTMORPH
    +MISSILEEVENMORE
    +NOTELEPORT
    +NOINFIGHTING
    +NOTIMEFREEZE
    //+DOHARMSPECIES
    //+SEEINVISIBLE
    //-DONTHARMCLASS
    States
    {
        Spawn:
        TNT1 A 0
        TNT1 A 0 A_GiveInventory("UACRobotGrenadeAmmo",50)
        TNT1 A 0 A_GiveInventory("ChaingunAmmo",500)
        Idle:
        UACB G 10 A_Look
        loop
        Idle.NoAmmo:
        UACB A 3 A_Hoof
        UACB A 3 A_Chase("","")
        UACB B 3 A_Metal
        UACB BCC 3 A_Chase("","")
        UACB D 3 A_Hoof
        UACB D 3 A_Chase("","")
        UACB E 3 A_Metal
        UACB EFF 3 A_Chase("","")
        loop
        See:
        UACB A 3 A_Hoof
        UACB A 3 A_Chase
        UACB B 3 A_Metal
        UACB BCC 3 A_Chase
        UACB D 3 A_Hoof
        UACB D 3 A_Chase
        UACB E 3 A_Metal
        UACB EFF 3 A_Chase
        loop
        Missile:
        TNT1 A 0 A_JumpIfInventory("GrenadeAmmo",1,2)
        TNT1 A 0 A_Jump(255,4)
        TNT1 A 0 A_JumpIfCloser(512,2)
        TNT1 A 0 A_Jump(255,2)
        TNT1 A 0 A_Jump(210,"Missile.GrenadeLauncher")
        TNT1 A 0 A_JumpIfInventory("ChaingunAmmo",1,2)
        TNT1 A 0 A_Jump(255,"Idle.NoAmmo")
        Missile.Chaingun:
        UACB G 2 A_FaceTarget
        UACB H 3 bright A_CPosAttack
        TNT1 A 0 A_TakeInventory("ChaingunAmmo",1)
        UACB G 2 A_SpidRefire
        goto Missile
        Missile.GrenadeLauncher:
        UACB G 6 A_FaceTarget
        TNT1 A 0 A_PlaySound("grenpop",CHAN_AUTO)
        UACB IJ 3 A_FaceTarget
        TNT1 A 0 A_PlaySound("gren")
        UACB K 6 bright A_CustomMissile("UACRobotGrenade",106,0,0)
        TNT1 A 0 A_TakeInventory("GrenadeAmmo",1)
        UACB J 6 A_FaceTarget
        TNT1 A 0 A_PlaySound("grenpop",CHAN_AUTO)
        UACB JIG 3 A_FaceTarget
        goto Missile
        Death:
        TNT1 A 0 bright
        UACD K 4 bright A_Scream
        UACD L 4 bright
        UACD MN 4 bright
        UACD O 4 A_NoBlocking
        UACD PQR 4
        UACD S 30
        UACD T 4 bright A_Scream
        UACD UVW 4 bright
        UACD XYZAB 2
        UACD C -1 A_BossDeath
        stop
    }
}
...

With user variables it might look like:
actor UACRobot:HumansTeam 30001
{//$Category Infected Horde NPCs
    Obituary "%o was shot down by a UAC Bot."
    Health 3000
    Radius 40
    Height 110
    Mass 3000
    Speed 16
    PainChance 0
    SeeSound "uacbsee"
    AttackSound "chainguy/attack"
    ActiveSound "uacbact"
    DeathSound "dsbarexp"
    DamageType "UACRobotBullet"
    DamageFactor "GunShot",0
    DamageFactor "Melee",0.5
    DamageFactor "UACRobotGrenade",1.7
    DamageFactor "UACRobotStomp",0
    DamageFactor "UACRobotBullet",0.9
    MONSTER
    +NOPAIN
    +NOBLOOD
    +BOSS
    +FLOORCLIP
    +NORADIUSDMG
    +DONTMORPH
    +MISSILEEVENMORE
    +NOTELEPORT
    +NOINFIGHTING
    +NOTIMEFREEZE
        var int user_grenadeammo;
        var int user_chaingunammo;
    States
    {
        Spawn:
        TNT1 A 0
        TNT1 A 0 A_SetUserVar("user_grenadeammo",50)
        TNT1 A 0 A_SetUserVar("user_chaingunammo",500)
        Idle:
        UACB G 10 A_Look
        loop
        Idle.NoAmmo:
        UACB A 3 A_Hoof
        UACB A 3 A_Chase("","")
        UACB B 3 A_Metal
        UACB BCC 3 A_Chase("","")
        UACB D 3 A_Hoof
        UACB D 3 A_Chase("","")
        UACB E 3 A_Metal
        UACB EFF 3 A_Chase("","")
        loop
        See:
        UACB A 3 A_Hoof
        UACB A 3 A_Chase
        UACB B 3 A_Metal
        UACB BCC 3 A_Chase
        UACB D 3 A_Hoof
        UACB D 3 A_Chase
        UACB E 3 A_Metal
        UACB EFF 3 A_Chase
        loop
        Missile:
        TNT1 A 0 A_JumpIf(user_grenadeammo>0,2)
        TNT1 A 0 A_Jump(255,4)
        TNT1 A 0 A_JumpIfCloser(512,2)
        TNT1 A 0 A_Jump(255,2)
        TNT1 A 0 A_Jump(210,"Missile.GrenadeLauncher")
        TNT1 A 0 A_JumpIf(user_chaingunammo>0,2)
        TNT1 A 0 A_Jump(255,"Idle.NoAmmo")
        Missile.Chaingun:
        UACB G 2 A_FaceTarget
        UACB H 3 bright A_CPosAttack
        TNT1 A 0 A_SetUservar(user_chaingunammo,user_chaingunammo-1)
        UACB G 2 A_SpidRefire
        goto Missile
        Missile.GrenadeLauncher:
        UACB G 6 A_FaceTarget
        TNT1 A 0 A_PlaySound("grenpop",CHAN_AUTO)
        UACB IJ 3 A_FaceTarget
        TNT1 A 0 A_PlaySound("gren")
        UACB K 6 bright A_CustomMissile("UACRobotGrenade",106,0,0)
        TNT1 A 0 A_SetUservar(user_grenadeammo,user_grenadeammo-1)
        UACB J 6 A_FaceTarget
        TNT1 A 0 A_PlaySound("grenpop",CHAN_AUTO)
        UACB JIG 3 A_FaceTarget
        goto Missile
        Death:
        TNT1 A 0 bright
        UACD K 4 bright A_Scream
        UACD L 4 bright
        UACD MN 4 bright
        UACD O 4 A_NoBlocking
        UACD PQR 4
        UACD S 30
        UACD T 4 bright A_Scream
        UACD UVW 4 bright
        UACD XYZAB 2
        UACD C -1 A_BossDeath
        stop
    }
}

Advantages: no need in declaring a bunch if unused otherwise inventory actors (here were shown only two of them, but I already have declared 0000002:0000050-60 of them), inheritance, does work in inventory itself -- VERY useful when you wish to store amount of items equipped from an item in order to give only limited amount without complex ACS and Decorate scripting.

User avatar (0007460)
Qent (updater)
2013-10-24 18:10

These all work in 131006.

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: ZzZombo Esum
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2012-01-26 18:08 Minigunner New Issue
2012-02-19 07:15 ZzZombo Note Added: 0002644
2012-07-30 11:40 ZzZombo Note Edited: 0002644 View Revisions
2013-09-09 10:42 Dusk Relationship added child of 0001490
2013-09-09 10:43 Dusk Target Version => 2.0
2013-10-24 18:10 Qent Note Added: 0007460
2013-10-24 18:10 Qent Status new => resolved
2013-10-24 18:10 Qent Fixed in Version => 2.0-beta
2013-10-24 18:10 Qent Resolution open => fixed
2013-10-24 18:10 Qent Assigned To => Qent
2015-01-23 04:55 Blzut3 Assigned To Qent =>
2015-01-23 04:55 Blzut3 Fixed in Version 2.0-beta => 2.0
2018-09-30 23:07 Blzut3 Status resolved => closed






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker