Also, I was wondering how to add a timer to a map, so it ends after x minutes, and make the AI goal in conquest to defeat enemies, not capture cps. I have tried to do these myself, but it just ends up crashing. Can anyone help?
Even more LUA and map problems [Solved]
Moderator: Moderators
-
Commander_Fett
- High General

- Posts: 847
- Joined: Fri Oct 17, 2008 9:59 pm
- Projects :: No Mod project currently.
Even more LUA and map problems [Solved]
Hey, I was working on one of my maps, and I added in some bespin buildings. Now, there are a bunch of black squares in the sky:
Does anyone know why?
Also, I was wondering how to add a timer to a map, so it ends after x minutes, and make the AI goal in conquest to defeat enemies, not capture cps. I have tried to do these myself, but it just ends up crashing. Can anyone help?
Hidden/Spoiler:
Also, I was wondering how to add a timer to a map, so it ends after x minutes, and make the AI goal in conquest to defeat enemies, not capture cps. I have tried to do these myself, but it just ends up crashing. Can anyone help?
- bobfinkl
- Rebel Colonel

- Posts: 593
- Joined: Sun Jul 13, 2008 9:01 am
- Projects :: Lots of unreleased stuff
- xbox live or psn: No gamertag set
- Location: The quaint little city gametoast.
Re: Even more LUA and map problems
For the timer you need to add the lines in the center (the -- timer to beat-- lines) in the same position compared to the other lines (assuming your using a conquest script that is).
I haven't tried that exact code but it should work to end your game when the time runs out (change the timer value number to edit the time it takes for the timer to run out that one is specified for 8 minutes).
And to make the AI go for kills and not conquest you can't eliminate the want for cps entirely on a conquest script but you can add this line.
That will make the AI concentrate more on killing enemies that capturing cps.
Code: Select all
--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}
-- Timer to Beat --
timeoutTimer = CreateTimer("timeout")
SetTimerValue(timeoutTimer, 480)
ShowTimer(timeoutTimer)
StartTimer("timeout")
OnTimerElapse(
function(timer)
ShowTimer(nil)
DestroyTimer(timer)
end,
timeoutTimer
--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)And to make the AI go for kills and not conquest you can't eliminate the want for cps entirely on a conquest script but you can add this line.
Code: Select all
AddAIGoal(1, "Deathmatch", 100)
AddAIGoal(2, "Deathmatch", 100)-
Commander_Fett
- High General

- Posts: 847
- Joined: Fri Oct 17, 2008 9:59 pm
- Projects :: No Mod project currently.
Re: Even more LUA and map problems
Thanks, I'll try out the timer. But, the deathmatch thing, I tried that, and I got a bunch of errors. I'll try again, though.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Even more LUA and map problems
That's because you're trying to assign an AI goal when one's already assigned. You need to "ClearAIGoals(1)" and "ClearAIGoals(2)".
- bobfinkl
- Rebel Colonel

- Posts: 593
- Joined: Sun Jul 13, 2008 9:01 am
- Projects :: Lots of unreleased stuff
- xbox live or psn: No gamertag set
- Location: The quaint little city gametoast.
Re: Even more LUA and map problems
Weird I can use Deathmatch goals with any other goals and it works just fine.
-
Commander_Fett
- High General

- Posts: 847
- Joined: Fri Oct 17, 2008 9:59 pm
- Projects :: No Mod project currently.
Re: Even more LUA and map problems
Wait, so I need to replace
With
Or do I add that below?
Hidden/Spoiler:
Hidden/Spoiler:
- bobfinkl
- Rebel Colonel

- Posts: 593
- Joined: Sun Jul 13, 2008 9:01 am
- Projects :: Lots of unreleased stuff
- xbox live or psn: No gamertag set
- Location: The quaint little city gametoast.
Re: Even more LUA and map problems
You would add it between conqueststart() and enablespherorules(), you would also add the extra goal there too.
Edit: And Don't delete the conquest setup that's why your adding the ClearAIGoals in.
Edit: And Don't delete the conquest setup that's why your adding the ClearAIGoals in.
-
Commander_Fett
- High General

