Jump to content

View New Content
Forums
Photo
- - - - -

My first Lua STool


  • Please log in to reply
19 replies to this topic

#1 Pandaboy

Pandaboy

  • 940 posts

    Maps - Models - Textures

Posted 20 May 2014 - 19:04

I'm learning Lua atm. I didn't like that Garry removed the keep upright tool in gmod13, so I tried making my own with some additional features :>

 

Keep Upright Advanced:


  • Hardcore Bob, Tabole, Catkillerfive and 2 others like this

#2 Hardcore Bob

Hardcore Bob

  • 19,546 posts

    I am the one who knocks.

Posted 20 May 2014 - 19:58

I've never had any issues with the glitching; enough sandbox experience and you'll handle a keep uprighted prop just fine.

However, this tool looks neat as fuck and I think we should implement it on Floodmod.
I'll install and try it with some props welded to it.
  • Catkillerfive and user like this

Twitter.png _____ steam-icon-32.png _____ lgfDCxv.png

         Game Reviews | Gathers | Send me a PM [/size]


"If you cry because someone on the internet calls you a retard, you are a retard and should not be on the internet." - Psycix


#3 xTorturer

xTorturer

  • 792 posts

    Runner till Death

  • LocationSomewhere in Dutchlandia

Posted 20 May 2014 - 20:24

this looks really good!

well done


2ZDJOHA.gif I LOV POKAYMUNS 2ZDJOHA.gif2ZDJOHA.gif2ZDJOHA.gif


#4 Pandaboy

Pandaboy

  • 940 posts

    Maps - Models - Textures

Posted 20 May 2014 - 20:40

Thanks :)

 

The issue with the default gmod13 keep upright is that there's no way to adjust the strength since it's just a checkbox. It's always at 9999 angular limit, therefore the jumpy behaviour when rotating it. The only way to make it weaker is to keep upright a lightweight prop, welded to a massive prop. It works to prevent the glitchyness, but is a lot more tedious.

 

It would be awesome to see this on flood :>. It might not work well with certain props though (like the soda machine models), because in flood you lay those models down and don't actually have their top-side facing up.

.. But then again, that's just how the keep upright constraint work, so it's the same with any other keep upright.


  • user likes this

#5 elite

elite

  • 1,426 posts

    Forum Regular

  • LocationEngland

Posted 20 May 2014 - 20:50

Nice job! I have the same issue in sandbox. Looks better and easier to use as well.



#6 FRAG

FRAG

  • 6,274 posts

    Not your normal S'H'A'R'K

Posted 20 May 2014 - 21:05

Wow real nice work, I'd love to add it to flood, you okay with us using it?

[FRAGleveldesign.com] "The home of FRAG"

76561197980033738.png

 


#7 Pandaboy

Pandaboy

  • 940 posts

    Maps - Models - Textures

Posted 21 May 2014 - 12:02

Of course, I'd just be happy to see servers use it :>

 

 

(you should also look into physgun build mode, it could be nice for flood)



#8 Psycix

Psycix

  • 11,431 posts

    Owner

Posted 21 May 2014 - 14:08

Looks good.

Small tip for improvement: As soon as you apply the settings the prop does not rotate to these settings. My hunch is that this is because the physics are asleep.

Perhaps try to wake the prop and/or give it a nudge upon applying settings so you don't have to touch the prop with the physgun.


LDT is LDT.


#9 Pandaboy

Pandaboy

  • 940 posts

    Maps - Models - Textures

Posted 21 May 2014 - 16:24

yep it's because physics is asleep. as soon as the prop is in any sort of motion or touched in any way, the keep upright will activate. If the prop is already moving, the keep upright will instantly activate.

I actually thought about it, but in the end I decided to leave it as it is because there are so many simple ways to wake the physics if you want to, but there may be times when auto-waking it could be unwanted behvaiour. So I figured I'd keep the behaviour the same as the original tool



#10 JJHK

JJHK

  • 1,803 posts

    Forum Regular

Posted 21 May 2014 - 17:26

Just woke up from a nap and saw "STool" in your title, thought it was Stool returning. ;(

 

Your work looks nice. :)


  • Revengekeuh likes this
23:10 - Lynx: Oh we'll
23:11 - JJHK: we'll
23:12 - Lynx: iPhone erection thing
 

#11 Psycix

Psycix

  • 11,431 posts

    Owner

Posted 21 May 2014 - 19:31

