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

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000678Zandronum[All Projects] Bugpublic2012-02-17 13:102012-02-21 12:31
ReporterZzZombo 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version98d 
Target VersionFixed in Version 
Summary0000678: A_CustomMissile doesn't work in monsters if they haven't something to attack.
DescriptionI tried to create a monster which location is shown with a small green arrow which is attached via call to A_VileTarget. To make it work, I've created new projectile which upon spawning constantly calls A_VileTarget until the monster dies so the arrow is following the monster. I made a call to A_CustomMissile in monster Spawn state but nothing happens. I tried to guess what is wrong and noticed that monsters of this class which sees a player at level start appear to have the arrow but others don't.
Steps To ReproduceUse this DECORATE code and run Skulltag:
actor Pointer:ArchvileFire
{
    RenderStyle Translucent
    Alpha 0.05
    PROJECTILE// to allow it pass through walls
    +NOCLIP// to allow it pass through walls
    +NOINTERACTION// to allow it pass through walls
    +NOTIMEFREEZE
    States
    {
        Spawn:
        Death:
        ACCU A 17 BRIGHT
        ACCU A 10
        stop
    }
}

actor PointerSpawner
{
    PROJECTILE
    +NOTIMEFREEZE
    +SEEKERMISSILE
    +SERVERSIDEONLY
    States
    {
        Death:
        Spawn:
        TNT1 A 0 A_JumpIfInTargetInventory("killed",1,"XDeath")
        TNT1 A 1 A_VileTarget("BarrelPointer")
        loop
        XDeath:
        TNT1 A 35
        stop
    }
}

actor Killed:Inventory {Inventory.maxamount 1}

ACTOR AMonster:DoomImp
{
    Mass 100
    +PUSHABLE
    States
    {
        Spawn:
        TNT1 A 0 A_Jump(255,"Idle")
        TNT1 A 1 Thing_ChangeTID(0,632)
        TNT1 A 0 Thing_Hate(0,632,4)
        TNT1 A 0 A_LookEx(0,0,0,0,0,"See2")
        See2:
        TNT1 A 0 A_CustomMissile("PointerSpawner")
        Idle:
        goto Super::Spawn
    }
}
Additional InformationSpawning AMonster during gameplay via "summon AMonster" sometimes spawns monsters
Attached Files? file icon skulltag_bug_example2.pk3 [^] (1,390 bytes) 2012-02-18 15:10

- Relationships

-  Notes
User avatar (0002630)
Torr Samaho (administrator)
2012-02-18 13:28

Does it work in ZDoom?
User avatar (0002635)
ZzZombo (reporter)
2012-02-18 15:12
edited on: 2012-02-18 15:15

Looks like ZDoom has same behavior, no projectile is spawned if a monster has no target. Also, if you are lazy, I've attached an example WAD. Monsters which spawned at level load time have the pointer but others including summoned later not. Just run MAP01 and see that all replaced zombiemans are hate each other and though have valid target and A_CustomMissile fires PointerSpawner but all replaced DoomImps have not target at A_CustomMissile call time and looks like it doesn't fire any projectiles. Maybe, it's ZDoom odd treatment of CMF_CHECKTARGETDEAD which is checked any time this code pointer is called from a monster regardless of it actual value?

User avatar (0002636)
Torr Samaho (administrator)
2012-02-18 15:28
edited on: 2012-02-18 15:28

> Looks like ZDoom has same behavior

In that case you should report the issue at the ZDoom forums. It could even be possible that ZDoom's behavior is intended (I didn't look at your code in detail). With all the information you already supplied here, it should be easy to create a bug report over at ZDoom.

User avatar (0002637)
Edward-san (developer)
2012-02-18 15:47

Since this problem is related to editing features, I'd like to suggest you to create a new thread in the editing forum:'http://forum.zdoom.org/viewforum.php?f=3 [^]'
User avatar (0002640)
Minigunner (reporter)
2012-02-18 18:42

I work around the issue by calling A_LookEx(LOF_NOSEESOUND,0,0,0,0,<Actual Attack state>). If the target no longer exists, the actor will look for a new one. If one can't be found, use A_SpawnItemEx as an emergency maneuver.
User avatar (0002641)
ZzZombo (reporter)
2012-02-19 00:11
edited on: 2012-02-19 00:21

'http://forum.zdoom.org/viewtopic.php?f=2&t=32019 [^]' -- it's here.

A_SpawnItemEx doesn't transfer calling actor in target field of spawning actor, while A_VileTarget requires the target field to point to actor which you want to be affected. So I have to make my monsters fire a projectile which upon spawning will have tracer pointed to its owner (as described is DECORATE docs) and that allow A_VileTarget to attach hte marker in desired way.

A_LookEx introduces odd behavior described as (in my first tries, without call to Thing_Hate) "monsters which sees a player upon level start have the pointer but others not".

User avatar (0002643)
Torr Samaho (administrator)
2012-02-19 01:43

Thanks! Please report back here when the issue was resolved at ZDoom.
User avatar (0002658)
ZzZombo (reporter)
2012-02-20 13:55

I had to supply CMF_AIMDIRECTION in code pointer call in flags to make my WAD work. Please, close this issue. Thanks FDARI on ZDoom forums who pointed me to my mistake.

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: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2012-02-17 13:10 ZzZombo New Issue
2012-02-18 13:28 Torr Samaho Note Added: 0002630
2012-02-18 13:28 Torr Samaho Status new => feedback
2012-02-18 15:10 ZzZombo File Added: skulltag_bug_example2.pk3
2012-02-18 15:12 ZzZombo Note Added: 0002635
2012-02-18 15:12 ZzZombo Status feedback => new
2012-02-18 15:15 ZzZombo Note Edited: 0002635 View Revisions
2012-02-18 15:28 Torr Samaho Note Added: 0002636
2012-02-18 15:28 Torr Samaho Note Edited: 0002636 View Revisions
2012-02-18 15:47 Edward-san Note Added: 0002637
2012-02-18 18:42 Minigunner Note Added: 0002640
2012-02-19 00:11 ZzZombo Note Added: 0002641
2012-02-19 00:18 ZzZombo Note Edited: 0002641 View Revisions
2012-02-19 00:21 ZzZombo Note Edited: 0002641 View Revisions
2012-02-19 01:43 Torr Samaho Note Added: 0002643
2012-02-19 01:43 Torr Samaho Status new => feedback
2012-02-20 13:55 ZzZombo Note Added: 0002658
2012-02-20 13:55 ZzZombo Status feedback => new
2012-02-21 12:31 Torr Samaho Status new => closed
2012-02-21 12:31 Torr Samaho Resolution open => no change required
2012-06-09 13:22 Torr Samaho Category General => Bug






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker