Forum

> > CS2D > General > mp_luamap is not activating
Forums overviewCS2D overviewGeneral overviewLog in to reply

English mp_luamap is not activating

4 replies
To the start Previous 1 Next To the start

old mp_luamap is not activating

PsychoKaiserWolf
User Off Offline

Quote
Hello, i have this little problem

im creating a map and i wanted to try a lua script, but for some reason Lua scripts are always off, even if i activate mp_luamap by changing its value to 1, it doesn't do anything

Do i need to activate anything else?
or it's a bug of cs2d?

old Re: mp_luamap is not activating

DC
Admin Off Offline

Quote
Is your Lua file called exactly like your map file and is it in the maps folder?
e.g. if you map is called maps/de_aztec.map, your Lua file needs to be saved as maps/de_aztec.lua

Also note that this setting needs to be set to 1 BEFORE loading the map! Setting it afterwards won't change anything. It will only have affect the next map which is loaded (in case it has a map Lua script).

Documentation: cs2d cmd mp_luamap

old Re: mp_luamap is not activating

PsychoKaiserWolf
User Off Offline

Quote
Yes i do have the map which is called Kaiser_Jail and a folder with the same name, it didnt work so i tried with only one lua with the name of the map, and it didnt work

But this is not what's happening to me, When you enter a server and press esc, you can see if lua scripts are activated or not, it's NOT activated

old Re: mp_luamap is not activating

DC
Admin Off Offline

Quote
Folders are NOT supported by mp_luamap! It must be one single file with the same name as the map as described above and at cs2d cmd mp_luamap.

The Lua indicator in the menu stays at off/no/red if you only have map scripts. It only turns on if you're using server scripts (which are enabled on all maps).

Just put something like
msg("Hi")
in your map Lua script. If it shows a "Hi" after loading the map, it works.
I just tried it myself and can confirm that it works.
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview