How to access CMap outside of editor and mode, in the TP menu

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

Post Reply
crimplene
Posts: 19
Joined: 09 May 2017, 17:35

How to access CMap outside of editor and mode, in the TP menu

Post by crimplene » 06 Apr 2018, 09:44

Hey,

how can I access

Code: Select all

Map.ObjectiveTextAuthor
Map.ObjectiveTextGold
Map.ObjectiveTextSilver
Map.ObjectiveTextBronze
from outside the editor, in the TP menu.

Every class I found has CMapInfo as member but never CMap. CMapInfo does not contain the above values only CMap does. The methods I found so far (GetMapGroup, GetNextMap) all return CMapInfo only, not CMap. So there I can't get access to ObjectiveTextGold etc.

CMap (aka Map) is accessible as global object in the editor and in the mode, but of course not that easily in the menu. I would need a method which returns it...

Is it possible in the CManiaAppTitle context?

User avatar
Miss
Posts: 1338
Joined: 05 Jan 2016, 11:34
Location: The Netherlands
Contact:

Re: How to access CMap outside of editor and mode, in the TP menu

Post by Miss » 06 Apr 2018, 12:03

Does MapInfo not have "TMObjective_GoldTime", "TMObjective_BronzeTime", etc?
1070 GTX, i7 4790k, 16GB RAM, Windows 10
Forum moderator, opinions are my own. :thx:
Check out Image openplanet, the alternative Maniaplanet & Turbo scripting platform! (Openplanet subforum)
I also stream on Twitch and tweet on Twitter.

crimplene
Posts: 19
Joined: 09 May 2017, 17:35

Re: How to access CMap outside of editor and mode, in the TP menu

Post by crimplene » 06 Apr 2018, 13:32

It sure does. Sadly Obstacle uses Map.ObjectiveTextGold etc.

Strange idea, btw to make those values Text with a formatted time string instead of Integer. But that is another problem. :-)

Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 2 guests