Skip to content

Ambiguities in "Custom functions" section #2

@Kzer-Za

Description

@Kzer-Za

In the end of this section there is an example of custom version of A_MonsterRefire. The Missile state has TNT1 A 0 A_MonsterRefire(5,"AttackEnd");

Isn't it supposed to be CustomMonsterRefire(5,"AttackEnd")?

Also, the first condition in the function CustomMonsterRefire checks whether the monster has run out of ammo. However, I don't see anywhere the value of monstermag being decreased. For me, at least, it seems confusing. Maybe it's supposed to be decreased after A_CPosAttack? Then what the code should be? Something like:

CPAS F 2 A_CPosAttack;
TNT1 A 0 {monstermag--;}

?

And, by the way, isn't it better to check if (monstermag <= 0)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions