(0002644)
|
ZzZombo
|
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.
|
|