CP Unselectable In-game & Concept Questions [Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
MrMew
Private Third Class
Posts: 52
Joined: Tue Mar 29, 2016 10:44 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

CP Unselectable In-game & Concept Questions [Solved]

Post by MrMew »

I added a 5th cp to the default 4, I added a control region, spawn path and linked them to the object. I also added the cp to the lua scripts for conquest. In-game the cp can be captured, classes can be changed at it, but upon re-spawning I can't select it to spawn from. What have I done wrong?

Conceptual Questions (Stuff I probably wouldn't try in the next century):
Is it possible to have a FFA mode?
Is it possible to have moving spawns?
Is it possible to have moving vehicle spawns?
Is it possible to havin moving AI paths?

And are there any Half-life mods?
Last edited by MrMew on Wed Apr 06, 2016 3:00 am, edited 1 time in total.
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am
Games I'm Playing :: SWBF2
Location: Princeton, NJ

Re: CP Unselectable In-game & Concept Questions

Post by razac920 »

The only time I've seen that happen is when a third local team that is friendly to yours captures the CP, then it appears blue but unselectable. Don't know if you could switch classes from it under that circumstance though, or if this is at all relevant.

Conceptual Questions:
1. Yes, I made a FFA mode awhile back (viewtopic.php?f=35&t=30592) Source code: (viewtopic.php?f=64&t=30601)
2. Probably technically no (other than spawns from movable command vehicles like AT-AT, AT-TE, and landing spacecrafts), but you can use scripting to give that illusion by teleporting players after spawn
3. Same as #2
4. Probably not, and I don't know how to simulate that with scripting.

5. None that I've ever played/heard of/could find with a Google search.
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: CP Unselectable In-game & Concept Questions

Post by thelegend »

You can't move spawn paths at all like animating an Object, but you can have "rotating" spawnpaths for each cp. I am still not sure how to write a timer which repeats itself and it's functions but you can change a commandpost's value like this:

Code: Select all

SetProperty("cp1", "SpawnPath", "cp1_spawn_a")
then

Code: Select all

SetProperty("cp1", "SpawnPath", "cp1_spawn_b")
then

Code: Select all

SetProperty("cp1", "SpawnPath", "cp1_spawn_c")
and so on.

You can also do the same with a simple math.random command which randomly chooses one certain path after the beginning. I think I am going to introduce random spawn paths in my current map since it might feel different than normally. Especially in multiplayer.
I would like to know what exactly you have planned with moving paths? Maybe, if we know what you planned, we can find another solution for this.
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: CP Unselectable In-game & Concept Questions

Post by AnthonyBF2 »

I tried to animate command posts before, the result was well useless. The actual CP object can be animated, but the capture zone and spawn path cannot be animated.

The only moving spawns, is what Razac said - with the command walkers. Command Flyers can't have moving spawns either, once they are moving you cannot select it as a spawn.
User avatar
MrMew
Private Third Class
Posts: 52
Joined: Tue Mar 29, 2016 10:44 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: CP Unselectable In-game & Concept Questions

Post by MrMew »

I just had an idea involving moving capital ships.

That cp I numbered as 0 in the scripts and in ZE, it also has a team value of zero so it is neutral. Would that effect the selection ability?
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: CP Unselectable In-game & Concept Questions

Post by AnthonyBF2 »

The game engine runs with teams 1 and teams 1. If a cp isn't team 1 or 2 you cannot use. There are fancy ways to make the player neutral but it requires some slick scripting.

Also, capitol ships are actually chunks. You'd have to animate all the pieces of a ship at the same time, including turrets and external items like the comm relay, engines, etc. Keep in mind as well that once the capitol ship leaves it's original destination, the spawn paths and vehicle spawns will be in the air, and you'll just respawn already falling into nothing.
User avatar
MrMew
Private Third Class
Posts: 52
Joined: Tue Mar 29, 2016 10:44 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: CP Unselectable In-game & Concept Questions

Post by MrMew »

Well that's strange because in a previous map I made I created a neutral cp set to team 0 and it is fully functional, no fancy scripting either. Yeah I realise what a captial ship is and that the vehicles and spawns would get left behind hence the questions...
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am
Games I'm Playing :: SWBF2
Location: Princeton, NJ

Re: CP Unselectable In-game & Concept Questions

Post by razac920 »

I think anthonybf2 means that a CP needs to be either team 1 or team 2 for a human player to spawn from it, team 0 is neutral and works just fine -- but neither team owns it and can spawn from it.

And while you can switch spawn paths for a given CP midgame (I suppose this is true, I have never tried?), that assumes that you have already made the other path. I don't think there is a way to dynamically modify the positions of the nodes in the path, so if you want a movable capital ship with vehicle and unit spawns, I think your best bet is with scripting, to save the initial position of the capital ship, and teleport all vehicles and units that spawn from it to the new location of the capital ship. I imagine it would get very complicated for anything other than capital ships moving in straight lines.
User avatar
MrMew
Private Third Class
Posts: 52
Joined: Tue Mar 29, 2016 10:44 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: CP Unselectable In-game & Concept Questions

Post by MrMew »

Ok ok...

Previous map: Set team to 0
Can spawn from it, can change class at it, can capture it, can select it when respawning to spawn at

This map: Set team to 0
Can change class, can capture it, CANNOT select in when respawning to spawn from

They are essentially identical in design, but not in nature.
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am
Games I'm Playing :: SWBF2
Location: Princeton, NJ

Re: CP Unselectable In-game & Concept Questions

Post by razac920 »

Hmm, my guess is that the spawn path is messed up?
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: CP Unselectable In-game & Concept Questions

Post by jedimoose32 »

Semi-related: razac, you can change the spawn path of a CP at any point in the game using SetProperty("cp name", "SpawnPath", "path name").

@MrMew: Something is wrong with the spawn path as razac said, or maybe check your Lua to make sure you added the new CP correctly.
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am
Games I'm Playing :: SWBF2
Location: Princeton, NJ

Re: CP Unselectable In-game & Concept Questions

Post by razac920 »

Haha okay that makes sense, I've just never tried doing so.

A very quick way to check if it is the spawn path is edit the map so that CP is the only one your team has at start, and see if you can spawn.
User avatar
MrMew
Private Third Class
Posts: 52
Joined: Tue Mar 29, 2016 10:44 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: CP Unselectable In-game & Concept Questions

Post by MrMew »

Haha yeah it was the spawn path, I had a typo under that field on the cp.
MoonDeity
Posts: 2
Joined: Mon Apr 20, 2020 11:46 am
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: CP Unselectable In-game & Concept Questions [Solved]

Post by MoonDeity »

I still cant select a different CP
Post Reply