CCBlueX Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    how to add float setting on module

    Scripts
    5
    5
    104
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Никитыч Китыч
      Никитыч Китыч last edited by

      how to add float setting on module script api liquid bounce b76

      sxviolence 1 Reply Last reply Reply Quote 0
      • ybyyby_ awa
        ybyyby_ awa last edited by ybyyby_ awa

        I recommend you write this way, it's very concise
        

        var setting = {
        float: function (name, def, min, max) {
        return value.createFloat(name, def, min, max);
        },
        integer: function (name, def, min, max) {
        return value.createInteger(name, def, min, max);
        },
        boolean: function (name, def) {
        return value.createBoolean(name, def);
        },
        list: function (name, values, def) {
        return value.createList(name, values, def);
        }
        };
        var settings = {
        zitterSpeed: setting.float("ZitterSpeed", 0.13, 0.1, 0.3),
        };

        this.addValues = function (values) {
        	for (var i in settings) {
        	    values.add(settings[i]);
        		}
        	}
        
        CzechHek 1 Reply Last reply Reply Quote 0
        • sxviolence
          sxviolence @Никитыч Китыч last edited by

          @Никитыч-Китыч хуй пизда хуй пизда хуй пизда хуй пизда

          1 Reply Last reply Reply Quote 0
          • CzechHek
            CzechHek @ybyyby_ awa last edited by

            @ybyyby_-awa Why do you create an object, that calls legacy api v1 value object that translates it to api v2 values, that gets evaluated into LB values.

            Not to mention that it isn't any more concise since it has the same parameter types.

            1 Reply Last reply Reply Quote 0
            • dadiabeachhouse
              dadiabeachhouse last edited by

              @CzechHek said in how to add float setting on module:

              Why do you create an object, that calls legacy api v1 value object that translates it to api v2 values,

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              About
              • Terms of Service
              • Privacy Policy
              • Status
              • Contact Us
              Downloads
              • Releases
              • Source code
              • License
              Docs
              • Tutorials
              • CustomHUD
              • AutoSettings
              • ScriptAPI
              Community
              • Forum
              • Guilded
              • YouTube
              • Twitter
              • D.Tube