by wildweasel » Wed Dec 20, 2017 6:11 pm
Code: Select all
ACTOR ShotgunGiver : CustomInventory replaces Shotgun
{
Inventory.PickupMessage "KS-23 Riot Shotgun: \"Turns a riot into a laugh riot!\""
Inventory.PickupSound "misc/w_pkup"
Scale 0.3
States
{
Spawn:
TNT1 A 0 NoDelay A_CheckFlag("TOSSED", "DropNothing")
KSSG A -1
Wait
DropNothing:
TNT1 A 0
Stop
Pickup:
TNT1 A 0 A_JumpIfInventory("PumpShotgun", 1, 2)
TNT1 A 0 A_GiveInventory("PumpShotgun", 1)
Stop
TNT1 A 0 A_GiveInventory("DualPumpShotgun", 1)
TNT1 A 0 A_Log("Now with twice the taste! (Dual Wield)")
Stop
}
}
This CustomInventory item is designed to handle the giving of dual-wielding for a specific weapon in WW-Cola3 - it gives PumpShotgun first, but DualPumpShotgun if the player already has PumpShotgun, and then displays an auxiliary pickup message indicating that dual-wield is available. However, I'm noticing that the A_Log statement is appearing
before the natural pickup message in game, for example:
Code: Select all
Now with twice the taste! (Dual Wield)
KS-23 Riot Shotgun: "Turns a riot into a laugh riot!"
Which doesn't quite fit the intended delivery of the message. Is this some sort of undefined behavior I'm encountering here? Is there a more proper way to make the A_Log happen after the pickup message?
[code]ACTOR ShotgunGiver : CustomInventory replaces Shotgun
{
Inventory.PickupMessage "KS-23 Riot Shotgun: \"Turns a riot into a laugh riot!\""
Inventory.PickupSound "misc/w_pkup"
Scale 0.3
States
{
Spawn:
TNT1 A 0 NoDelay A_CheckFlag("TOSSED", "DropNothing")
KSSG A -1
Wait
DropNothing:
TNT1 A 0
Stop
Pickup:
TNT1 A 0 A_JumpIfInventory("PumpShotgun", 1, 2)
TNT1 A 0 A_GiveInventory("PumpShotgun", 1)
Stop
TNT1 A 0 A_GiveInventory("DualPumpShotgun", 1)
TNT1 A 0 A_Log("Now with twice the taste! (Dual Wield)")
Stop
}
}[/code]
This CustomInventory item is designed to handle the giving of dual-wielding for a specific weapon in WW-Cola3 - it gives PumpShotgun first, but DualPumpShotgun if the player already has PumpShotgun, and then displays an auxiliary pickup message indicating that dual-wield is available. However, I'm noticing that the A_Log statement is appearing [i]before[/i] the natural pickup message in game, for example:
[code]Now with twice the taste! (Dual Wield)
KS-23 Riot Shotgun: "Turns a riot into a laugh riot!"[/code]
Which doesn't quite fit the intended delivery of the message. Is this some sort of undefined behavior I'm encountering here? Is there a more proper way to make the A_Log happen after the pickup message?