View unanswered posts | View active topics It is currently Tue Dec 03, 2024 1:58 am



Reply to topic  [ 5 posts ] 
 Mission Mode Restrictions 
Author Message
User avatar

Joined: Mon Apr 28, 2008 1:35 am
Posts: 383
Reply with quote
Post Mission Mode Restrictions
I created a scene with a custom script. My game mode (Assault) shows up ok in the drop down scenario menu. But when I select it from the drop down menu, it shows every scene, not only the one that is compatible with my script (eg has the correct areas).
What I want is to hide the incompatible ones so it doesn't have the crash risk.
Code:
function AssaultMission:SceneTest()
end

I copied this code from the vanilla missions, I thought it was supposed to run through the scene to see whether it has the required areas.
Am I missing some code?


Fri Aug 26, 2011 7:45 pm
Profile
DRL Developer
DRL Developer

Joined: Tue Aug 11, 2009 5:09 am
Posts: 395
Reply with quote
Post Re: Mission Mode Restrictions
Making your scenes appear in the Scenario menu


Sun Aug 28, 2011 10:37 am
Profile
User avatar

Joined: Mon Apr 28, 2008 1:35 am
Posts: 383
Reply with quote
Post Re: Mission Mode Restrictions
oh please, if you are going to help, then actually say something.
I've already looked at the sticky. This is not the problem. My scene shows up, but all the other scenes show up as well under my gamemode.


Sun Aug 28, 2011 8:12 pm
Profile
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post Re: Mission Mode Restrictions
You can add some custom area to your scene, called something like MySuperMissionUniqueArea and then request it from your mission script with:
Code:
self.Zone = SceneMan.Scene:GetArea("MySuperMissionUniqueArea");

CC will notice that your mission depends on that area and won't offer any other scenes to play with your activity.


Mon Aug 29, 2011 3:49 am
Profile
DRL Developer
DRL Developer

Joined: Tue Aug 11, 2009 5:09 am
Posts: 395
Reply with quote
Post Re: Mission Mode Restrictions
Aspect wrote:
oh please, if you are going to help, then actually say something.
I've already looked at the sticky. This is not the problem. My scene shows up, but all the other scenes show up as well under my gamemode.


What? This is a quote from the sticky:
TheLastBanana wrote:
The way the game determines if a scene is compatible with an activity is by scanning through the activity's Lua script and finding any calls to SceneMan:GetArea. It determines what area the script is looking for, then only shows scenes with those areas.


Mon Aug 29, 2011 7:06 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.025s | 13 Queries | GZIP : Off ]