Jump to content
Sign in to follow this  
MitchellFarted

Perfected move while Interacting!

Recommended Posts

MitchellFarted

If you've been in the forum long enough, you might remember me having trouble to get one of Gir's codes working. Specifically Moving while interacting. Turns out that script merely increased the Interact distance to unlimited only while interacting. When combined with PP's Interact and Shoot script, you can freely move any distance away from the object WITHOUT having to increase your interact range!

I'm caught up in my current project related to PP which has this, so I'm going to hold off releasing the code here until i release my project side by side (likely today, if not, very soon). That, and it'd be pretty neat to have a proper feature or two to stand out. I'm making the thread now because I couldn't hold back my excitement, but get hyped!

Alright, I think I've taken LONG ENOUGH releasing this, my bad. Just put Gir's script bellow into your _Autooncheatsingame.lua, and whenever you turn on Shoot while interacting, It'll go hand in hand.

   --Can go an infinite distance after interacting.

   _ObjectInteractUpdate = _ObjectInteractUpdate or ObjectInteractionManager.update

   function ObjectInteractionManager:update( t, dt ) 

		if self._active_object_locked_data then

			if alive( self._active_object ) and self._active_object:interaction():active() then

				return

			end

		end

   _ObjectInteractUpdate(self, t, dt)

   end 

Share this post


Link to post
Share on other sites
Guest

nice to know, I'll wait for your release :thumbsup:

Share this post


Link to post
Share on other sites
Baddog-11

If you've been in the forum long enough, you might remember me having trouble to get one of Gir's codes working. Specifically Moving while interacting. Turns out that script merely increased the Interact distance to unlimited only while interacting. When combined with PP's Interact and Shoot script, you can freely move any distance away from the object WITHOUT having to increase your interact range!

I'm caught up in my current project related to PP which has this, so I'm going to hold off releasing the code here until i release my project side by side (likely today, if not, very soon). That, and it'd be pretty neat to have a proper feature or two to stand out. I'm making the thread now because I couldn't hold back my excitement, but get hyped!

Hmm weird the Interact while moving script i know from PPv15 works exactly how you explained yours is going to work.

Share this post


Link to post
Share on other sites
MitchellFarted

Hmm weird the Interact while moving script i know from PPv15 works exactly how you explained yours is going to work.

I'm not going to lie, I completely missed over PPv15, but in v16 when you turn on Interact and Shoot you're limited by the normal interact distance. Unless of course you increase you're reatch distance in total, which I don't like doing. This increases the reach distance to unlimited only while you're interacting, and goes back afterwards.

Share this post


Link to post
Share on other sites
Baddog-11

I'm not going to lie, I completely missed over PPv15, but in v16 when you turn on Interact and Shoot you're limited by the normal interact distance. Unless of course you increase you're reatch distance in total, which I don't like doing. This increases the reach distance to unlimited only while you're interacting, and goes back afterwards.

And this is exactly the same as PPv15's "interact while moving" script you go to a door or something press your use key to start the interaction and then while holding the use key down you can walk an unlimited distance without aborting the interaction, so its sounds like what you did is nothing new sorry :P

Share this post


Link to post
Share on other sites
MitchellFarted

And this is exactly the same as PPv15's "interact while moving" script you go to a door or something press your use key to start the interaction and then while holding the use key down you can walk an unlimited distance without aborting the interaction, so its sounds like what you did is nothing new sorry :P

Could you please confirm this is still the case in v16 as well? When I used it, walking away cancelled it, but maybe I did something wrong.

Share this post


Link to post
Share on other sites
Baddog-11

Okay wow now this is something really sad,

it is not working by default in v16 and i think it wasn't working by default in v15 too.

The script itself is there it's called nomoveblock.lua it is in the assets folder but it looks like the script doesn't get called from any other file.

So it looks like the "interact while moving" script was the whole time only working for myself because i fixed it in my version xD

runnning this script as PostRequireScripts fixed it for me in v15 and v16

--Can go an infinite distance after interacting.

_ObjectInteractUpdate = _ObjectInteractUpdate or ObjectInteractionManager.update

function ObjectInteractionManager:update( t, dt ) 

    if self._active_object_locked_data then

        if alive( self._active_object ) and self._active_object:interaction():active() then

            return

        end

    end

    _ObjectInteractUpdate(self, t, dt)

end

dofiles("trainer/assets/nomoveblock.lua")

- ['lib/managers/ObjectInteractionManager', trainer/assets/interactwhilemoving.lua]

Share this post


Link to post
Share on other sites
MitchellFarted

Okay wow now this is something really sad,

it is not working by default in v16 and i think it wasn't working by default in v15 too.

The script itself is there and it is a combination of the files dexactany.lua and nomoveblock.lua both files are in the assets folder but it looks like the most important file the nomoveblock.lua doesn't get called from any other file.

So it looks like the "interact while moving" script was the whole time only working for myself because i fixed it in my version xD

Well that's a bit silly eh?

Might as well spoil it for now, I put Gir's script into Autooningame, so that anytime I try to move while interacting with Interact n shoot, it'll let me.

So this either gets a Hotfix, or I get to hold a cool feature over PP for my project

Share this post


Link to post
Share on other sites
Baddog-11

Well it really is the same code as i had posted before say how do you run this script PersistScript , PostRequireScript or just simple keybind ?

Share this post


Link to post
Share on other sites
MitchellFarted

Well it really is the same code as i had posted before say how do you run this script PersistScript , PostRequireScript or just simple keybind ?

I must has missed it, but I do remember saying you had it unblocked in your version.

Either way, I just put it into Autooncheatsingame.lua and it works.

Share this post


Link to post
Share on other sites
Baddog-11

I must has missed it, but I do remember saying you had it unblocked in your version.

Either way, I just put it into Autooncheatsingame.lua and it works.

Hmm weird if it works for you the simple way,then why did Gir489 on uc.me say that it needs to be run as PostRequireScript i mean he was the one that posted the script first.

Does really everything work fine for you ?

Ahh well who cares as long as everything works fine for everyone.

Share this post


Link to post
Share on other sites
MitchellFarted

Hmm weird if it works for you the simple way,then why did Gir489 on uc.me say that it needs to be run as PostRequireScript i mean he was the one that posted the script first.

Does really everything work fine for you ?

Ahh well who cares as long as everything works fine for everyone.

I'm pretty sure you could hook it up as a PostRequire, but I don't like to touch those, as I don't fully understand them. If it ain't broke, I won't go poking it with a stick.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Stop being a peeping tom and join the community.... we got cookies

Join the crew now

Sign in

Already part of the crew? Board right here

Sign In Now
Sign in to follow this  

×