respawning destructable cps?

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
Commander_Fett
High General
High General
Posts: 847
Joined: Fri Oct 17, 2008 9:59 pm
Projects :: No Mod project currently.

respawning destructable cps?

Post by Commander_Fett »

I was working on a campaign, trying to get the hang of it. At one part, I'm trying to respawn technounion ship cps, but they won't respawn, causing the rest of the objectives to screw up. I added

Code: Select all

KillObject("cp_tec_1")
KillObject("cp_tec_2")
and that worked, but they wouldn't respawn later with

Code: Select all

RespawnObject("cp_tec_1")
RespawnObject("cp_tec_2")
The main idea was to keep AI from spawning from there, so I tried

Code: Select all

											SetProperty("cp_tec_1", "SpawnPath", "")
											SetProperty("cp_tec_2", "SpawnPath", "")
--I just guessed on this, is there a command for this and I just guessed wrong?
instead, but to no avail. Did I mess up somewhere, or is it impossible to respawn destructable cps?
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: respawning destructable cps?

Post by Fiodis »

Found this in the shipped scripting document, may be of use if you hvaen't seen it already:
Hidden/Spoiler:
[quote]
CommandPostRespawn: function (post)
Actor: post
Context: none
Instance: N/A
This Event occurs when a Command Post spawns or respawns
[/quote]
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: respawning destructable cps?

Post by Maveritchell »

KillObject and RespawnObject are fine. The problem must be somewhere else.
User avatar
trainmaster611
Sith Lord
Sith Lord
Posts: 1779
Joined: Thu Aug 24, 2006 5:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Building a railway to Coruscant
Contact:

Re: respawning destructable cps?

Post by trainmaster611 »

Might it have something to do with the script recognizing the the respawned object as a cp after its already been destroyed before?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: respawning destructable cps?

Post by Maveritchell »

trainmaster611 wrote:Might it have something to do with the script recognizing the the respawned object as a cp after its already been destroyed before?
Like I said, those are fine. You can kill a CP, respawn a CP, kill a CP, respawn a CP ad nauseum. I've done it before a lot (it's almost necessary to use this in any campaign script).
Post Reply