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

Avatar
  • oppdatert
  • 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

Hvordan vil du rangere den kundeservicen du har mottatt?

Tilfredshetsmerke av SeriousToni 5 år siden

Legg til en kommentar om kvaliteten på kundestøtten du fikk (valgfritt):

Avatar
Lee "Noontide" Moon Designer & Community Manager
  • Marked for Review

Reopening ticket. If possible could you send us the map files you're working from? These should be in your maps folder with the initial title you set for the level when creating it followed by "_edit" we'll need the meta data as well.

Avatar

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

Avatar

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

EDIT - Can you screenshot how the action screen looks?

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

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

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
anonymous
  • Completed - Resolved

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

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
SeriousToni

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