Playing with the Command Map


(Flippy) #1

Hey… I was just wondering, would it be possible to change the command map image in the middle of a game?

I “need” this for my map (not really, but it would be very cool if i had it :P)

It’s a puzzle map, and showing the command map of all the buildings would give too much away and make the puzzle too easy… so i now have a blank picture as command map

However, i had the idea that if a player finds a map somewhere ( in a secret room or something i dunno) that the command map changes (the map he found was the command map, duh) so everybody can see it… :clap:

How would i do this?

I’ve tried it with remapshader command but i didnt get it to work… i never used remapshader so the error is probably there… im still trying many ways to do it, and if i succeed ill let it know :smiley:


(nUllSkillZ) #2

Only thing I can think of is remapshader:


remapschader original_shader new_shader
remapshaderflush

(Belongs in the game_manager-spawn-scriptblock as far as I remember.

BTW if you want to change back:


remapschader original_shader original_shader
remapshaderflush

posted somewhere here in the forums.


(Flippy) #3

that’s what i tried, except i didnt have it in the spawn scriptblock, because i want it to happen when you press a button (for example)

i have now:

“normal” command map (black image with a white "1’ in the middle): levelshots/mapname/mapname_cc.tga
“second” command map (black image with white 2 in the middle): levelshots/mapname/mapname_2_cc.tga

the normal command map works, so the shaders are correct… (i have 4 shaders, 2 for mapname_cc and 2 for mapname_2_cc, both in mapname_levelshots.shader)

When i press the button it runs this script:


game_manager
{
   trigger change_cm
   {
        remapshader "levelshots/mapname/mapname_cc.tga" "levelshots/mapname/mapname_2_cc.tga"
        remapshaderflush
   }
}

Nothing happens whatsoever…
(checked with g_scriptdebug 1 and it does run the script)

Tried it with the .tga extension and without the .tga extension, both did nothing…


(kamikazee) #4

You did change “mapname” with you map’s name?


(Flippy) #5

yes. As i said, the first command map works, but the remapshader command does nothing… (using g_scriptdebug 1 i can see that it is actually run, but my command map does not change.)