Announcement

Collapse
No announcement yet.

Custom module - configuration via init

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom module - configuration via init

    Hello scripters!! I've built a custom module to aid with flight training. It's working perfectly by dropping the module in the editor and synchronising with the heli. Now I want to allow configuration from the init field of the module - basically let the user set two variables with numbers.

    Any ideas what should be put in the init field and how to retrieve this (if set) in the module? I've tried looking at the official modules and its possible they're using setVariable but I'm not sure.

    Thanks!
    sigpic

  • #2
    Re: Custom module - configuration via init

    I've sorted this out... in the module init field

    Code:
    this setVariable ["min_delay", value];

    In the module SQF

    Code:
    _min_delay = 30;
    _check_min = _this getVariable "min_delay";
    if (!isNil ("_check_min")) then {_min_delay = _check_min; };
    If anybody is interested the module is an emergency training module for heli pilots. At random intervals equipment failures are spawned and if you can get the bird down safely you can repair it and continue on your way. I'm currently trying to get it working with SecOps Managers so that you can have dynamic CAS missions.
    sigpic

    Comment


    • #3
      Custom module - configuration via init

      Beautiful!

      TGU Instructor TG Pathfinder

      Former TGU Dean Former ARMA Admin Former Irregulars Officer

      "Do not seek death. Death will find you. But seek the road which makes death a fulfillment." - Dag Hammarskjold

      Comment

      Connect

      Collapse

      TeamSpeak 3 Server

      Collapse

      Advertisement

      Collapse

      Twitter Feed

      Collapse

      Working...
      X