Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Grey_Wolf

Making an infinite "hold time" hudmessage disappear at will

Question

Here I am, flooding this section of the forum another day!

 

This time, I'm trying to create "data logs" items that tells the player about doom lore, monster strengths and weaknesses (they'll have them in the final mod), and other mod mechanics, in an immersive way. To do this, I made my first step in to the oh, so magic land of ACS.

 

What I managed to do until now, is this:

Here's my datalog prototype (still incomplete)

Spoiler

Actor ImpLog : CustomInventory
{
+INVENTORY.INVBAR
  Inventory.MaxAmount 2
  inventory.InterHubAmount 0
  Inventory.Icon "PDAIA0"
  Inventory.PickupMessage "You picked up a scientist's PDA."
  Inventory.PickupSound "pda/pickup"
  Scale 0.4
  Tag "MonsterPDA"
  States
  {
  Spawn:
    PDAD A 10 Bright
    PDAD A 10
    Loop
  Use:
    TNT1 A 0
    TNT1 A 0 ACS_NamedExecuteAlways("IMPLOG", 0)
    TNT1 A 0 A_GiveInventory("Implog")
    Stop
  }
}

 

And this is the script for it:

Spoiler

#library "DATALOGS"
#include "zcommon.acs"

script "IMPLOG" (void)
{
    SetHudSize (640, 480, 1);
    SetFont("PDAImp");
    HudMessage (s: "A";HUDMSG_PLAIN,100,CR_UNTRANSLATED,320.0,240.0,0);
  delay(35*1);
}

 So, everything works just fine, the .png picture for my pda shows and it stays forever, just lke I want to.

 

My question is: how can I make it disappear when the player decides to do so? And even better: is there a way to show a "second page" of the datalog before preparing it to be closed?

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 1
7 hours ago, Grey_Wolf said:

Should I do a second hud message script with the same ID but with a blank font so it overwrites the first one?

Exactly!

Share this post


Link to post
  • 0

Well that's strange, because unless i did something wrong, i put "100" as ID, but using the Inventory item a Second time won't make it disappear. Should I do a second hud message script with the same ID but with a blank font so it overwrites the first one? 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×