Clickdrag

Lets you click and drag other players.

Systems NPC
Make this a hidden weapon (Give it a prefix “-”)
Add it to defaultaccount.txt and make sure every account has it.

if (actionprojectile || actionprojectile2) {
  if (strequals(#p(2),clickDrag) && strequals(#p(3),#a)) {
    freezeplayer 0.3;
    setani idle,;
    playerx = strtofloat(#p(4));
    playery = strtofloat(#p(5));
  }
}

Dragger

if (weaponfired) {
  if (!this.on) {
    set this.on;
    setplayerprop #c,On;
  } else {
    unset this.on;
    setplayerprop #c,Off;
  }
  this.target = -1;
  timeout = 0.05;
}

if (timeout) {
  if (!this.on) return;
  timeout = 0.05;
  getTarget();
  moveTarget();
}

function getTarget() {
  if (leftmousebutton) {
    if (!this.lmb) {
      set this.lmb;
      for (i=0;i<playerscount;i++) {
        if (abs(players[i].x+1.5-mousex) < 1 && abs(players[i].y+1.5-mousey) < 1.5) {
          this.target = i;
          this.dx = players[i].x;
          this.dy = players[i].y;
          this.omousex = mousex;
          this.omousey = mousey;
          break;
        }
      }
    }
  } else {
    this.target = -1;
    unset this.lmb;
  }
}

function moveTarget() {
  if (this.target < 0) return;
  this.dx += mousex-this.omousex;
  this.dy += mousey-this.omousey;
  setshootparams clickDrag,#a(this.target),#v(this.dx),#v(this.dy);
  shoot -10,-10,0.05,0.05,0.05,0.05,,,,,;
  this.omousex = mousex;
  this.omousey = mousey;
}

And because I always put videos…


(Note: May still be processing)

shoot eh, interesting :stuck_out_tongue: Why not use triggeraction?

It has to actually hit the player. This one I can just send to a fixed X/Y coord off the map and it’ll work, albeit with a .05 more delay. I told Beholder about this technique and he used it on Scale2x for throwing bushes, arrows, and bombs.

oh I see, looking at your code that’s a pretty clever way to triggeraction the entire level.

Yep, it’s more reliable than a regular triggeraction too.

It also passes to adjacent levels on a GMap (unsure about bigmap) so it’s very useful.

ZOMG Shangri-La tileset!

The immediately adjacent ones or does it travel further than that?

Immediately adjacent ;0

If you’re clever with showani, system NPCs, and shoot, it’s easy to make baddies or other NPCs that move across a GMap that are synced cross client.

Make an example please.

im sorry if i sound like a noob or somethin but when i put the code in on a npc and play the level i dont c the dragger in my pocket can you plz tell me what to do asap plz thank you

You shouldnt be necroposting but since you asked you need to include this in the bottom code:

if (playerenters){
  toweapons dragger;
}

and this in the top code:

if (playerenters){
  toweapons -drag;
}

You really shouldve made a new thread though just to be safe o.0

If you followed my instructions…

You would’ve had no issues.

Yea man but that’s harder and more of a burden cuz they don’t know WHERE to add it, shouldve just made the system a hidden npc like what tricx told crazy

x.x Blaze, a hidden npc is very easy to do…like, litterelly first day level stuff. Adding it to the default account, though, should be even easier and more efficient…No NPCs lagging anything up…

If a person doesn’t know what defaultaccount.txt is, they should be running a server, let alone needing click drag x.x

I got a dump of everything from the last owner. I should really make something using their assets… I loved their art style.

Poor Shawn :frowning:

doesnt work

it obviously does, too many fucking idiots copypasta the code and use it on their server.

I made my own abuse toy similar to dragging but alot more powerful thanks to downsiders marvelous exec triggerhacks :smiley:

i own a sever and tried to change values to makr it work but it didnt

gee I wonder why it isn’t working

if it’s not broken don’t fucking fix it