Data Realms Fan Forums
http://forums.datarealms.com/

Making new Area's through Lua (Solved)
http://forums.datarealms.com/viewtopic.php?f=73&t=25483
Page 1 of 1

Author:  akblabla [ Sun Sep 11, 2011 9:39 am ]
Post subject:  Making new Area's through Lua (Solved)

Would it be possible to make a new area trough lua? I need it because I want to change LZ dynamically

Edit:
Solved

Author:  Asklar [ Sun Sep 11, 2011 7:03 pm ]
Post subject:  Re: Making new Area's through Lua

Well, when you say dinamically you mean like the LZ that moves around the brainbot?
Maybe you should see that script, there might be something useful in there.

Author:  akblabla [ Sat Sep 17, 2011 10:04 pm ]
Post subject:  Re: Making new Area's through Lua

Asklar wrote:
Well, when you say dinamically you mean like the LZ that moves around the brainbot?
Maybe you should see that script, there might be something useful in there.


Unfortunately, the landing zone around the brain bot is hard coded. The brain bot lz is just the lz if no other was defined.

Does anyone actually have a list for all the LZ related function. The only ones I can find are

Code:
SetLZArea();

and
Code:
SetBrainLZWidth();


Help?

Edit:
Any area related function will also help

Only ones I know of are

Code:
GetArea

Code:
SetArea

Quote:
HasArea


Though I don't how SetArea actually works. Anybody?

Edit2:

Solved

Code:
        local area = Area()
        local box = Box()
        box.Corner = Vector(TeamSpawnX2[team] , 500)
        box.Height = 1000
        box.Width = TeamSpawnX1[team] - TeamSpawnX2[team]
        area:AddBox(box)
        self:SetLZArea(team, area);
        self:SetBrainLZWidth(team, 0);

Author:  weegee [ Sun Sep 18, 2011 9:10 pm ]
Post subject:  Re: Making new Area's through Lua (Solved)

That's pure fun :cry:
Code:
print (self);
print (self.SetLZArea)
print (ActivityMan:GetActivity());
print (ActivityMan:GetActivity().SetLZArea);


Result:
Code:
Activity,GAScripted
function: <address>
Activity,GAScripted
nil

Author:  Mehman [ Fri Sep 23, 2011 6:12 pm ]
Post subject:  Re: Making new Area's through Lua (Solved)

Actually it's Scene:SetArea(), not Activity:SetArea().
You can get the scene using SceneMan.Scene

Author:  Awesomeness [ Sat Sep 24, 2011 4:04 am ]
Post subject:  Re: Making new Area's through Lua (Solved)

What's the difference between scene and activity? Is the activity the Lua itself?

Author:  akblabla [ Sat Sep 24, 2011 6:37 am ]
Post subject:  Re: Making new Area's through Lua (Solved)

Awesomeness wrote:
What's the difference between scene and activity? Is the activity the Lua itself?


The activity is the gamemode you play and the scene is what map you choose to play said gamemode on.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/