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-16-2012, 01:30 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I fail to see how you're having an issue with a toggle but I can tell if you plan to make multiple weapons that use this same kind of system, you'll be incurring a bad time.

Toggles are very basic and typically done like this:

PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
  if (
this.on) {
    
player.chat "I am no longer on.";
    
this.on false;
  } else {
    
player.chat "I am on.";
    
this.on true;
  }

If you completed my 'Staff Boots Challenge' on my tutorial you would have created a working toggle script.
__________________
Quote:
Reply With Quote
  #2  
Old 05-17-2012, 11:43 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 fowlplay4 View Post
I fail to see how you're having an issue with a toggle but I can tell if you plan to make multiple weapons that use this same kind of system, you'll be incurring a bad time.

Toggles are very basic and typically done like this:

PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
  if (
this.on) {
    
player.chat "I am no longer on.";
    
this.on false;
  } else {
    
player.chat "I am on.";
    
this.on true;
  }

If you completed my 'Staff Boots Challenge' on my tutorial you would have created a working toggle script.
I used that to test it, But it wasn't working on my script.

So I made a seperate Test one with only that code, as a test.
Every time I pressed D, it said "I am no longer on.", It doesn't work either.
It would not turn on.
Reply With Quote
  #3  
Old 05-17-2012, 11:48 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by Fysez View Post
I used that to test it, But it wasn't working on my script.

So I made a seperate Test one with only that code, as a test.
Every time I pressed D, it said "I am no longer on.", It doesn't work either.
It would not turn on.
If you have a custom script to trigger WeaponFired (triggering multiple times instead of once) then it's broken.
__________________
Quote:

Last edited by fowlplay4; 05-17-2012 at 11:59 PM..
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.