Ulysses

Ulysses Stuff => Suggestions => Topic started by: sweetone on December 06, 2011, 01:30:18 PM

Title: Random gravity?
Post by: sweetone on December 06, 2011, 01:30:18 PM
Hi!

What do you think about a random gravity? Like every 10 seconds there activates a zerogravity for 30seconds or something like that. :D

This is what im suggesting to be a part of ulx.
Title: Re: Random gravity?
Post by: krooks on December 06, 2011, 04:44:44 PM
I could see that being less part of ULX and more just a random addon someone *might* be interested in making if they like the idea.
Title: Re: Random gravity?
Post by: JamminR on December 06, 2011, 08:04:05 PM
Actually, I could see this being added to ULX as one of the first new features added in a long time.
It's been a while since we've added a fun new "not needed" feature. I mean, hey, maul was one of the last ones. Imagine being mauled while in 0 gravity. (wonder if that would even work?!)
I do not see doing it myself though, and would hope one of our community members would do it.
I'm not saying we WILL, but, we MIGHT edit/clean/check for ULX codestyle (http://forums.ulyssesmod.net/index.php/topic,3658.0.html) and compatibility, and add it with credit in the readme and code if we liked it well enough.
Here's how I see it being done.
There would be default limits. Typing ulx <grav?> by itself would totally disable gravity for, say, 30 seconds?
"ulx grav -1" would <disable/increase/decrease gravity within default command limits> for <minimum/maximum time within default command limits>
ulx grav itself, if not randomized with -1, would allow for say, -3x to +3x normal gravity, defaulting to none if not specified, for say, no less than 30 seconds, up to unlimited time... ulx command structure would allow setting of enforced time limits for non superadmins. (Example, superadmin could set unlimited, but admins could only do up to 10 minutes)
Title: Re: Random gravity?
Post by: sweetone on December 07, 2011, 07:36:49 AM
Actually, I could see this being added to ULX as one of the first new features added in a long time.
It's been a while since we've added a fun new "not needed" feature. I mean, hey, maul was one of the last ones. Imagine being mauled while in 0 gravity. (wonder if that would even work?!)
I do not see doing it myself though, and would hope one of our community members would do it.
I'm not saying we WILL, but, we MIGHT edit/clean/check for ULX codestyle (http://forums.ulyssesmod.net/index.php/topic,3658.0.html) and compatibility, and add it with credit in the readme and code if we liked it well enough.
Here's how I see it being done.
There would be default limits. Typing ulx <grav?> by itself would totally disable gravity for, say, 30 seconds?
"ulx grav -1" would <disable/increase/decrease gravity within default command limits> for <minimum/maximum time within default command limits>
ulx grav itself, if not randomized with -1, would allow for say, -3x to +3x normal gravity, defaulting to none if not specified, for say, no less than 30 seconds, up to unlimited time... ulx command structure would allow setting of enforced time limits for non superadmins. (Example, superadmin could set unlimited, but admins could only do up to 10 minutes)

:) just like that. Any change to add there some random options like.. gravity disabled for 30seconds by every 5minutes? :D We've been trying this with E2 and field generator it's fun when all props fly around haha. :D
Title: Re: Random gravity?
Post by: krooks on December 07, 2011, 07:36:19 PM
Actually, I could see this being added to ULX as one of the first new features added in a long time.
:o
I'm not opposed to it, but I didn't see that coming! hahaha
I'll no longer give out the standard respons as someone not on the actual team. Humbled.  ;D
Title: Re: Random gravity?
Post by: JamminR on December 07, 2011, 08:33:02 PM
Re: Random ... -1 would pretty much do that for both grav and time, though the 'how often' would be an additional option, defaulting to once if no randomness set.

Re: Krooks - Response - no worries. I in no way intended to humble you, and please, continue sharing your thoughts.
 In all honesty, that is our usual response.
Most suggestions here, though many are good, don't fit ULX simplicity and "administration" purpose, and  your (and our) normal response "not in ULX, but perhaps a module " fits.
This one, though the randomness ideas involved complicate it a bit, do add an additional option to the 'server settings' of server administration ULX is intended for.
Now, if only someone would write it. :)
Title: Re: Random gravity?
Post by: MrPresident on December 08, 2011, 12:49:14 AM
If you guys want to wait about 12 months, I'd be happy to take this project on...


#NoGModSucks :(
Title: Re: Random gravity?
Post by: JamminR on December 08, 2011, 04:12:09 AM
I can wait. :)
Let's see if others can.
Title: Re: Random gravity?
Post by: MrPresident on December 08, 2011, 06:02:09 AM
If someone is feeling particularly generous, you could always put your GMod's .gcf files onto a DVD or 3 and mail them to me. :) I think if I had that Steam would unlock it and it'd be playable with little to no downloading. hah.
Title: Re: Random gravity?
Post by: Aaron113 on December 11, 2011, 08:11:11 PM
Sounds easy enough.  I could probably get it done in less than an hour.  I'll see what I can do tomorrow.
Title: Re: Random gravity?
Post by: krooks on December 12, 2011, 07:33:32 PM
If I could rate posts, I'd rate yours "winner"   ;D
Title: Re: Random gravity?
Post by: Aaron113 on December 13, 2011, 02:46:31 PM
I forgots about it.  I'll start now.
Title: Re: Random gravity?
Post by: Aaron113 on December 13, 2011, 03:27:09 PM
It isn't done, but is this something like what you guys had in mind?
Code: [Select]
------------------------------ Grav ------------------------------
function ulx.grav( calling_ply, gravity, seconds )
for k,v in pairs( player.GetAll() ) do
v:SetGravity( gravity )
end
timer.Simple( seconds, function()
for k,v in pairs( player.GetAll() ) do
v:SetGravity( 1 )
end
end )
ulx.fancyLogAdmin( calling_ply, "#A set gravity to #i for #i seconds", gravity, seconds )
end
local grav = ulx.command( CATEGORY_NAME, "ulx grav", ulx.grav, "!grav" )
grav:addParam{ type=ULib.cmds.NumArg }
grav:addParam{ type=ULib.cmds.NumArg }
grav:defaultAccess( ULib.ACCESS_ADMIN )
grav:help( "Randomizes gravity for everyone." )
Title: Re: Random gravity?
Post by: JamminR on December 13, 2011, 06:14:01 PM
Sounds easy enough.  I could probably get it done in less than an hour.  I'll see what I can do tomorrow.
I forgots about it.  I'll start now.

