[DECORATE] SXF_SETMASTER and A_KillChildren not working with players?
Posted: Sat Apr 22, 2017 7:27 pm
I heard they actually work on players summoning monsters but if so i guess i am doing something wrong cause i made an item that makes it so automatically executes A_KillChildren if the item is used again to avoid duplicates but it doesn't appear to be working whatsoever, here's my code:
Before you ask, "Grenade cooldown" is a code i made so there is a delay between item uses so people doesn't just spam them at will.
Code: Select all
ACTOR NootTurretD : CustomInventory 12011
{
+COUNTITEM
+INVENTORY.INVBAR
Inventory.MaxAmount 3
Inventory.Icon "TURET1"
Inventory.PickupMessage "Got a deployable turret"
States
{
Spawn:
GGND A -1
Stop
Use:
TNT1 A 0 A_JumpIfInventory("GrenadeCooldown", 1, "Cooldown")
TNT1 A 0 A_GiveInventory ("GrenadeCooldown", 1)
TNT1 A 1 A_SpawnItemEx ("NootSummonCheck", 0, 0, 5, 56, 0, 0, 0, 1)
TNT1 A 0 ACS_NamedExecute("GrenadeCooldown", 0)
Fail
Cooldown:
TNT1 A 1
Fail
}
}
ACTOR NootSummonCheck
{
Radius 10
Height 36
Speed 56
Damage 0
Projectile
RenderStyle Add
Alpha 0.75
DeathSound "weapons/plasmax"
States
{
Spawn:
NOOT C 1 Bright
NOOT C 0 A_Takefromtarget("NootTurretD", 1)
NOOT C 0 A_givetotarget("NootSummonConfirm", 1)
stop
Death:
PLSE ABCDE 4 Bright
Stop
}
}
ACTOR NootSummonConfirm : CustomInventory
{
+INVENTORY.ALWAYSPICKUP
+INVENTORY.AUTOACTIVATE
States
{
Spawn:
TNT1 A -1
Loop
Use:
TNT1 A 1
TNT1 A 0 A_KillChildren
TNT1 A 0 A_SpawnItemEx ("NootTurret", 56, 0, 5, 0, 0, 0, 0, SXF_TRANSFERTRANSLATION|SXF_SETMASTER)
stop
}
}