Page 1 of 1

respawning destructable cps?

Posted: Wed Feb 25, 2009 7:26 pm
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?

Re: respawning destructable cps?

Posted: Thu Feb 26, 2009 8:27 pm
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]

Re: respawning destructable cps?

Posted: Thu Feb 26, 2009 8:34 pm
by Maveritchell
KillObject and RespawnObject are fine. The problem must be somewhere else.

Re: respawning destructable cps?

Posted: Thu Feb 26, 2009 10:20 pm
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?

Re: respawning destructable cps?

Posted: Thu Feb 26, 2009 10:28 pm
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).