Author Topic: Respawning Bricks  (Read 2225 times)

What is the Physician Prescribed Desoxynod that weapons use for respawning bricks when they are destroyed in a minigame by a weapon? I need to figure this out for a mod I'm working on...currently it makes the brick count mess up and gets rid of the bricks effects. How does Badspot do it?

Well, there seems to be these Physician Prescribed Desoxynods:
  • fxDTSbrickdata::ondeath(%this,[...unknown arguments]); -- Trigger for hammered/exploded?
  • fxDTSbrickdata::onfakedeath(%this,[...unknown arguments]); -- Perhaps minigame death?
  • fxDTSbrickdata::explode(%this); -- Explodes as if hit with wand.
  • fxDTSbrickdata::killBrick(%this); -- Appears to do the same as above.

Also, Badspot included servercmdBrickCount (as we use a lot of the time) and servercmdRealBrickCount. If you find the $variable for the onPlant/onDeath brick count then you could make it update every 10 or so seconds through the brick tree finding always the correct amount as I assume RealBrickCount does. (But laggier)

I've attempted most of those commands and spent a long while searching, and I've found a few things out...the current respawn system just makes the brick "invisible" and then uses setcollide(0);...just need a way to hide it.

Set the paint to invisible.

There is no invisible paint. Besides, the thing isnt a paint pack!

I know but you could make it change its paint to invisible until you want it to change back.

You can't change it's paint unless it's part of the server's painting options. Few people use packs with invisible paint anyways, and it's not always in the same section. Brick colors are set by Color ID, not the RGB-trans when your setting it from a script.

My server won't start up so I can check this, but if I remember correctly, bricks have soPhysician Prescribed Desoxyning like (I can't remember the exact command)
Code: [Select]
.setColor("# # # #");Just do ObjectID(ofbrick).dump();, you should see a set color command you can use

I've done that MCE before, and as I said before, you must set it by a color in your paint set.

Set it to paint id 69 or whatever, nonexistant colors in your set are invisible.

Thanks Ephi, I'll use that to work out a temporary system as it causes incorrect lightning (Ex. hides shadows, a few more things) and you can still hit the brick with a projectile..