Okay, another one. I want to modify the strife popups, use one of the popups that is obsolete in my mod to display, let's say, a world map.
Now, I know how to draw images on statusbar in zscript, that's not the case.
The case is: How do I get a map name in zscript? I found out that there is a native readonly String MapName. How do I access it in statusbar?
get map name in zscript?
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
- ramon.dexter
- Posts: 1529
- Joined: Tue Oct 20, 2015 12:50 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Kozolupy, Bohemia
Re: get map name in zscript?
You could try using level.MapName, though I'm unsure if that would work.
But things like levelnum and total/killed_monsters work, so I would think level.MapName works too.
But things like levelnum and total/killed_monsters work, so I would think level.MapName works too.
- ramon.dexter
- Posts: 1529
- Joined: Tue Oct 20, 2015 12:50 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Kozolupy, Bohemia
Re: get map name in zscript?
Ok, will try. Thanks again.
edit: Little clarification for those who are interested:
level.MapName returns the name of the map (for example: E1M1, MAP01, and so on).
level.FormatMapName(2) (number is a color number, 2 is white) returns name defined in mapinfo here:
So, for this case, level.FormatMapName() returns the MAP1001_NAME (string, defined in language), which is, in this case, "Ranger base".
Hope this helps somebody.
edit: Little clarification for those who are interested:
level.MapName returns the name of the map (for example: E1M1, MAP01, and so on).
level.FormatMapName(2) (number is a color number, 2 is white) returns name defined in mapinfo here:
Code: Select all
map MAP1001 lookup MAP1001_NAME
{
skybox = Sky4
//sky1 = sky5
cluster = 1
music = 08DSRT1
outsidefogdensity = 128
skyfog = 255
lightmode = 2
StrifeFallingDamage
MonsterFallingDamage
AllowJump
AllowCrouch
AllowFreelook
}
Hope this helps somebody.