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

Thank you so much for the detailed information. No need to apologise! 

I am sorry for the inconvenience, I feel like I should know this but the current Map Editor Tutorial is lacking this feature. I would love to help making part 2 of the guide but I feel I am not experienced enough to help out make a decent and high quality tutorial. I hope some of the experienced people or even one of you developers could make a Map Editor Tutorial part 2, covering advanced things like this. I wish you good luck on the further things to do and I don't take anything for granted. So thank you very much seriously !! 

Avatar
[Dev] Nanorock Programmer

Sorry about the delay, sure thing !

In my example BaseString is set with "This is a random number : "

GeneratedString is left empty, it is built during the Add To String

And RandomNumber is set during the Math Random action

Here, I hope it makes enough sense:

Avatar
SeriousToni

Thank you for your fix and the short answer - still could you please explain a little more what you mean in point 2? With the base and the output? Thank you, I would love to hear more details on this to try it out for myself :)

Avatar
anonymous
  • Completed - Next Patch
Avatar
[Dev] Nanorock Programmer

Show Ingame Chat should have allowed you only to select a string not an integer. I fixed that.

So the way to show on screen a random number is to create the Number, create two Lists of type strings. First one should have the base text, for example “This is a random number:” and second one left empty.

In the trigger actions

  1. Generate random number
  2. Add String, use the first string as base, the int as random number and the second string as output
  3. Show Announcement, use the second string to show the text
Avatar
[Dev] Nanorock Programmer
  • Started
Avatar
anonymous
  • Accepted
Avatar
Lee "Noontide" Moon
  • Backlog

Updating this ticket to reflect that is currently pending our next triage pass. (Our programmers are currently heads down on other projects and we're trying to slot in some time for WFTO after upcoming major milestones in early 2019)

Avatar
SeriousToni

These are the map files. Good luck and thank you for your help guys!


break the waves with ai_edit_1911041932582....meta

break the waves with ai_edit_191104193258284638