Page 1 of 1
Energy regen?
Posted: Fri Sep 19, 2014 3:13 pm
by Fixious
I'm tinkering around with the files to create a basic mod for someone and am trying to alter the rate of energy regen (not drain). I've looked through all of larmor's properties and can't seem to find the right variable. Any suggestions?
Also, is there a global gravity value, or is that a per-map thing?
Re: Energy regen?
Posted: Sat Sep 20, 2014 3:56 pm
by Fixious
Ghost wrote:Not on my PC right now and I'm super high but I'll try to help you out.
I believe player.cs has a function called Player::OnAdd that sets the energy regen. It should be 8 by default which means all armors are regenerating energy at the same rate.
At this point you need to code individual checks for each armor.
I don't think there is a global gravity variable but I bet you could change the gravity through the mod if you want. I'm able to change sky colors and weather through tab so I'm sure it's possible.
If you need me to explain anything in more detail let me know.
Thanks! Found the regen value just as you said. This isn't a serious mod so no need to mess with other armor types. I simply modified the Raindance gravity since that's what we're mainly testing on.
Would you happen to know how to modify when a player can fire their weapon after switching to it?
Re: Energy regen?
Posted: Sat Sep 20, 2014 9:34 pm
by Fixious
Yeah, I was tinkering with those values but I don't think they're what I need to edit.
Code: Select all
reloadTime = 0.25;
fireTime = 1.25;
spinUpTime = 0.25;
While I can modify the rate of fire, I only want to change how long it takes for the player to fire their weapon
after switching to it. I want to keep its regular ROF after that. Every weapon has that slight delay after switching to it before you can fire.
Re: Energy regen?
Posted: Wed Sep 24, 2014 8:17 pm
by DaJ4ck3L
Maybe the fire/spin/reload time proc's when you switch to the gun. You should try to edit the values down/up and see if it works that way.
Re: Energy regen?
Posted: Fri Sep 26, 2014 8:53 am
by perrinoia
I don't think you can delay it without an onFire function.
For instance, you could modify each weapon's onMount event, to record the simTime, then modify each weapons onFire event to check how much time has past since onMount, and return if less than the desired time.
However, weapons with onFire events instead or predetermined projectiles are already delayed a few milliseconds, and I find this to be aggravating.