View unanswered posts | View active topics It is currently Wed Dec 25, 2024 9:15 pm



Reply to topic  [ 13 posts ] 
 Setting Spawn/Drop Area 
Author Message

Joined: Sun Jul 05, 2009 7:24 pm
Posts: 8
Reply with quote
Post Setting Spawn/Drop Area
Hi, I'm very new to this mapmaking, so I made a map, I place all these stuff, now I want to set a specific area for the AI to drop their stuff, and also a specific spot to drop my stuff. How do I go about doing that? Is it in Area editor?

A step by step workabout will be very appreciated.

And a little question still, how do I set the dimension of a map? As in the size without using an existing map. I pretty much want a custom one.

Cheers.


Sun Jul 05, 2009 7:29 pm
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Setting Spawn/Drop Area
Dobb wrote:
I want to set a specific area for the AI to drop their stuff, and also a specific spot to drop my stuff
...
how do I set the dimension of a map?

To set a custom drop area and drops, you need to do a little bit of Lua. Check the Maginot mission .lua file for how to do it.
You set the dimensions of a map, and the appearance of the terrain, by editing a .bmp. You will see a few of them in the missions.rte folder if you poke around.


Sun Jul 05, 2009 8:57 pm
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: Setting Spawn/Drop Area
Drop areas can be defined in the Area Editor as "LZ Team 1" (for red) and "LZ Team 2" (for green).


Sun Jul 05, 2009 9:06 pm
Profile WWW

Joined: Sat Jan 13, 2007 11:04 pm
Posts: 2932
Reply with quote
Post Re: Setting Spawn/Drop Area
Btw, was it that the landing areas dont work in skirmish?


Mon Jul 06, 2009 9:21 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Setting Spawn/Drop Area
Go start a skirmish match.

Open the console.

ERROR LZ TEAM 1 NOT DEFINED
ERROR LZ TEAM 2 NOT DEFINED

p sure it's checking for them


Mon Jul 06, 2009 6:29 pm
Profile

Joined: Sun Jul 05, 2009 7:24 pm
Posts: 8
Reply with quote
Post Re: Setting Spawn/Drop Area
I actually managed to change the drop area, but for some reason, only mine seems to work, the AI still manages to spawn anywhere. And I already changes the LZ Team 1 and LZ Team 2 thing.

Any ideas or ways to make it so the AI will just spawn on the left side of the map instead of in my base?


Fri Jul 17, 2009 9:40 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Setting Spawn/Drop Area
Well you could just iterate through all actors and then if they're --oh look here I'll do it if that isn't working.

self.checkbox = Box(Vector(0,0),Vector(SceneMan.SceneWidth / 2,1));
for actor in MovableMan.Actors do
if actor.ClassName == "ACRocket" or actor.ClassName == "ACDropShip" then
if actor.Pos.X < SceneMan.SceneWidth / 2 then
actor.Pos.X = self.checkbox:GetRandomPoint();
end
end
end

Stick that in update and it'll automatically remove actors past the right half of the screen and move them to a random point on the left.


Sat Jul 18, 2009 12:23 am
Profile

Joined: Sun Jul 05, 2009 7:24 pm
Posts: 8
Reply with quote
Post Re: Setting Spawn/Drop Area
May I know where to insert that lua? The map I'm creating is a Skirmish map, I got a feeling I need to convert it to a mission to make it work,is that so? Or does it work for skirmish too?


Sat Jul 18, 2009 5:56 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Setting Spawn/Drop Area
Oh, well for a skirmish map I'd suggest this:

make an invisible, unhittable particle and embed it somewhere in the air on the scene. Then give it infinite lifetime, and then do ScriptPath = whatever.rte/<filename>.lua

Then make a lua file with these exact contents (replace [] with a tab):

function Update(self)
[]self.ToSettle = false;
[]self.ToDelete = false;
[]self.checkbox = Box(Vector(0,0),Vector(SceneMan.SceneWidth / 2,1));
[]for actor in MovableMan.Actors do
[][]if actor.ClassName == "ACRocket" or actor.ClassName == "ACDropShip" then
[][][]if actor.Pos.X < SceneMan.SceneWidth / 2 then
[][][][]actor.Pos.X = self.checkbox:GetRandomPoint();
[][][]end
[][]end
[]end
end


Sat Jul 18, 2009 7:10 am
Profile

Joined: Sun Jul 05, 2009 7:24 pm
Posts: 8
Reply with quote
Post Re: Setting Spawn/Drop Area
How do I give the particle an infinite lifetime? Also, where do I insert my ScriptPath to? Index.ini?


Sat Jul 18, 2009 10:10 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Setting Spawn/Drop Area
AddAmmo = MOPixel
CopyOf = Grenade Fragment Gray
LifeTime = 0
HitsMOs = 0
ScriptPath = Your.rte/Luafile.lua

and then the lua file itself will take care of keeping it 100% non-disappearing.

To place it into the scene just use AddSceneObject and put it at 0,0, or even offscreen.


Sat Jul 18, 2009 5:10 pm
Profile

Joined: Tue Jul 14, 2009 1:24 pm
Posts: 48
Reply with quote
Post Re: Setting Spawn/Drop Area
well i came here to see what the topic was all about and i learned something.
:/
in the .rte that you placed your map make a .lua and paste your code in there
but the MOpixel goes into a .ini if im not mistaken.


Tue Jul 21, 2009 6:09 pm
Profile
Moderator Hero

Joined: Sun Dec 24, 2006 11:28 pm
Posts: 868
Location: London Server
Reply with quote
Post Re: Setting Spawn/Drop Area
Okay, Grif, as you can see has a rather advanced grasp of modifying CC - kindly do not chime in afterwards with a snarky response, if anything it makes you look dumb.


Wed Jul 22, 2009 7:49 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 13 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.086s | 13 Queries | GZIP : Off ]