Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:56 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.