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 05-15-2012, 10:54 PM
Fysez Fysez is offline
Banned
Join Date: Apr 2012
Posts: 89
Fysez has a little shameless behaviour in the past
PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
  if (
this.on == false) {
    
this.on == true;
    
setani("Gani"null);
    
replaceani("idle""Gani");

  } else if (
this.on == true) {
    
this.on == false;
    
setani("idle"null);
    
replaceani("idle""idle");

  }

Cujo's method did not work at all, But rather made it so I could not equip it at all. CBK, your's did the same. So I tried this and it seemed to work for Equipping, But then again, Not un-equipping. Not only am I back to where i started, But you all just confused me x.x lol
Reply With Quote
  #2  
Old 05-15-2012, 11:02 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
Quote:
Originally Posted by Fysez View Post
PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
  if (
this.on == false) {
    
this.on == true;
    
setani("Gani"null);
    
replaceani("idle""Gani");

  } else if (
this.on == true) {
    
this.on == false;
    
setani("idle"null);
    
replaceani("idle""idle");

  }

Cujo's method did not work at all, But rather made it so I could not equip it at all. CBK, your's did the same. So I tried this and it seemed to work for Equipping, But then again, Not un-equipping. Not only am I back to where i started, But you all just confused me x.x lol
Use the == only in the if statement. While setting the value just use = . So this should work

PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
  if (
this.wearing == false) {
    
this.wearing true;
    
replaceani("idle""gani");
    
replaceani("walk""gani2");
  }
  else if (
this.wearing == true) {
    
this.wearing false;
    
replaceani("gani""idle");
    
replaceani("gani2""walk");
  }

__________________
MEEP!
Reply With Quote
  #3  
Old 05-15-2012, 11:22 PM
Fysez Fysez is offline
Banned
Join Date: Apr 2012
Posts: 89
Fysez has a little shameless behaviour in the past
Quote:
Originally Posted by callimuc View Post
Use the == only in the if statement. While setting the value just use = . So this should work

PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
  if (
this.wearing == false) {
    
this.wearing true;
    
replaceani("idle""gani");
    
replaceani("walk""gani2");
  }
  else if (
this.wearing == true) {
    
this.wearing false;
    
replaceani("gani""idle");
    
replaceani("gani2""walk");
  }

Doesn't work either.
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 01:37 AM.


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