View unanswered posts | View active topics It is currently Tue Apr 16, 2024 6:22 am



Reply to topic  [ 7 posts ] 
 Making new Area's through Lua (Solved) 
Author Message
User avatar

Joined: Wed May 20, 2009 3:10 pm
Posts: 366
Location: Århus, Denmark
Reply with quote
Post 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


Last edited by akblabla on Sun Sep 18, 2011 9:48 am, edited 1 time in total.



Sun Sep 11, 2011 9:39 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post 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.


Sun Sep 11, 2011 7:03 pm
Profile
User avatar

Joined: Wed May 20, 2009 3:10 pm
Posts: 366
Location: Århus, Denmark
Reply with quote
Post 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);


Sat Sep 17, 2011 10:04 pm
Profile
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post 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


Sun Sep 18, 2011 9:10 pm
Profile
User avatar

Joined: Tue Nov 17, 2009 7:38 pm
Posts: 909
Location: France
Reply with quote
Post Re: Making new Area's through Lua (Solved)
Actually it's Scene:SetArea(), not Activity:SetArea().
You can get the scene using SceneMan.Scene


Fri Sep 23, 2011 6:12 pm
Profile
User avatar

Joined: Sat Jun 19, 2010 5:02 pm
Posts: 331
Location: Mekkan
Reply with quote
Post Re: Making new Area's through Lua (Solved)
What's the difference between scene and activity? Is the activity the Lua itself?


Sat Sep 24, 2011 4:04 am
Profile
User avatar

Joined: Wed May 20, 2009 3:10 pm
Posts: 366
Location: Århus, Denmark
Reply with quote
Post 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.


Sat Sep 24, 2011 6:37 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 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.030s | 16 Queries | GZIP : Off ]