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.
Hi. I'm trying to make a friendly monster turn into an inventory item when it dies, so you can carry it with you and summon it later.
I've gotten the monster to change into a health bonus on death, but I can't figure out how to code decorate to pick it up.
Here's my jumbled mess of a noob's first mod:
Spoiler:
Actor Demoness : HellKnight
{
Health 1500
Painchance 25
Speed 8
+FRIENDLY
+FLOORCLIP
+QUICKTORETALIATE
+NOTELEFRAG
+THRUSPECIES
Species Demoness
XScale 0.8
YScale 1.0
states
{
Spawn:
BOS2 AB 10 A_Look
loop
See:
BOS2 AABBCCDD 3 A_Chase
loop
Melee:
Missile:
BOS2 E 0 A_Jump(15,"Brood1")
BOS2 E 0 A_Jump(10,"Brood2")
BOS2 EF 8 A_FaceTarget
BOS2 G 8 A_CustomMissile("DemonessBall",48,0)
goto See
Brood1:
BOS2 EF 8 A_FaceTarget
BOS2 H 48 A_Pain
BOS2 H 0 A_CustomMissile("SmallBloodPool",20,0)
BOS2 H 48 A_CustomMissile("BroodKnight",20,0)
goto See
Brood2:
BOS2 EF 8 A_FaceTarget
BOS2 H 48 A_Pain
BOS2 H 0 A_CustomMissile("SmallBloodPool",20,0)
BOS2 H 48 A_CustomMissile("BroodBaron",20,0)
goto See
Pain:
BOS2 H 2
BOS2 H 2 A_Pain
goto See
Death:
BOS2 I 8 A_Scream
BOS2 I 8 A_NoBlocking
BOS2 I 0 A_SpawnItemEx("SummonDemoness1") //works, but isn't added to my inventory <--
BOS2 I 0 A_ChangeFlag("INVISIBLE",1)
stop
Raise:
stop
}
}
actor SummonDemoness1 : CustomInventory //tried to use the strife beacon for the state, GZdoom was not amused on the give command. <--
{
-COUNTITEM
-INVENTORY.ALWAYSPICKUP
+INVENTORY.INVBAR
+DROPPED
Inventory.Icon "BON1"
inventory.pickupmessage "Use this so summon the Demoness"
inventory.pickupsound "misc/p_pkup"
Inventory.Amount 1
Inventory.MaxAmount 1
States
{
Spawn:
BON1 ABCDCB 6
Loop
Pickup:
TNT1 A 0 A_GiveInventory ("SummonDemoness1",1)
stop
Drop:
BON1 ABCDCB 6
BON1 ABCDCB 48 A_CustomMissile("Demoness",20,0)
Wait
Death:
BON1 A 1 A_FadeOut(0.015)
Loop
}
}