OnFinishCapture help
Moderator: Moderators
- Lorul1
- Rebel Colonel

- Posts: 562
- Joined: Wed Apr 24, 2013 10:34 pm
- Projects :: Assault on Theed
- xbox live or psn: No gamertag set
- Location: Your House
OnFinishCapture help
I'm trying to make something that i can put in my lua so that when cp4 is captured by team 1 it animates an animation called "animation1". I know its wrong so can some one please correct it.
takeanimate = OnFinishCapture(
function(post, holding)
if GetCommandPostTeam(cp4) == "team1" then
PlayAnimation("animation1")
end
end
)
Also another thing i have many regions that i want to start out un-activated then when i destroy something i want those region to be active. what changes to the script above do i need to make to do that.
takeanimate = OnFinishCapture(
function(post, holding)
if GetCommandPostTeam(cp4) == "team1" then
PlayAnimation("animation1")
end
end
)
Also another thing i have many regions that i want to start out un-activated then when i destroy something i want those region to be active. what changes to the script above do i need to make to do that.
-
Marth8880
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: OnFinishCapture help
How do you know it's wrong? What happens in-game?
- Lorul1
- Rebel Colonel

- Posts: 562
- Joined: Wed Apr 24, 2013 10:34 pm
- Projects :: Assault on Theed
- xbox live or psn: No gamertag set
- Location: Your House
Re: OnFinishCapture help
oh (quick response) i haven't tested it yet. dose it look good to you. dose it work in your game.
-
Marth8880
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: OnFinishCapture help
You should change "team1" to ATT, 1, or whichever team is set to team 1 (CIS, REP, ALL, or IMP); make sure to not have quotes.
- Lorul1
- Rebel Colonel

- Posts: 562
- Joined: Wed Apr 24, 2013 10:34 pm
- Projects :: Assault on Theed
- xbox live or psn: No gamertag set
- Location: Your House
Re: OnFinishCapture help
so like this?
takeanimate = OnFinishCapture(
function(post, holding)
if GetCommandPostTeam(thecommandpostiwant) == ATT,1 then
PlayAnimation("whateveranimationgroup")
end
end
)
i don't really understand what the line function(post, holding) is meant to do
takeanimate = OnFinishCapture(
function(post, holding)
if GetCommandPostTeam(thecommandpostiwant) == ATT,1 then
PlayAnimation("whateveranimationgroup")
end
end
)
i don't really understand what the line function(post, holding) is meant to do
-
Marth8880
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: OnFinishCapture help
Nope. I said ATT, 1, OR the team ID (REP, CIS, ALL, or IMP).
- Lorul1
- Rebel Colonel

- Posts: 562
- Joined: Wed Apr 24, 2013 10:34 pm
- Projects :: Assault on Theed
- xbox live or psn: No gamertag set
- Location: Your House
Re: OnFinishCapture help
okay this is exactly what i have and its not working
takeanimate = OnFinishCapture(
function(cp3, holding)
if GetCommandPostTeam(cp3) == REP then
PlayAnimation("dropship")
end
end
)
maybe it has something to do with the line: function(cp3, holding)
can you please correct this script above and post it on your next response
takeanimate = OnFinishCapture(
function(cp3, holding)
if GetCommandPostTeam(cp3) == REP then
PlayAnimation("dropship")
end
end
)
maybe it has something to do with the line: function(cp3, holding)
can you please correct this script above and post it on your next response
-
Marth8880
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: OnFinishCapture help
Why did you change "post" to "cp3"? Change that part back to function(post, holding).
- Lorul1
- Rebel Colonel

- Posts: 562
- Joined: Wed Apr 24, 2013 10:34 pm
- Projects :: Assault on Theed
- xbox live or psn: No gamertag set
- Location: Your House
Re: OnFinishCapture help
it still dosent work
okay here's my lua
this is what I want
when the republic takes cp3 an animation called "Abc" plays.
what did I do wrong.
okay here's my lua
Hidden/Spoiler:
this is what I want
when the republic takes cp3 an animation called "Abc" plays.
what did I do wrong.
-
Marth8880
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: OnFinishCapture help
What does your debug log say? Also, you'll probably have to give these objects specific names in Zero Editor instead of just referencing their ODF names.
- Lorul1
- Rebel Colonel

- Posts: 562
- Joined: Wed Apr 24, 2013 10:34 pm
- Projects :: Assault on Theed
- xbox live or psn: No gamertag set
- Location: Your House
Re: OnFinishCapture help
My debug log doesn't say ANYTHING about my Lua ( I can post it tomorrow)
And what items are you taking about cp3?
And also I DON'T Know how to code in Lua as well as most people here at gametoast.
I just need an on capture, animate script so my map can be complete and the the script I made above doesn't work
Any ideas or fixes you can make to the lua
And what items are you taking about cp3?
And also I DON'T Know how to code in Lua as well as most people here at gametoast.
I just need an on capture, animate script so my map can be complete and the the script I made above doesn't work
Any ideas or fixes you can make to the lua
-
Marth8880
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: OnFinishCapture help
Huh?Lorul1 wrote:And what items are you taking about cp3?
- Lorul1
- Rebel Colonel

- Posts: 562
- Joined: Wed Apr 24, 2013 10:34 pm
- Projects :: Assault on Theed
- xbox live or psn: No gamertag set
- Location: Your House
Re: OnFinishCapture help
Marth8880 wrote:you'll probably have to give these objects specific names in Zero Editor instead of just referencing their ODF names.
-
Marth8880
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: OnFinishCapture help
Any objects you reference in your LUA must have a specific name given in Zero Editor.
- Lorul1
- Rebel Colonel

- Posts: 562
- Joined: Wed Apr 24, 2013 10:34 pm
- Projects :: Assault on Theed
- xbox live or psn: No gamertag set
- Location: Your House
Re: OnFinishCapture help
Well the only object that I'm representing in my lua to get an on capture, animate script is cp3 (wich is named cp3). I'm guessing you have a lot of experience programming you can eject my lua code that dosent work into your Lua and Change it to work ... if you want to. that's the only troubleshooter I can think of.
EDIT: I fixed the problem
it was something with the Luna and quotations I will try to add "solved" to this topic as well as post the correct Lua for anyone who will need it in the future on Friday. thanks for your help ^_^
EDIT: I fixed the problem
