Black-Cell.net

  • December 17, 2018, 01:08:15 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Weapon spawn  (Read 1611 times)

Reborn

  • Donator
  • Offline Offline
  • Posts: 200
    • View Profile
Weapon spawn
« on: March 12, 2009, 10:48:20 AM »

I wrote a weapon spawn manager for cnc_reborn, it emulated the Black-cell weapon spawn system where the spawner changed model every x seconds to signify that the weapon given would be random. This was fine as I created the power-up and then granted the random weapon on the ::Custom. However, I was writing a plug-in for SSGM that did the same thing, but without the manager creating the weapon spawns. I was trying to use the Object Create hook to attach a script to the weapon spawn (meaning that I diddn't have to add positions for weapon spawns, just change the existing ones), then found that the weapon spawn isn't actually a power-up at all after the model wasn't changing... Then it turned out that the ObjectCreateHook doesn't even pick up the weapon spawner at all. Period.
Can anyone think of a way to hook it?
I mean, I could probably just attach a script to it in level edit, but that's not the way I wanted to do it, I just wanted to distribute it as a .dll. Needing a modified objects file is pretty crappy, as allot of server owners will already have a modified version.
I can think of otherways to attach the script to the weapon spawn, but it would mean iterating through all the objects with a string comparision every x time. Which is obviously shockingly crap.

So, anyone got any ideas?
Logged

ccfan4326

  • Network Administrator
  • Offline Offline
  • Posts: 1608
    • View Profile
Re: Weapon spawn
« Reply #1 on: March 15, 2009, 09:34:39 AM »

It's been a while since I've messed around with that stuff, what exactly are you trying to change? I think SSGM's objects.dbb hooks into the default weapon spawner so maybe you could tie into that script? I can't remember, sorry.
Logged

Reborn

  • Donator
  • Offline Offline
  • Posts: 200
    • View Profile
Re: Weapon spawn
« Reply #2 on: March 22, 2009, 10:50:01 PM »

I didn't actually realise you was involved with DA, you don't make that very public :o
I'm on vacation at the moment, but am pretty sure that SSGM 2.02 doesn't include an objects file. I think SSGM 2.01 did, but it was dropped in 2.02.
It's not a massive deal, I just wanted to make the weapon spawns similar to DA's version. No worries, thanks for your time.
Logged

ccfan4326

  • Network Administrator
  • Offline Offline
  • Posts: 1608
    • View Profile
Re: Weapon spawn
« Reply #3 on: March 23, 2009, 09:37:02 AM »

The first couple of updates or so after vlokt left were mine, then WD has been the one working on it ever since, so I never had much hand in the code.

I remember having some kind of issue similar to what you're talking about but it escapes me. I think my fix was just to attach a script which doesn't really help you, didn't realize objects.dbb was removed from SSGM.
Logged
Pages: [1]   Go Up