Data Realms Fan Forums http://45.55.195.193/ |
|
Setting Spawn/Drop Area http://45.55.195.193/viewtopic.php?f=8&t=15738 |
Page 1 of 1 |
Author: | Dobb [ Sun Jul 05, 2009 7:29 pm ] |
Post subject: | 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. |
Author: | Duh102 [ Sun Jul 05, 2009 8:57 pm ] |
Post subject: | 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. |
Author: | TheLastBanana [ Sun Jul 05, 2009 9:06 pm ] |
Post subject: | 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). |
Author: | numgun [ Mon Jul 06, 2009 9:21 am ] |
Post subject: | Re: Setting Spawn/Drop Area |
Btw, was it that the landing areas dont work in skirmish? |
Author: | Grif [ Mon Jul 06, 2009 6:29 pm ] |
Post subject: | 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 |
Author: | Dobb [ Fri Jul 17, 2009 9:40 pm ] |
Post subject: | 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? |
Author: | Grif [ Sat Jul 18, 2009 12:23 am ] |
Post subject: | 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. |
Author: | Dobb [ Sat Jul 18, 2009 5:56 am ] |
Post subject: | 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? |
Author: | Grif [ Sat Jul 18, 2009 7:10 am ] |
Post subject: | 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 |
Author: | Dobb [ Sat Jul 18, 2009 10:10 am ] |
Post subject: | Re: Setting Spawn/Drop Area |
How do I give the particle an infinite lifetime? Also, where do I insert my ScriptPath to? Index.ini? |
Author: | Grif [ Sat Jul 18, 2009 5:10 pm ] |
Post subject: | 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. |
Author: | Fribox [ Tue Jul 21, 2009 6:09 pm ] |
Post subject: | 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. |
Author: | Seraph [ Wed Jul 22, 2009 7:49 am ] |
Post subject: | 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. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |