How to edit the mission area?
by Shane09 · in General Discussion · 02/08/2009 (2:15 pm) · 11 replies
Yes, I know you can drag the red box and edit the mission size, but, that will simply not do in my case. I am creating a island, and I need to connect it to another piece of land. I want the game engine to load a certain '.mis' file when the player passes a certain trigger. I am having a few problems with this. I have my pieces of islands drawn out. When I shape the mission box to fit the piece of island, I noticed it will cut into another piece of island. Every island is going to have its own '.mis'. This is why using the rectangle mission editor will not work. My islands are not shaped in rectangles. They have some parts extend in certain ways. For example, say I am creating ISLAND A. However, ISLAND A would cross with ISLAND B because ISLAND A is not a rectangle, but the mission area editor is. Would I have to add the part of ISLAND B that would be showing into ISLAND A? But then, the part of ISLAND B included on ISLAND A mission would have to be in the exact same place as it is in the real ISLAND B. Does anyone have a solution. Yes, this sounds kind of confusing. Any help is greatly appreciated. Thanks.
#2
Also, I'm thinking about adding fog right next to all the triggers. Is that possible?
02/08/2009 (3:53 pm)
So just make the mission area big enough for the island, but include triggers inside that area that load the next '.mis'? How would you create triggers that load a mission? And for the boundaries, should I use invisible objects, or is there another way?Also, I'm thinking about adding fog right next to all the triggers. Is that possible?
#3
To make a new mission load when you walk into a trigger:
Hope that helps.
edit: formatting
02/08/2009 (4:19 pm)
Making an invisible wall is simple:Load your mission, press f11, then go to the World Editor Creator (f4). Next, click Mission Objects, Mission, and create a physical zone. Then switch to the World Editor Inspector. Click on the physical zone (if you don't know where the physical zone is, open the folder called SimGroup - MissionGroup at the top right corner and scroll all the way to the bottom), and change the scale to "1 10 10". Finally, find VelocityMod and change it to "-1.5". That should keep you back.
To make a new mission load when you walk into a trigger:
datablock TriggerData (TriggerSwapMission)
{
tickPeriodMS = 100;
};
function TriggerSwapMission::onEnterTrigger(%this,%trigger,%obj)
{
%client = %obj.client;
if(!%client)
{
// return if not a client
// we do not want any npc or other players walking into our trigger
// and seting off the swap mission
return;
}
%ZoneName = %trigger.ZoneName; // mission name
%SpawnPoint = %trigger.SpawnPoint; // Spawn Point in mission
echo("Zone client:" SPC %client SPC "to" SPC %ZoneName SPC "at" SPC %SpawnPoint);
schedule( 0, 0, loadMission, "starter.fps/data/missions/" @ %ZoneName,false,%SpawnPoint);
}
[b]Don't add this part to the script[/b]
You can ether specify there values statically in the trigger code
%ZoneName = %trigger.ZoneName;
%SpawnPoint = %trigger.SpawnPoint;
eg
%ZoneName = "newMission.mis";
%SpawnPoint = "2";
Or you can set dynamic values on each trigger, F11 > Would Editor Inspector, click on
the trigger you want to change and add two dynamic value
“ZoneName” and “SpawnPoint”Hope that helps.
edit: formatting
#4
02/08/2009 (5:54 pm)
Do you know where I would add this script? What file? Would I add this in the '.mis' file? Sorry if I ask too much questions.
#5
You'll need to make a different trigger script for each mis file you want to load. Just don't add the part below the bolded text above to your script file. (I just added the bolded text)
02/08/2009 (6:43 pm)
Make your trigger script, name it, place it in server/scripts and exec it in server/scripts/game.cs.You'll need to make a different trigger script for each mis file you want to load. Just don't add the part below the bolded text above to your script file. (I just added the bolded text)
#6
But say, I wanted all the players current items, and vehicles to carry into the new mission zone you just traveled, would this be possible? I am basically seperating my GIANT land into 4 main islands (4 main '.mis' files). But carrying vehicles and items over seems like it could be a problem. And what if you had a task where you had to travel over to another island and back? Would this be possible? So basically, I'm wondering if you could take data along with you.
This question is off topic, but how big should an island be that you can drive on, fly around on with a helicopter, and drive boats on the nearby waters? Don't forget you can drive vehicles into the next zone if you run out of room.
02/08/2009 (7:19 pm)
Ok, thank you so very much. I can now begin working on my "islands". But say, I wanted all the players current items, and vehicles to carry into the new mission zone you just traveled, would this be possible? I am basically seperating my GIANT land into 4 main islands (4 main '.mis' files). But carrying vehicles and items over seems like it could be a problem. And what if you had a task where you had to travel over to another island and back? Would this be possible? So basically, I'm wondering if you could take data along with you.
This question is off topic, but how big should an island be that you can drive on, fly around on with a helicopter, and drive boats on the nearby waters? Don't forget you can drive vehicles into the next zone if you run out of room.
#7
EDIT: there is also this resource: Saving Inventory Between Missions.
02/09/2009 (12:09 am)
There are several save/load game resources that should give you an idea on how to keep up with current inventory. Integrating some sort of database is viable also.EDIT: there is also this resource: Saving Inventory Between Missions.
#8
02/09/2009 (3:11 pm)
Is it possible to do this without having to do a fresh build of the engine? Or would doing that be the best way in your opinion?
#9
02/14/2009 (3:59 pm)
I noticed you jump back when hitting the physical zone. Is it possible to make it so you don't jump back, but you just keep running in the same spot when come in contact with it? I noticed if you make it low enough so you don't jump back, slowly but surely, you can make your way through the physical zone. Thanks so far about your help, though.
#10
02/14/2009 (6:04 pm)
Have you tried changing the VelocityMod to 0? That's all you should have to change and it should work. (or just comment out the VelocityMod)
#11
02/14/2009 (6:46 pm)
But with a VelocityMod=0, then the player can go through the Physical Zone. I'm trying to keep the player on a course, without making him literally bounce off.
Associate Michael Hall
Distracted...