Author Topic: scrollTools(1); not working on weapons  (Read 2390 times)

I was making a example script messing around with scrollTools.

Code: [Select]
function exampleforforums()
{
  scrollTools(1);
}

but it wouldn't work on weapons.

Is this something badspot did on purpouse? I think it is possible, I saw someone doing this with the sniper rifle.

I will not use this to abuse anything. I swear on my bl_id. Just to expand my knowledge on scripting

I'm not clear on your problem here. It should only work on your tools inventory. This is the function that changes your current tool as you scroll through them.
What are you trying to use this for?

To make it scroll weapons, not just tools

To make it scroll weapons, not just tools
Weapons/items only go into your tool slots.
Hence 'tools'.

Weapons/items only go into your tool slots.
Hence 'tools'.

Try it, it won't work on example: gun



ROFL. He swears on his BL_ID. We believe you, kid. You can't abuse a tool scrolling function.

As for the problem at hand, scrollTools(y) works with weapons, I don't see why it wouldn't. But if you were trying to write a script where you scroll really fast so that your weapon fires at an increased rate (naughty naughty!) then I could see why you may run into a problem.

If you're scrolling multiple tools at once, you're going to want to space out the calls to scrollTools. Something like..
Code: [Select]
scrollTools(1); scrollTools(-1);wouldn't work, where as
Code: [Select]
scrollTools(1); schedule(30,0,scrollTools,-1);would work. I don't really know why, but I discovered that when I rigged together a rapidfire script once.

ROFL. He swears on his BL_ID. We believe you, kid. You can't abuse a tool scrolling function.

As for the problem at hand, scrollTools(y) works with weapons, I don't see why it wouldn't. But if you were trying to write a script where you scroll really fast so that your weapon fires at an increased rate (naughty naughty!) then I could see why you may run into a problem.

If you're scrolling multiple tools at once, you're going to want to space out the calls to scrollTools. Something like..
Code: [Select]
scrollTools(1); scrollTools(-1);wouldn't work, where as
Code: [Select]
scrollTools(1); schedule(30,0,scrollTools,-1);would work. I don't really know why, but I discovered that when I rigged together a rapidfire script once.
If the person actually made the weapon wisely(Sniper Rifle), then the weapon doesn't allow you to do this.

If the person actually made the weapon wisely(Sniper Rifle), then the weapon doesn't allow you to do this.

It just blows the smoke but no projectile is fired.

If the person actually made the weapon wisely(Sniper Rifle), then the weapon doesn't allow you to do this.
Actually, QQing does reduce the cooldown on the sniper rifle by about 50%. But you're right, it's more than easy to prevent rapidfire from working. Though, I've never seen anyone use it with anything other than the printer, wrench, or hammer.