Jump to content

Home

[TSL] Datapads


goldberry

Recommended Posts

When a datapad is recieved in game, they tend to pop up on screen with thier contents shown for instant reading. When I have made datapads, this does not happen.

 

How do I get the message to pop up?

 

It depends on how the datapad is received. If it is picked up out of the inventory of a placeable or dead body the datapad popup with its text is displayed automatically without you having to do anything.

 

If the datapad is given via script however (CreateItemOnObject()), the popup will not automatically show. I suppose this is by design due to the fact that the player could be in the middle of a dialog or cutscene when they receive the pad.

 

In those circumstances you can use the DisplayDatapad() function in the same script where you give the datapad. It takes an object reference to the datapad in question, and will cause the popup window with its text to appear. For example...

void main() {
   DelayCommand(0.2, DisplayDatapad(CreateItemOnObject("vaapad", GetFirstPC(), 1, TRUE)));
}

...would create the datapad in the player's inventory and display the popup datapad window with its text. If you do this in a dialog, make sure you run the script just before the dialog exits, or it may mess up the GUI if the pad window is shown while the main GUI is hidden.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...