- Posts: 847
- Joined: Fri Oct 17, 2008 9:59 pm
- Projects :: No Mod project currently.
Re: Even more LUA and map problems
Okay, thanks for the clarafication. Does anyone know how to fix the sky?
EDIT: I did the LUA stuff, but I get thismungelog and a FATAL error when I play. I'm sure I did something wrong, but I don't know what. Here's my LUA:Can someone please help?
EDIT: I did the LUA stuff, but I get this
Hidden/Spoiler:
Hidden/Spoiler:
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: Even more LUA and map problems
You need to have a ) after the timeoutTimer. Also, you don't need to clear the AI goals before adding new ones. However, if you don't want some of the AI to trying to capture CPs, then you should clear the goals.
-
Commander_Fett
- High General

- Posts: 847
- Joined: Fri Oct 17, 2008 9:59 pm
- Projects :: No Mod project currently.
Re: Even more LUA and map problems
Thank you all, it works now! Woot! I was wondering, though, how do you force a player onto a certain team? I was looking through the campaign scripts, but didn't see anything, did I just miss something? Also, can someone please help with the black flying square problem? It's really starting to bug me.
- AceMastermind
- Gametoast Staff

- Posts: 3285
- Joined: Mon Aug 21, 2006 6:23 am
- Contact:
Re: Even more LUA and map problems
http://www.gametoast.com/forums/search. ... mit=SearchCommander_Fett wrote:...I was wondering, though, how do you force a player onto a certain team? I was looking through the campaign scripts, but didn't see anything, did I just miss something?
It looks like environment fx with a missing texture.Commander_Fett wrote:...can someone please help with the black flying square problem? It's really starting to bug me.
-
Commander_Fett
- High General

- Posts: 847
- Joined: Fri Oct 17, 2008 9:59 pm
- Projects :: No Mod project currently.
Re: Even more LUA and map problems
Is there any way to make it so the black squares arn't there at all? Or do have to copy Bespin's fx file?
- bobfinkl
- Rebel Colonel

- Posts: 593
- Joined: Sun Jul 13, 2008 9:01 am
- Projects :: Lots of unreleased stuff
- xbox live or psn: No gamertag set
- Location: The quaint little city gametoast.
Re: Even more LUA and map problems
Do you have an fx file already there? Because it looks like that's a precipitation form of some kind or other.
-
Commander_Fett
- High General

- Posts: 847
- Joined: Fri Oct 17, 2008 9:59 pm
- Projects :: No Mod project currently.
Re: Even more LUA and map problems
I have the Naboo fx.
- bobfinkl
- Rebel Colonel

- Posts: 593
- Joined: Sun Jul 13, 2008 9:01 am
- Projects :: Lots of unreleased stuff
- xbox live or psn: No gamertag set
- Location: The quaint little city gametoast.
Re: Even more LUA and map problems
Delete some lines and see what that does, or just delete all of them.
-
Commander_Fett
- High General

- Posts: 847
- Joined: Fri Oct 17, 2008 9:59 pm
- Projects :: No Mod project currently.
Re: Even more LUA and map problems
New question: I was making a map for somebody, but there was a smwll problem nwith a model they sent me, so they edited it and sent me a new version. The problem is, when I try to place the new object, it's two of it, stacked one on top of the other:
Hidden/Spoiler:
- Fluffy_the_ic
- Hoth Battle Chief

- Posts: 3223
- Joined: Thu Jan 24, 2008 7:03 pm
- xbox live or psn: fluffytherc
- Location: she/her
- Contact:
Re: Even more LUA and map problems
The only idea that I have is that I bumpmapped it wrong. Just try not to show pics of the fixed version, umkay?
-
Commander_Fett
- High General

- Posts: 847
- Joined: Fri Oct 17, 2008 9:59 pm
- Projects :: No Mod project currently.
Re: Even more LUA and map problems
Okay. Ummm, I was having more trouble with adding rain to my map, and getting rid of the floating white squares of doom. Here is my fx file:
But there are still a bunch of black particles in the air, and the rain won't show up. Can anyone help? 
Hidden/Spoiler:
- AceMastermind
- Gametoast Staff

- Posts: 3285
- Joined: Mon Aug 21, 2006 6:23 am
- Contact:
Re: Even more LUA and map problems
Do you have fx_pollen.tga in your world1 folder?
-
Commander_Fett
- High General

- Posts: 847
- Joined: Fri Oct 17, 2008 9:59 pm
- Projects :: No Mod project currently.
Re: Even more LUA and map problems
Ummm... no.
EDIT: Okay, it works now, muchos gracias! Do rainshadow regions have to be cylinders, or can they be cubes/ rectangles too?
EDIT: Okay, it works now, muchos gracias! Do rainshadow regions have to be cylinders, or can they be cubes/ rectangles too?


