Jump to content

How to obtain the name of the map for a global variable created on main.lua


Russell
 Share

Go to solution Solved by Russell,

Recommended Posts

 

Hello team,

I'm going crazy with this bull****-idea...

Is there any LUA command that allows us to obtain the name of the map we are on?

I want to store the map name we are playing in a String variable, and then execute an IF to validate that value so that:
- If I am in the map bull****.map a variable has "OK" text.
- If I am in the map bullface.map the previous variable has "NotOK" text.

(sight) I am unable to get the map name to save it in the global variable. And I don't know why...

I have created a script where I enter manually the name... But that script (despite being assigned to a pivot in the map that is executed when the map is loaded) is not able to modify the value of the global variable defined in main.lua

I have tried to use the mapfile variable used in main.lua of the project, but still don't know how to use it to get the name of the map we are on...

This question may seem simple, but it's really driving me crazy.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...