Jump to content
  • 0

How to get a custom pickup text appear on-screen in deathmatch every time a weapon respawns?


Kristian Nebula

Question

Hi

 

I'm not that talented in scripting and programming so I thought I'd ask the following: 

I'm trying to get a custom text appear in a deathmatch map when picking up the BFG so it shows globally on the screen of every player when somebody picks it up. So far, I've only managed to get the text appear on-screen only the first time someone picks up the BFG. After the weapon respawns in -altdeath it doesn't react anymore. I'm using a thing action with "ACS_executealways" from the thing action selection in DB with the following simple script:
 

#include "zcommon.acs"

Script 64 (void)
{

printbold(s:"KYÄ KYÄ - KYÄ KYÄ - KYÄ KYÄ");

}

 

The text itself is just an inside joke of the group that will DM on the map tomorrow.

 

Thanks for your help! :)

Share this post


Link to post

6 answers to this question

Recommended Posts

  • 0
11 minutes ago, Kappes Buur said:

I myself do not map or play deathmatch levels, but it seems that restart is what you are looking for.

 

Thanks. I tried it, it just makes the text appear on-screen after the amount of tics I put in the delay. Apparently somehow, when the BFG respawns it forgets the action it was given in the editor and it doesn't trigger the script again (maybe).

Share this post


Link to post
  • 0
void AInventory::DoPickupSpecial (AActor *toucher)
{
        if (special)
        {
                P_ExecuteSpecial(special, NULL, toucher, false,
                        args[0], args[1], args[2], args[3], args[4]);
                special = 0;
        }
}

It looks like picking up an item always clears its special, which is why the script only runs after the first pickup of the BFG.

 

You would need something more complex to achieve what you want I think.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...