Author |
Message |
Dobb
Joined: Sun Jul 05, 2009 7:24 pm Posts: 8
|
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 |
|
|
Duh102
happy carebear mom
Joined: Tue Mar 04, 2008 1:40 am Posts: 7096 Location: b8bbd5
|
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 |
|
|
TheLastBanana
DRL Developer
Joined: Wed Dec 13, 2006 5:27 am Posts: 3138 Location: A little south and a lot west of Moscow
|
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 |
|
|
numgun
Joined: Sat Jan 13, 2007 11:04 pm Posts: 2932
|
Re: Setting Spawn/Drop Area
Btw, was it that the landing areas dont work in skirmish?
|
Mon Jul 06, 2009 9:21 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
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 |
|
|
Dobb
Joined: Sun Jul 05, 2009 7:24 pm Posts: 8
|
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 |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
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 |
|
|
Dobb
Joined: Sun Jul 05, 2009 7:24 pm Posts: 8
|
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 |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
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 |
|
|
Dobb
Joined: Sun Jul 05, 2009 7:24 pm Posts: 8
|
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 |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
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 |
|
|
Fribox
Joined: Tue Jul 14, 2009 1:24 pm Posts: 48
|
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 |
|
|
Seraph
Moderator Hero
Joined: Sun Dec 24, 2006 11:28 pm Posts: 868 Location: London Server
|
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 |
|
|
|