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

Avatar
  • Views 11.213
  • opdateret
  • 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 vurderer du den kundeservice, du har modtaget?

Tilfredshedsangivelse af SeriousToni 6 år siden

Tilføj en kommentar om kvaliteten af den support du modtog (frivilligt):

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
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
Avatar
Lee "Noontide" Moon Designer & Community Manager
  • 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
anonymous
  • Accepted
Avatar
[Dev] Nanorock
  • Påbegyndt
Avatar
[Dev] Nanorock

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
anonymous
  • Completed - Next Patch
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
[Dev] Nanorock

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 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 !!