KillObject Issues? [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

Locked
Master_Ben
Lieutenant General
Lieutenant General
Posts: 675
Joined: Wed Nov 12, 2008 9:50 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: Watching your PC over your shoulder. No, the other sholder....

KillObject Issues? [Solved]

Post by Master_Ben »

So I've set up a few turrets to be killed when the game starts and respawn when the player enters a region, but the turrets aren't killed, and for some reason it isn't working. Here's the important part, in scriptpostload:
Hidden/Spoiler:
KillObject("tur_bldg_hoth_dishturret")
KillObject("tur_bldg_hoth_dishturret1")
KillObject("tur_bldg_hoth_dishturret2")
KillObject("tur_bldg_hoth_dishturret3")
KillObject("tur_bldg_hoth_dishturret4")
KillObject("tur_bldg_hoth_dishturret5")



ActivateRegion("cpcapture")
testfunction = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player, 1) then
RespawnObject("tur_bldg_hoth_dishturret")
RespawnObject("tur_bldg_hoth_dishturret1")
RespawnObject("tur_bldg_hoth_dishturret2")
RespawnObject("tur_bldg_hoth_dishturret3")
RespawnObject("tur_bldg_hoth_dishturret4")
RespawnObject("tur_bldg_hoth_dishturret5")
end
end,
"cpcapture"
)
EDIT: It's working now, although I don't know why since I didn't change anything. Topic can be locked.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: KillObject Issues?

Post by [RDH]Zerted »

Maybe you had forgotten to munge?

*Locked*
Locked