STool stands for Scripted-Tool.

All the gmod-tools are STools.


  • JJHK likes this

LDT is LDT.


#12 Hardcore Bob

Hardcore Bob

  • 19,546 posts

    I am the one who knocks.

Posted 21 May 2014 - 23:48

Actually, I have some remarks which I will work into a video as soon as I have stable internet.
  • Pandaboy likes this

Twitter.png _____ steam-icon-32.png _____ lgfDCxv.png

         Game Reviews | Gathers | Send me a PM [/size]


"If you cry because someone on the internet calls you a retard, you are a retard and should not be on the internet." - Psycix


#13 Pandaboy

Pandaboy

  • 940 posts

    Maps - Models - Textures

Posted 22 May 2014 - 13:03

there are a few things I have in mind too, but the biggest thing that annoys me is the way the keep upright constraint works.

It's constraining the prop's local Pitch and Roll angles, while keeping it's local Yaw movement free.

So for example, setting "pitch" to 90 makes the prop point towards that direction rather than changing which side will be kept upwards. But that's just how the constraint works.



#14 RickJames

RickJames

  • 41 posts

    New User

  • LocationThe Hague, The Netherlands.

Posted 22 May 2014 - 15:45

It's not really hard, but it's a start. I think that you've looked good into this and you've set a solid new function, good work.



#15 Iksman

Iksman

  • 541 posts

    an absolute madman

  • LocationBarendrecht

Posted 22 May 2014 - 17:38

I think this is quite useful and could be used by many people who make Gmod machinimas!

 

 

It's not really hard,

If it's not so hard, then why have you not coded it then? I think that actually creating a concept that is useful and hasn't been made is difficult in itself.


"How can mirrors be real if our eyes aren't real" - Jaden Smith

"What to heck ????" - Billy Ray Cyrus

"This all wouldnt be happend." - eddyke1

"Then is the pizza becomes cold" - Gio

[Steam] [Youtube] [Twitch]


#16 Hardcore Bob

Hardcore Bob

  • 19,546 posts

    I am the one who knocks.

Posted 22 May 2014 - 19:11

 

KUA = Keep Upright Advanced
AL = Angular Limit

As you can see Keep Upright seems fit for Flood the most.


  • Pandaboy likes this

Twitter.png _____ steam-icon-32.png _____ lgfDCxv.png

         Game Reviews | Gathers | Send me a PM [/size]


"If you cry because someone on the internet calls you a retard, you are a retard and should not be on the internet." - Psycix


#17 Bo98

Bo98

  • 274 posts

    aka BoA98

Posted 23 May 2014 - 08:08

Sandbox's keep upright has an angular limit of 999999.

#18 Pandaboy

Pandaboy

  • 940 posts

    Maps - Models - Textures

Posted 23 May 2014 - 09:49

Sandbox's keep upright has an angular limit of 999999.

oh! I've been going around saying it's 9999, but looking at the source code now i see it :P

 

Basically, KUA is the same as the sandbox KU.

The difference is that with KUA you can adjust the phys_keepupright as much as you would be able to adjust it in Hammer Editor.

hmm. As a matter of fact, in hammer editor you can turn it on and off with inputs. Wonder if I can make it usable with wiremod :).

(but for now i have some other things to do)

 

 

Also, rickJames is kind of right. For someone who already knows Lua and how to create STools, this tool would be fairly easy to make. ... Which makes it wierd nobody has already made it x).



#19 Hardcore Bob

Hardcore Bob

  • 19,546 posts

    I am the one who knocks.

Posted 23 May 2014 - 11:28

We could turn Keep Upright into a purchasable tool with different upgrades of it.


Twitter.png _____ steam-icon-32.png _____ lgfDCxv.png

         Game Reviews | Gathers | Send me a PM [/size]


"If you cry because someone on the internet calls you a retard, you are a retard and should not be on the internet." - Psycix


#20 RickJames

RickJames

  • 41 posts

    New User

  • LocationThe Hague, The Netherlands.

Posted 23 May 2014 - 16:18

I think this is quite useful and could be used by many people who make Gmod machinimas!

 

 

If it's not so hard, then why have you not coded it then? I think that actually creating a concept that is useful and hasn't been made is difficult in itself.

Don't get me wrong, but I meant the code is not hard to make. The idea and what not is nonetheless. I still think you've come up with something great, don't get me wrong once again.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users