Turret Spawner Instance

Avatar
Zephlon
19 Posts
Posted Aug 10, 2011
I made a turret spawner instance. It works when you have only one on the map. When I tried putting multiple ones of them on my map (giving them the same name), and triggering all of them, the game crashed.

Is there a way to do this without giving them unique names and adding individual outputs to the button for every single one?

Attachments
turret_spawner.vmf
0.00 MB 41 downloads
Advertisement
Registered users don’t see ads! Register now!
Avatar
ChickenMobile
2,460 Posts
Posted Aug 10, 2011
Replied 1 hour later
I have tried spawning turrets and it worked fine for me. However I only had a max of 2 turrets at one time.
I remember in the HL2 engine you could use a parameter in the npc_maker to fix up name automatically. Perhaps this might be somewhere in the Portal engine.
Avatar
KenJeKenny!?
238 Posts
Posted Aug 11, 2011
Replied 8 hours later
Why wouldn't you just give the instances unique names? Or do you have more then 50 spawners or something?

It doesn't matter how the entities are named within the instances but the instance has to have a unique name or none at all...

Avatar
Zephlon
19 Posts
Posted Aug 11, 2011
Replied 6 hours later
More like 10, but I would like to avoid extra work when it's not necessary. But I guess I have no choice.
Avatar
KenJeKenny!?
238 Posts
Posted Aug 11, 2011
Replied 28 minutes later
if you create just one instance and name it turret_spawner_1 for example... then copy it and special paste it 9 times... you will have 10 copies, all numbered from 1 to 10.
And any output you would have to send to the instances would be as simple as creating 1 output string, copying it 9 times and just choosing the appropriate numbers for each copy.
Avatar
Zephlon
19 Posts
Posted Aug 11, 2011
Replied 5 minutes later
I didn't know about special paste. I'll have to remember that next time. (I already numbered each one.)

Thanks.

Avatar
MasterLagger
1,695 Posts
Posted Aug 11, 2011
Replied 3 hours later
I've made turret spawners in a few maps of mine, however I didn't make them into instances. I just pressed "Shift" and "Arrow Key" to copy and paste the npc_maker. Maybe you ought to try making turret spawners without saving them as instances.
Avatar
Zephlon
19 Posts
Posted Aug 11, 2011
Replied 2 minutes later
I got it to work already, thanks anyway.
Avatar
KenJeKenny!?
238 Posts
Posted Aug 11, 2011
Replied 2 hours later

MasterLagger wrote:
I've made turret spawners in a few maps of mine, however I didn't make them into instances. I just pressed "Shift" and "Arrow Key" to copy and paste the npc_maker. Maybe you ought to try making turret spawners without saving them as instances.

The whole reason instances are there is so you can save time whenever you have to place the same brushes/entities over and over again... the func_instance was introduced especially for situations like these :razz:

So, keep using them func_instances! :biggrin:

Avatar
MasterLagger
1,695 Posts
Posted Aug 11, 2011
Replied 3 hours later
Do custom instances (say the Turret Spawner for example) need to be packed into a VPK file so other people can play them on a map?
Advertisement
Registered users don’t see ads! Register now!
Avatar
Vordwann
767 Posts
Posted Aug 11, 2011
Replied 40 minutes later
No. Instances get turned into standard pieces of a .bsp file. However, if people want to look at the .vmf, they will need the instances to see everything properly.