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 10-10-2011, 09:22 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Some question

So I´m working on with my movement (still improving dusty´s bare bone movement) and I got up to this:

I tried making a DisableMove(); command, which will be like DisableDefMovement(); (that worked so far) and now I wanted to make it set a gani like DisableMove("walk");. Here´s the scripts parts:


PHP Code:
function onActionServerside() {
  if (
params[0] == "DisableMove"clientr.move false;
}

//#CLIENTSIDE
public function DisableMove(ani) {
  
triggerserver("gui"name"DisableMove");
  if (
ani != NULLsetani(aniNULL);

PHP Code:
//#CLIENTSIDE
function onPlayerChats() {
  if (
player.chat == "/test"DisableMove("walk");

PHP Code:
//#CLIENTSIDE
function onTimeOut() {
  
//movement stuff similar to dustys bare bone one. Suggesting to take a look there (link below)
  
if (clientr.move == truesetani(client.modeNULL); // set the characters animation

(link >here<)


I always have to say twice /test to make the gani set. Why won´t it work at the first time? How can I fix it?
__________________
MEEP!
Reply With Quote
  #2  
Old 10-17-2011, 04:51 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Did you initialize your TimeOut? And do you also reset "setTimer()" at the end?
Reply With Quote
  #3  
Old 10-18-2011, 12:28 AM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by scriptless View Post
Did you initialize your TimeOut? And do you also reset "setTimer()" at the end?
Why should I disable it? Cause it also checks in the timeout if the player can move.
__________________
MEEP!
Reply With Quote
  #4  
Old 10-18-2011, 07:52 AM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
the issue here is your timeout occuring before the clientr value being set properly, so if (clientr.move == true) setani(client.mode, NULL); is executing before the clientr value is changed.

you should send the ani to the serverside portion of your code as well, and change the ani there.
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 11:30 AM.


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