View Full Version : How to forbid map to "play"
speeder
04-03-2010, 08:52 PM
I have a object pallete map...
But all the time that I go there, my paddle move around, balls shoot, stuff die...
How I stop that behavior?
Hmm, nothing should be moving if the game is paused when the editor opens which is the default I think.
But this should work:
In your initialization of your paddle you can check to see if the editor is up before having it do anything.
For instance:
function OnInit()
if (g_editorActive) then
LogMsg("Oh sh*t! Don't turn this on now.");
return;
end
...
Or: You can also use GameIsActive(), but that just detects if a 'profile' is loaded, not applicable if you don't use them.
Or: You could also check the current map by name, and if it's Game Palette or whatever exit.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.