Home   Help Search Login Register  

Author Topic: Hot-wire Script (Updated: Dec. 06, 2007) (ACCEPTED)  (Read 7357 times)

0 Members and 1 Guest are viewing this topic.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Hot-wire Script (Updated: Nov. 27, 2007)
« Reply #15 on: 04 Dec 2007, 14:57:14 »
My code was just an example to start with.

Offline Rumsfield

  • Members
  • *
  • I'm a llama!
Re: Hot-wire Script (Updated: Nov. 27, 2007)
« Reply #16 on: 04 Dec 2007, 22:08:06 »
Thanks for suggestions mandoble and spooner, as soon as I get some free time I will edit it and post the new version.   :)

Offline Rumsfield

  • Members
  • *
  • I'm a llama!
Re: Hot-wire Script (Updated: Dec. 06, 2007)
« Reply #17 on: 06 Dec 2007, 06:29:23 »
New Version.
Download link updated.

Note: @Spooner and Mandoble, I was unable to get the "waitUntil" command working properly, so I got around it by using loops, no big deal. Perhaps I had an error in my scripting, I am still an amateur at scripting, unlike every else here. 

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Hot-wire Script (Updated: Dec. 06, 2007)
« Reply #18 on: 06 Dec 2007, 11:33:41 »
To use sleep or waitUntil inside an event handler, you need to spawn the block containing those commands:

Code: [Select]
_vehicle addEventHandler ["GETIN",
    {
         _this spawn
         {
              _vehicle = _this select 0;
              _position = _this select 1;
              _soldier = _this select 2;

              // Do stuff here, like sleep and waitUntil
         };
    }
];
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)