and this is what happened
CTF AI Spawning problems
Moderator: Moderators
-
YaNkFaN
- Field Commander

- Posts: 943
- Joined: Sat Dec 13, 2008 8:17 am
CTF AI Spawning problems
So i tried changing the default flag to the kamino dna flag
and this is what happened
here's the .odf of the flag
and the important part of my .lua
any ideas how to fix this? so it attaches where it should? and doesn't look weird like that
and this is what happened
Hidden/Spoiler:
Hidden/Spoiler:
Hidden/Spoiler:
Last edited by YaNkFaN on Sat Mar 21, 2009 3:40 pm, edited 1 time in total.
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: CTF Flag Problems
That's hilarious! A bubble head! Seriously though I'd say the model is going to need to be offset somehow.
-
YaNkFaN
- Field Commander

- Posts: 943
- Joined: Sat Dec 13, 2008 8:17 am
Re: CTF Flag Problems
yea i thought it was funny too but in mygeeto campaign the model shrinks and fits on the unit's hip now i figured this
SoldierAttachBone = "bone_pelvis"
would do the trick but it didn't and also it didn't shrink the model either
Edit: stupid me i forgot to put this .msh of the carried flag in the msh folder so it just reverted to the non carried geometry it works fine now also another question is there a way to stop units from crowding around their own flag in ctf like right now some reps go and get the cis flag and vice versa but majority of both teams stand around the flag like they're trying to capture it i was thinking changing the goals to deathmatch but i don't know if that involves editing the objective_ctf script or what not.
SoldierAttachBone = "bone_pelvis"
would do the trick but it didn't and also it didn't shrink the model either
Edit: stupid me i forgot to put this .msh of the carried flag in the msh folder so it just reverted to the non carried geometry it works fine now also another question is there a way to stop units from crowding around their own flag in ctf like right now some reps go and get the cis flag and vice versa but majority of both teams stand around the flag like they're trying to capture it i was thinking changing the goals to deathmatch but i don't know if that involves editing the objective_ctf script or what not.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: CTF Flag Problems
Read psych0fred's "AI Goals" document; it covers almost exactly what you want to do with the examples he uses.
-
YaNkFaN
- Field Commander

- Posts: 943
- Joined: Sat Dec 13, 2008 8:17 am
Re: CTF Flag Problems
yes it does now i assume this goes in scriptpostload right? not scriptinit?
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
-
YaNkFaN
- Field Commander

- Posts: 943
- Joined: Sat Dec 13, 2008 8:17 am
Re: CTF Flag Problems
Edit the level works but no AI spawn the debug log gave me this error
Message Severity: 3
.\Source\LuaHelper.cpp(312)
CallProc failed: bad argument #4 to `AddAIGoal' (string expected, got nil)
stack traceback:
[C]: in function `AddAIGoal'
(none): in function `ScriptPostLoad'
and this is the relavent part of the .lua
any ideas?
Edit i've narrowed it down to this function
AddAIGoal( 1, "CTFOffense", 50, team2_capture );
AddAIGoal( 2, "CTFOffense", 50, team1_capture );
so that's the problem but i don't know how to fix it.
also these errors are right above the severity: 3
Message Severity: 2
.\Source\LuaCallbacks_Mission.cpp(635)
Entity "team1_capture" not found
updating markers for flag: flag2
no carrier
Message Severity: 2
.\Source\LuaCallbacks_Mission.cpp(635)
Entity "team2_capture" not found
updating markers for flag: flag1
no carrier
but in ZE the regions exist..
Message Severity: 3
.\Source\LuaHelper.cpp(312)
CallProc failed: bad argument #4 to `AddAIGoal' (string expected, got nil)
stack traceback:
[C]: in function `AddAIGoal'
(none): in function `ScriptPostLoad'
and this is the relavent part of the .lua
Hidden/Spoiler:
Edit i've narrowed it down to this function
AddAIGoal( 1, "CTFOffense", 50, team2_capture );
AddAIGoal( 2, "CTFOffense", 50, team1_capture );
so that's the problem but i don't know how to fix it.
also these errors are right above the severity: 3
Message Severity: 2
.\Source\LuaCallbacks_Mission.cpp(635)
Entity "team1_capture" not found
updating markers for flag: flag2
no carrier
Message Severity: 2
.\Source\LuaCallbacks_Mission.cpp(635)
Entity "team2_capture" not found
updating markers for flag: flag1
no carrier
but in ZE the regions exist..
- Frisbeetarian
- Jedi

- Posts: 1233
- Joined: Wed Sep 12, 2007 3:13 pm
Re: CTF AI Spawning problems
Maybe this will help; it's how the Kashyyyk ctf Lua was set up. Many other Lua scripts did it somewhat like what you did, judt they put it directly after the ctf:Start() or whatever other start it was using. Another thing is that after looking through a bunch of scripts, none of them cleared the AI goals, and while I know it should work, you can try it without that line.
Code: Select all
ctf.OnStart = function(self)
ctf.goal1 = AddAIGoal(REP, "Defend", 30, "gatepanel")
ctf.goal2 = AddAIGoal(CIS, "Destroy", 30, "gatepanel")
ctf.goal3 = AddAIGoal(CIS, "Destroy", 10, "woodl")
ctf.goal4 = AddAIGoal(CIS, "Destroy", 10, "woodc")
ctf.goal5 = AddAIGoal(CIS, "Destroy", 10, "woodr")
ctf.goal6 = AddAIGoal(REP, "Defend", 10, "woodl")
ctf.goal7 = AddAIGoal(REP, "Defend", 10, "woodc")
ctf.goal8 = AddAIGoal(REP, "Defend", 10, "woodr")
end
ctf:Start()- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: CTF AI Spawning problems
Add in, above your AI goals:
I wouldn't think that's necessary but it's worth a try.
Code: Select all
ActivateRegion("team1_capture")
ActivateRegion("team2_capture")-
YaNkFaN
- Field Commander

- Posts: 943
- Joined: Sat Dec 13, 2008 8:17 am
Re: CTF AI Spawning problems
hmm i did try the kash way and it was an interesting effect
the CTFOffense again when added didn't spawn units but the deathmatch and ctf defense worked quite nicely i'm assuming that ctf offense is already in the default ctf objective so calling it twice called the error possibly i'll try adding the activate region lines and then adding the ctfoffense objective to see what happenes
the CTFOffense again when added didn't spawn units but the deathmatch and ctf defense worked quite nicely i'm assuming that ctf offense is already in the default ctf objective so calling it twice called the error possibly i'll try adding the activate region lines and then adding the ctfoffense objective to see what happenes
-
Jaspo
- Command Sergeant Major

- Posts: 282
- Joined: Sun Mar 01, 2009 4:34 am
- Projects :: AotC DoW+++Boonta Eve Classic
- xbox live or psn: No gamertag set
- Contact:
Re: CTF AI Spawning problems
Lol, that first pic needs to be made into a PotD. Funny captions, anyone?
