Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Drag help (https://forums.graalonline.com/forums/showthread.php?t=134262573)

McChucken 03-27-2011 01:16 PM

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

BioWare 03-27-2011 02:57 PM

Quote:

Originally Posted by McChucken (Post 1639319)
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

Uhmm Like the gani when you get dragged on era iphone?

JesusFreak250 03-27-2011 03:01 PM

Quote:

Originally Posted by BioWare (Post 1639330)
Uhmm Like the gani when you get dragged on era iphone?

I've not seen that gani but probably

McChucken 03-27-2011 04:38 PM

Yeah but not that gani. I just want it to activate when i start drag and stop when i release


All times are GMT +2. The time now is 12:47 PM.

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