View unanswered posts | View active topics It is currently Thu Dec 26, 2024 4:16 pm



Reply to topic  [ 15 posts ] 
 Area Editor help 
Author Message
User avatar

Joined: Wed Aug 29, 2007 4:09 am
Posts: 239
Location: The land of Pwnt
Reply with quote
Post Area Editor help
I've been trying to make a lua scene but i can't get the zones figured out. If someone could explain what the name of each zone means, i would greatly appreciate it.

Also, is there a way to make the enemy AI sentry and not want to come after my brain, i want to keep them stationary so they defend their base.


Mon Aug 25, 2008 12:19 am
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: Area Editor help
None of them actually do anything other than AttackerLZ
And that's the landing zone of the attackers.
There's commented out lua code in the lua file for KillZone to gib actors that go into it, for reference.


To make them sentry, open your lua file, ctrl+f, and look for AIMODE_BRAINHUNT
Change that to AIMODE_SENTRY


Mon Aug 25, 2008 12:47 am
Profile
User avatar

Joined: Wed Aug 29, 2007 4:09 am
Posts: 239
Location: The land of Pwnt
Reply with quote
Post Re: Area Editor help
Ahh ok thanks. Is there a code in the lua to make winzone work?


Mon Aug 25, 2008 1:37 am
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: Area Editor help
Is there one already? I don't think so.
Can there be? Yes.

Code:
    for actor in MovableMan.Actors do
        if SceneMan.Scene:WithinArea("Win Zone", actor.Pos) and ActivityMan:ActivityRunning() then
                self.WinnerTeam = Activity.TEAM_1
                ActivityMan:EndActivity();
        end
    end


Will this one work? No idea.


Mon Aug 25, 2008 1:46 am
Profile
User avatar

Joined: Wed Aug 29, 2007 4:09 am
Posts: 239
Location: The land of Pwnt
Reply with quote
Post Re: Area Editor help
I've tried that already but it didn't work, i think i did something wrong tho. I also tried making an AI Brain and destroying it but that didnt work either. the parts at the end of the .lua file where the declare the win thing is un..un-commented so it should work but once the game starts it automatically says win.


Mon Aug 25, 2008 2:55 am
Profile
User avatar

Joined: Wed Dec 27, 2006 10:05 pm
Posts: 100
Reply with quote
Post Re: Area Editor help
try putting the code all in one line. dunno if it'll work but it might


Mon Aug 25, 2008 8:35 pm
Profile
User avatar

Joined: Wed Aug 29, 2007 4:09 am
Posts: 239
Location: The land of Pwnt
Reply with quote
Post Re: Area Editor help
So i tried your code Azzuki and it worked so thanks a lot, i just gotta figure out a way to make killing the brain win because the code that's commented out doesn't seem to be working...


Tue Aug 26, 2008 3:20 am
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: Area Editor help
Code:
    -- Check if the CPU brain is dead
    if not MovableMan:IsActor(self.CPUBrain) and ActivityMan:ActivityRunning() then
        self.CPUBrain = nil;
        -- Proclaim player winner end
        self.WinnerTeam = Activity.TEAM_1
        -- Finito!
        ActivityMan:EndActivity();
    end


Base.rte/Scenes/TestScript.lua is the tutorial mission lua code.

And guess what happens when you kill the enemy brain in the tutorial mission?


Tue Aug 26, 2008 3:43 am
Profile
User avatar

Joined: Wed Aug 29, 2007 4:09 am
Posts: 239
Location: The land of Pwnt
Reply with quote
Post Re: Area Editor help
Ahh ok but when i tried it it just automatically said win...maybe i screwed up again.


Tue Aug 26, 2008 4:15 am
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: Area Editor help
There is an enemy brain on the scene, right?


Tue Aug 26, 2008 4:25 am
Profile
User avatar

Joined: Wed Aug 29, 2007 4:09 am
Posts: 239
Location: The land of Pwnt
Reply with quote
Post Re: Area Editor help
ya, but i think it had something to do with win zone, i'm gonna try disabling win zones and using the brain code.


Tue Aug 26, 2008 4:26 am
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: Area Editor help
Did you by any chance put enemy actors in the win zone?

Because that win zone code doesn't care what team goes in it, it's just looking for actors.

Look around, I know I stumbled upon some code that checked an actor's team, and then did other stuff if it was the right team. Either in this forum or vanilla scripts.


Tue Aug 26, 2008 4:32 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Wed Sep 05, 2007 4:14 am
Posts: 3966
Location: Canadida
Reply with quote
Post Re: Area Editor help
Azukki wrote:
Did you by any chance put enemy actors in the win zone?

Because that win zone code doesn't care what team goes in it, it's just looking for actors.

Look around, I know I stumbled upon some code that checked an actor's team, and then did other stuff if it was the right team. Either in this forum or vanilla scripts.

Code:
    for actor in MovableMan.Actors do
        if actor.Team == 1 then
            if SceneMan.Scene:WithinArea("Win Zone", actor.Pos) and ActivityMan:ActivityRunning() then
                    self.WinnerTeam = Activity.TEAM_1
                    ActivityMan:EndActivity();
            end
        end
    end


Is that right?


Tue Aug 26, 2008 4:57 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Area Editor help
Well yes, but Team 1 is Green.


Wed Aug 27, 2008 1:10 am
Profile
User avatar

Joined: Wed Aug 29, 2007 4:09 am
Posts: 239
Location: The land of Pwnt
Reply with quote
Post Re: Area Editor help
ok so destroying the AI brain doesnt work, with win zones disabled and just the destroy brain to win code gives me automatic win so i dunno how to fix this, i'll just stick with win zone for now.


Wed Aug 27, 2008 3:22 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 15 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.040s | 16 Queries | GZIP : Off ]