Problems with mission scripting
Moderator: Moderators
- Fierfek
- High General

- Posts: 805
- Joined: Wed Jul 01, 2009 4:38 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)
Problems with mission scripting
I am having weird problems.
I have killed a couple command posts at the beginning, but the changes don't show ingame (this is in the lua).
My objectives aren't working.
Some of my local teams aren't spawning.
Here is my lua:
http://txtb.in/4ju
Here is my error log:
http://txtb.in/4jv
Can someone please help me?
I have killed a couple command posts at the beginning, but the changes don't show ingame (this is in the lua).
My objectives aren't working.
Some of my local teams aren't spawning.
Here is my lua:
http://txtb.in/4ju
Here is my error log:
http://txtb.in/4jv
Can someone please help me?
Last edited by Fierfek on Tue Sep 01, 2009 3:14 pm, edited 1 time in total.
-
Xavious
- Sith Master

- Posts: 2783
- Joined: Mon Jun 12, 2006 3:46 pm
Re: Problems with Campaign Scripting (Please Help!)
Try sticking your KillObject functions up by the SetClassProperty function.
-
501st_commander
- Master Bounty Hunter

- Posts: 1570
- Joined: Wed Dec 10, 2008 7:48 pm
Re: Problems with Campaign Scripting (Please Help!)
that maybe a problem--objective :escape the battle
Objective6 = ObjectiveGoto:New{TeamATT = ATT, TeamDEF = DEF,
text = "level.RC1.objective.6", popupText = "level.RC1.objective.6_popup",
regionName = "goto", mapIcon = "hud_objective_icon_circle", AIGoalWeight = 0}
- Par3210
- Jedi

- Posts: 1033
- Joined: Sun Jun 14, 2009 10:31 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Owning people in SWBF2
- Contact:
Re: Problems with Campaign Scripting (Please Help!)
Nope, he has "--" before it, meaning everything after that in the line is part of the "comment" which is "--".
-
501st_commander
- Master Bounty Hunter

- Posts: 1570
- Joined: Wed Dec 10, 2008 7:48 pm
Re: Problems with Campaign Scripting (Please Help!)
oh, ok
i found these in the error log:
i found these in the error log:
Hidden/Spoiler:
- Par3210
- Jedi

- Posts: 1033
- Joined: Sun Jun 14, 2009 10:31 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Owning people in SWBF2
- Contact:
Re: Problems with Campaign Scripting (Please Help!)
That may be it. Even if it isn't, Fierfek should fix them anyway. Make sure you have com_inf_vehicle_spawn in your common/odfs folder, Fierfek.
- Fierfek
- High General

- Posts: 805
- Joined: Wed Jul 01, 2009 4:38 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)
Problems with the Mission Scripter
I'll take a look at those.
It crashes when I start up the level, then spawn. I can look straight forward and shoot, but as soon as I turn my head, it crashes.
EDIT: Okay, I fixed that problem.
I am using exact scripts from the mission scripter, but the campiagn objective popups aren't working.
This is on the default map.
Here is my lua:
I have no idea what is going wrong. Can someone please help?
Topics merged, it's best to keep it together -Staff
It crashes when I start up the level, then spawn. I can look straight forward and shoot, but as soon as I turn my head, it crashes.
EDIT: Okay, I fixed that problem.
I am using exact scripts from the mission scripter, but the campiagn objective popups aren't working.
This is on the default map.
Here is my lua:
Hidden/Spoiler:
Topics merged, it's best to keep it together -Staff
- 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: Problems with the Mission Scripter
What exactly isn't working?
- StarkillerMarek
- Rebel Colonel

- Posts: 611
- Joined: Wed Aug 12, 2009 4:42 pm
- Location: I may be back.
Re: Problems with the Mission Scripter
You do not need to add CPs like this
Hidden/Spoiler:
- Fierfek
- High General

- Posts: 805
- Joined: Wed Jul 01, 2009 4:38 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)
Re: Problems with the Mission Scripter
@ Bobfinkl - The Objectives aren't showing
@ Marek - I.... don't? ARGH!!! That is probably what is messing it up!!!! Those are conquest obectives, and I am doing a campaign map!!! If this works, I will be forever indebted to you.
EDIT: Shab, didn't work.
Here is my lua:
What's wrong with it?
@ Marek - I.... don't? ARGH!!! That is probably what is messing it up!!!! Those are conquest obectives, and I am doing a campaign map!!! If this works, I will be forever indebted to you.
EDIT: Shab, didn't work.
Here is my lua:
Hidden/Spoiler:
- Par3210
- Jedi

- Posts: 1033
- Joined: Sun Jun 14, 2009 10:31 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Owning people in SWBF2
- Contact:
Re: Problems with Campaign Scripting
StarkillerMarek was completely wrong when he said you needed to take the cps out. You still need to reference them, or you won't be able to see them ingame.
Here, you should probrably put a "," on the "}" to make it look like this...

Hidden/Spoiler:
Hidden/Spoiler:
-
ForceMaster
- Lieutenant General

