![]() |
Triggering Variables in other Weapons
I am making a custom attack system and I swear I tested this before and it worked.
On my Movement 'weapon' I set a variable --- canmove = 1; Pretty much this checks to see if the player is allowed to move On my Attack 'weapon' the "canmove" is set to 0. Works THEN I have a ScheduleEvent function that sets the 'canmove' to 1 again...but it doesn't set. PHP Code:
PHP Code:
|
Tip: Don't use variables in multiple scripts. Use public functions instead:
Weapon: -Movement PHP Code:
PHP Code:
|
EDIT: Jer's response is right—I didn't pay attention to the variables—but if you want to support v5, keep the below in mind too.
Are you using v6? The only thing I see is that the scheduleEvent needs another parameter to support v5 and below. Functions like trigger, scheduleEvent, etc. all require an extra parameter for passing data, even if you don't want to use it. So just add another parameter (null will work fine) to the scheduleevent: PHP Code:
|
Quote:
|
Thanks Jer, I've been wondering how to use public functions. When I can give rep again, I'll make sure to hit you.
|
| All times are GMT +2. The time now is 06:55 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.