Game Modding | Call of Duty: Black Ops 3 | Scripting
BryceiBoi:
Hi all, new to the forums here. Lots of very useful information! :)
I'm having a small issue of my own so I'll just give a little bit of context to the functionality I'd like to implement (it's rather simple, really). Basically, there is a zombie door I have which once opened allows players to enter a Zone in which consists of 'x' Zombie spawners that scripted to enter through 'y' zombie barriers. These barriers lead into the starting zone! SO, I would like to delete said 'y' zombie barriers to enable players to jump through these windows to easily enter-exit the starting zone. This is what I'm having issues with - my delete() wont delete the barriers. I was wondering if this had anything to do with zombie barriers being prefabs? It's got to be something extremely simple that I'm misunderstanding I assume
Spiki:
The barricades are Zbarriers not entities. Also it wouldnt help to delete them bacause the prefab has a static clip in it which would stop movement anyway.
is what you want
BryceiBoi:
The barricades are Zbarriers not entities. Also it wouldnt help to delete them bacause the prefab has a static clip in it which would stop ovement anyway.
is what you want
Spiki:
That does sound like the function I need to utilise. Another question though, how can I identify which ZBarrier in the Array is the one I need to remove? Can I access the value of a KVP by simply using the dot operator? For example:
Alternatively, I guess I could just do some vigorous trial and error to find which array index is the one I need :ROFLMAO:
BryceiBoi:
Ok, so I've almost got this! I can get the ZBarrier and delete it with delete() however the clip remains there so I cant walk through where the barrier once was. Any ideas?
BryceiBoi:
Managed to resolve the problem by deleting the player clip from the ZBarrier prefab (barricade_reciever_wood.map) and adding the clip outside of the prefab manually. Then in the script just not only deleting the ZBarrier object, but also the clip separately:
Cheers for the help Spiki :)