Page 1 of 1

Developer Insight Requested!

PostPosted: Thu Nov 17, 2011 1:48 pm
by kameroti
Hello,

I need a func_rotating that does energy draining rather than physical damage to the players. Is it possible to find/duplicate the code that makes func_rotating work and switch it's code to drain energy as well...?

If so, where would I find that logic in the source/dystopia GCF's?

-- Kameroti
(Yes, I'm still alive...)

Re: Developer Insight Requested!

PostPosted: Thu Nov 17, 2011 8:27 pm
by Fedio
func_rotating cannot drain energy. Your best bet would be to set the func_rotating to have 0 damage and then add a cyber_drain brush and parent it to the func_rotating. That way the cyber_drain brush will move with the func_rotating brush.

But if I remember correctly, I think adding func_rotating in cyberspace caused a lot of network lag. I would check with Hyphenated to see if he was able to fix that.

-Fedio

Re: Developer Insight Requested!

PostPosted: Thu Nov 17, 2011 10:04 pm
by Spire
I think a few func_rotating objects in your map would be fine, just be reasonable about how many you use.

Re: Developer Insight Requested!

PostPosted: Thu Nov 17, 2011 10:28 pm
by Hyphen-ated
Cyberspace is the second-most-expensive place to put func_rotatings, because usually their angle will get transmitted every frame to every player who is anywhere near a JIP. (the most expensive place is the skybox, because then it gets sent to every player, always. Don't put rotatings in the skybox, please. Same goes for trains)

Like Spire said, it's okay to use a few. It only becomes a problem when there's too much network traffic on the map. You can use net_graph 4 to see if there's a problem. You want the graph to be as low as possible.

Re: Developer Insight Requested!

PostPosted: Fri Nov 18, 2011 1:48 pm
by kameroti
func_rotating cannot drain energy. Your best bet would be to set the func_rotating to have 0 damage and then add a cyber_drain brush and parent it to the func_rotating. That way the cyber_drain brush will move with the func_rotating brush.
Very first thing I tried many years ago, unfortunately if a player blocks the func_rotating the cyber_drian then gets unsynced with it.

My hope was, as the developers made cyber_drain, seeing if I could dupe the code for func_rotating and just switch it's damage to energy...

-- Kameroti