Sheesh man...whatever you do...don't blink.
SQUIRREL!

re: Code sample.
Yeah, lookin along the right lines.
Add the default vars/randomization ideas..throw in cmds.PlayersArg...etc etc.

MrPres...still got plans for you man...just may be a while. Not found time to research.
Title: Re: Random gravity?
Post by: Aaron113 on December 13, 2011, 08:17:11 PM
Sounds easy enough.  I'll get her done tomorrow some time.
Title: Re: Random gravity?
Post by: MrPresident on December 13, 2011, 08:42:28 PM
Not sure if it was requested, but don't forget physics props... I personally don't see the point in having gravity shut off for players but having all props still effected by it..
Title: Re: Random gravity?
Post by: Aaron113 on December 14, 2011, 05:52:07 AM
I'll see what I can whip up for that then.
Title: Re: Random gravity?
Post by: krooks on December 14, 2011, 10:03:27 AM
This is gonna be fun!
Thanks Aaron113 (and JamminR for your code verification stuffs)  ;D
Title: Re: Random gravity?
Post by: sweetone on December 19, 2011, 08:09:42 PM
Not sure if it was requested, but don't forget physics props... I personally don't see the point in having gravity shut off for players but having all props still effected by it..

:) yea it was requested!
Title: Re: Random gravity?
Post by: sweetone on December 23, 2011, 07:29:33 AM
Sorry for double post but how is the progress? :)
Title: Re: Random gravity?
Post by: Aaron113 on December 23, 2011, 09:31:06 AM
I've been busy.  I'll try and fit some time in for it today or after Christmas.
Title: Re: Random gravity?
Post by: krooks on December 23, 2011, 09:34:09 AM
That Christmas is getting all of us!
Such a busy time of year.
Title: Re: Random gravity?
Post by: sweetone on January 05, 2012, 04:51:59 PM
It isn't done, but is this something like what you guys had in mind?
Code: [Select]
------------------------------ Grav ------------------------------
function ulx.grav( calling_ply, gravity, seconds )
for k,v in pairs( player.GetAll() ) do
v:SetGravity( gravity )
end
timer.Simple( seconds, function()
for k,v in pairs( player.GetAll() ) do
v:SetGravity( 1 )
end
end )
ulx.fancyLogAdmin( calling_ply, "#A set gravity to #i for #i seconds", gravity, seconds )
end
local grav = ulx.command( CATEGORY_NAME, "ulx grav", ulx.grav, "!grav" )
grav:addParam{ type=ULib.cmds.NumArg }
grav:addParam{ type=ULib.cmds.NumArg }
grav:defaultAccess( ULib.ACCESS_ADMIN )
grav:help( "Randomizes gravity for everyone." )

hehe tryed it and yea it don't work yet. :) can't wait the final version of it.
Title: Re: Random gravity?
Post by: Aaron113 on January 05, 2012, 04:57:48 PM
Ehh, I do not know of any way to set prop's gravity other then applying force to it or something in that area.  So if I finish this, it'll most likely just include player's gravity.
Title: Re: Random gravity?
Post by: sweetone on January 05, 2012, 06:00:24 PM
Ehh, I do not know of any way to set prop's gravity other then applying force to it or something in that area.  So if I finish this, it'll most likely just include player's gravity.

:) can't you check how wire field generator - gravity works then? use same idea?

Code: [Select]
function ENT:Toogle_Prop_Gravity( prop , yes_no )

if ( !prop:IsValid() ) then return end

if ( self.ignore[ prop:EntIndex() ] == prop ) then return false; end

if ( !self:is_true(self.workonplayers) && prop:GetClass() == "player" ) then
return false;
end

if prop:GetMoveType() == MOVETYPE_NONE then return false; end
if prop:GetMoveType() == MOVETYPE_NOCLIP then return false; end //do this to prevent -uncliping-

if prop:GetClass() != "player" && !gamemode.Call("PhysgunPickup",self.pl,prop) then return false; end

if prop:GetMoveType() != MOVETYPE_VPHYSICS then
if yes_no == false then

if prop:IsNPC() || prop:IsPlayer() then
prop:SetMoveType(MOVETYPE_FLY);
prop:SetMoveCollide(MOVECOLLIDE_FLY_BOUNCE);
else
prop:SetGravity(0);
end

else

if prop:IsPlayer() then
prop:SetMoveType(MOVETYPE_WALK);
prop:SetMoveCollide(MOVECOLLIDE_DEFAULT);
elseif prop:IsNPC() then
prop:SetMoveType(MOVETYPE_STEP);
prop:SetMoveCollide(MOVECOLLIDE_DEFAULT);
else
prop:SetGravity(1);
end

end
end
Title: Re: Random gravity?
Post by: Aaron113 on January 05, 2012, 07:35:12 PM
Ahh, thanks.  I'll see what I can do with that.
Title: Re: Random gravity?
Post by: sweetone on February 12, 2012, 07:48:13 AM
:> what is the status of this?