Thread: Drag help
View Single Post
  #1  
Old 03-27-2011, 01:16 PM
McChucken McChucken is offline
Sound Artist
McChucken's Avatar
Join Date: Mar 2011
Posts: 42
McChucken has a little shameless behaviour in the past
Exclamation Drag help

I need help with putting a gani into this drag script made by tig. Thanks tig. All credit to him.

WEAPON/MouseC
PHP Code:
//Scripted by Tig
function onStartDrag(control) {
triggerclient("gui"name"startDrag"control.account);
}
//#CLIENTSIDE
function onCreated() {
}

function 
onActionClientside(commandacct) {
switch (
command) {
case 
"startDrag":
onTimeout();
break;
}
}

function 
onTimeout() {
temp.speed 0.5;
temp.findplayer(client.controller)/ 
then the drag script.
PHP Code:
// NPC made by Tig
function onActionServerside(commandacct) {
switch (
command) {
case 
"StartDrag":
with (findplayer(acct)) {
player.addWeapon("MouseC");
client.controller playero.account;
findWeapon("MouseC").trigger("StartDrag"playero);
}
player.attr[20] = acct;
break;
}
}

//#CLIENTSIDE
function onCreated() {
this.catchEvent(GraalControl"onMouseDragged""onMouseDragged");
}

function 
onMouseDown() {
for (
temp.pplayers) {
if (
mousex in |temp.p.1temp.p.3| && mousey in |temp.p.ytemp.p.2|) {
this.trigger("StartDrag"temp.p);
break;
}
}
}

function 
onStartDrag(pl) {
triggerserver("gui"name"startDrag"pl.account);
}

function 
onMouseUp() {
player.attr[28] = player.attr[20] = "";
}

function 
onMouseDragged(objmodmxmy) {
player.attr[28] = "\"" mousex SPC mousey "\"";

i want to put a GANI in there so when i start dragging, it plays the gani on the layer being dragged and stops it when he is dropped. All i know is i think it goes in the start drag script but i dont know where. Please help and thanks in advance.

-McChucken
__________________
Also know as Emera
Reply With Quote