Mighty Script - Print Random Number with In Game Message shows always "null"

Avatar
  • Views 9,213
  • updated
  • Completed - Resolved

Create a new number (integer).

Create a script that generates a random number on the previous created integer. 

Print the integer now to the player's screen (e.g. with a "Show Ingame Message" and as content you select the integer).

Export and Quicktest the map.

Ingame Message shows always "null" - no matter how often you fire the script and generate numbers.

Game Version:
GOG Galaxy
Platform:
Windows

How would you rate the customer service you received?

Satisfaction mark by SeriousToni 5 years ago

Add a comment about quality of support you received (optional):

Avatar

How were you displaying the Number?

You usually need to display it as something like "Your number is [0]" with the [0] getting replaced by the actual Number variable.

Avatar
SeriousToni

Instead of the text message I chose the variable via the pick item button to the right. 

Avatar

You need to pick a variable as well as choose the text that displays with it. As per my example above "Your Number is [0]". the [0] is the bit you picked with the pick item button, but without actually adding that to the text to tell the game I want my variable to be here, there is nothing to display.

Avatar
anonymous
  • Completed - Resolved

If the above still returns null the get back to us, Nutter is correct

Avatar
SeriousToni

Can I put whatever I want in the brackets and the var which I chose on the right will be used or how do I Adress this var in my text? Is there a tutorial I was missing or from where do I get that information? I will then check this and respond here. 

Avatar

You need to use [0] which is a reference to the variable itself (if it was a list of variables it would be the first variable in the list and [1] would be the second variable in the list)

So you literally need to try: "Your text here [0] more text here" and the [0] gets replaced into and displayed "Your text here 1 more text here"or whatever the variable number.

As for where I got the information, there is no tutorial (yet). I know because I helped test MightyScript before it was released and this is one of the things I worked with Nano to get working properly.

Avatar
SeriousToni

It does not work correctly. With the in game main message trigger I can not choose one of my numbers at all. (no items for that picker in this map available) and if I try to use the chat message trigger I CAN choose one of my numbers but I am unable to type text (as you said) in the input field anymore (the name of the number is in there now) 

Avatar

Have definitely you created a number variable first ready to use?

EDIT - Can you screenshot how the action screen looks?

Avatar

Huh looks like something is definitely wrong there then. @Cian needs to re-open the ticket.