- Posts: 737
- Joined: Fri Aug 08, 2008 11:27 pm
- Projects :: Tron The Grid
- xbox live or psn: No gamertag set
- Location: C:\Program Files\ForceMaster\Bin\ForceMaster.exe
Re: Problems with the Mission Scripter
Hidden/Spoiler:
Hey, this may be the problem, the objectives are not begining. the code for this is
Code: Select all
function BeginObjectivesTimer()
beginobjectivestimer = CreateTimer("beginobjectivestimer")
OnTimerElapse(BeginObjectives, beginobjectivestimer)
SetTimerValue(beginobjectivestimer, 4)
StartTimer(beginobjectivestimer)
end
function BeginObjectives()
objectiveSequence = MultiObjectiveContainer:New{delayVictoryTime = 3}
objectiveSequence:AddObjectiveSet(Objective1)
objectiveSequence:AddObjectiveSet(Objective2)
objectiveSequence:AddObjectiveSet(Objective3)
objectiveSequence:AddObjectiveSet(Objective4)
objectiveSequence:AddObjectiveSet(Objective5)
objectiveSequence:AddObjectiveSet(Objective6)
objectiveSequence:AddObjectiveSet(Objective7)
objectiveSequence:AddObjectiveSet(Objective8)
objectiveSequence:AddObjectiveSet(Objective9)
objectiveSequence:AddObjectiveSet(Objective10)
objectiveSequence:AddObjectiveSet(Objective11)
objectiveSequence:AddObjectiveSet(Objective12)
objectiveSequence:Start()
Code: Select all
function BeginObjectivesTimer()
beginobjectivestimer = CreateTimer("beginobjectivestimer")
OnTimerElapse(BeginObjectives, beginobjectivestimer)
SetTimerValue(beginobjectivestimer, 4)
StartTimer(beginobjectivestimer)
end
function BeginObjectives()
objectiveSequence = MultiObjectiveContainer:New{delayVictoryTime = 3}
objectiveSequence:AddObjectiveSet(Objective1)
objectiveSequence:Start()
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}
conquest:Start()- StarkillerMarek
- Rebel Colonel

- Posts: 611
- Joined: Wed Aug 12, 2009 4:42 pm
- Location: I may be back.
Re: Problems with Campaign Scripting
You do not need to reference any of the CPs in the way a conquest mode does. Take a look at the stock campaign missions, they don't.
And Mission-Scripter will add all the things you need to work, you should not have to add things like that.
And Mission-Scripter will add all the things you need to work, you should not have to add things like that.
- [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: Problems with Campaign Scripting
You never start your Objective1 objective and you don't have a BeginObjectivesTimers() function (but you're attempting to call it). You can remove the call to BeginObjectiveTimer(), or create the function in a way similar to how ForceMaster describes it.
If the missing comma was a problem, it would have caused a munge error.
The posted script has two objectives: Objective1 and then conquest
Wrong, wrong ,wrong. Why do people keep repeating this? However, if you want the CPs to be part of that objective, you do need those lines.You still need to reference them [The CPs], or you won't be able to see them ingame.
If the missing comma was a problem, it would have caused a munge error.
The posted script has two objectives: Objective1 and then conquest
- Par3210
- Jedi

- Posts: 1033
- Joined: Sun Jun 14, 2009 10:31 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Owning people in SWBF2
- Contact:
Re: Problems with Campaign Scripting
Alright, I was wrong, I didn't check it properly.StarkillerMarek wrote:You do not need to reference any of the CPs in the way a conquest mode does. Take a look at the stock campaign missions, they don't.
And Mission-Scripter will add all the things you need to work, you should not have to add things like that.
-
ForceMaster
- Lieutenant General

- Posts: 737
- Joined: Fri Aug 08, 2008 11:27 pm
- Projects :: Tron The Grid
- xbox live or psn: No gamertag set
- Location: C:\Program Files\ForceMaster\Bin\ForceMaster.exe
Re: Problems with The Mission Scripter
If you are using Mission Scripter, edit a start sequence, then, edit your objectives, then, edit a end sequence, them export script in the LUA folder. is easy... 
- Fierfek
- High General

- Posts: 805
- Joined: Wed Jul 01, 2009 4:38 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)
Re: Problems with The Mission Scripter
Okay.... did everything right with the mission scripter.
Here is my lua:
Problems:
AI Aren't spawning
Objectives aren't appearing
The map is the default map, and I have made the localization strings.
What's going wrong?
Here is my lua:
Hidden/Spoiler:
AI Aren't spawning
Objectives aren't appearing
The map is the default map, and I have made the localization strings.
What's going wrong?
- StarkillerMarek
- Rebel Colonel

- Posts: 611
- Joined: Wed Aug 12, 2009 4:42 pm
- Location: I may be back.
Re: Problems with The Mission Scripter
Hidden/Spoiler:
Also, try making a new gamemode in ZE and a new Layer as well then replace the line OBJ_Conquest to OBJ_yournewmodename here.
- Fierfek
- High General

- Posts: 805
- Joined: Wed Jul 01, 2009 4:38 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)
Re: Problems with The Mission Scripter
Those errors don't relate to this map - they are a different map.StarkillerMarek wrote:These may be a problem.Hidden/Spoiler:
Also, try making a new gamemode in ZE and a new Layer as well then replace the line OBJ_Conquest to OBJ_yournewmodename here.
- StarkillerMarek
- Rebel Colonel

- Posts: 611
- Joined: Wed Aug 12, 2009 4:42 pm
- Location: I may be back.
Re: Problems with mission scripting
Please list the Objectives you are trying to make.
