Arcade Prehacks

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Jul 2012
    Posts
    3

    Are variables able to lock value easy?

    So guys I have a question: is there a way to lock a value?

    I always use ".setvariable" and i know I can kinda infinite it by just putting the value upwards the 99999.
    I wanted to know if it is possible to lock a value in a way. I tried a lot but i couldn't find the thing i need...
    do you guys have any idea? if it's even possible.

    Thanks in advance!

  2. #2
    Member
    Join Date
    Jan 2013
    Posts
    74
    You can set a value via a timer so it appears to be locked or you can change the code and remove whatever changes the value

  3. #3
    Junior Member
    Join Date
    Jul 2012
    Posts
    3

    Thumbs Up

    Quote Originally Posted by flashgamehacker View Post
    You can set a value via a timer so it appears to be locked or you can change the code and remove whatever changes the value
    Thanks for the help ill try some!

    Much appreciated!!!

  4. #4
    Senior Member W4N73D1's Avatar
    Join Date
    Jun 2013
    Location
    null
    Posts
    177
    Just to leave a more in depth answer

    usually the code might look something like this

    public function DecAmmo() {
    this.ammo = this.ammo - 1;

    } You can remove the subtraction of '1' to make it never decrease

    Or it can also look something like this

    public function DecAmmo() {
    if(event.Keycode == 12)
    {
    Bullet = new Bullet();
    add(bullet);
    ammo--
    }

    } You can remove the 'ammo--' Code to get the same effect..


    Or you can add an if Condition which ill post an actual code from a game


    private function enMathBoss(minions:uint) : void
    {
    var newEnemy:Enemy = null;
    var ets:uint = minions;
    this._minions++;
    if(this._minions > 15)
    {
    this._minions = 15;
    }

    So this code looks sort of confusing but as you can see
    its adding more minions using the this._minions++ to add them and
    an IF condition below is saying if theres more than 15 minions then make the minions amount to 15

    so if you want to apply this to ammo you would do something like

    this.ammo = 999;
    if(this.ammo != 999)
    {
    this.ammo = 999;
    }

    When i used '!=' thats telling it if the variable is NOT equal to 999 then do something
    which that something is set it right back to 999 for infinite ammo..

    I Just seen something about setVariable.. So im guessing you might be using visual studio?
    I Believe the if condition still applies..
    Last edited by W4N73D1; 09-29-2016 at 12:54 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •