Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #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
  #2  
Old 03-27-2011, 02:57 PM
BioWare BioWare is offline
Registered User
Join Date: Mar 2011
Location: Netherlands
Posts: 36
BioWare is on a distinguished road
Quote:
Originally Posted by McChucken View Post
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?
Reply With Quote
  #3  
Old 03-27-2011, 03:01 PM
JesusFreak250 JesusFreak250 is offline
Vendetta
Join Date: Nov 2010
Location: United Kingdom
Posts: 262
JesusFreak250 will become famous soon enough
Quote:
Originally Posted by BioWare View Post
Uhmm Like the gani when you get dragged on era iphone?
I've not seen that gani but probably
Reply With Quote
  #4  
Old 03-27-2011, 04:38 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
Yeah but not that gani. I just want it to activate when i start drag and stop when i release
__________________
Also know as Emera
Reply With Quote
Reply


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 02:53 PM.


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