Welcome to Tactical Gamer

+ Reply to Thread
Page 12 of 16 FirstFirst ... 2345678910111213141516 LastLast
Results 166 to 180 of 237
Discussion: ArmA - Development / ArmA - Mission Development - The Scripting How-To Thread - Good job! You should check that it's only added to aircraft though. It would be
  1. #166

    Fincuan's Avatar

    Join Date
    Jan 2009
    Location
    Helsinki, Finland
    Posts
    772

    Re: The Scripting How-To Thread

    Good job!

    You should check that it's only added to aircraft though. It would be pretty funny to HALO out of a tank

  2.  
  3. #167

    Rommel's Avatar

    Join Date
    Sep 2009
    Posts
    119

    Re: The Scripting How-To Thread

    Quote Originally Posted by Fincuan View Post
    Good job!

    You should check that it's only added to aircraft though. It would be pretty funny to HALO out of a tank
    That was my first thought when I saw that. Made me laugh.

  4.  
  5. #168


    Join Date
    Oct 2009
    Posts
    6

    Re: The Scripting How-To Thread

    Quote Originally Posted by MaveryQ View Post
    I use PvPScriptPack_2_05.
    I found vehicles.sqf in which there is a respawnTask.
    I add
    this addEventHandler ["GetOut", {
    if (local (_this select 2)) then
    {
    [player] exec "ca\air2\halo\data\Scripts\HALO_getout.sqs";
    };
    }];
    in it. and it works.

    So thanks for your help.
    Sorry but it's
    [player] exec "ca\air2\halo\data\Scripts\HALO_getout.sqs";
    added in spawnTask that is working !

    The getout event Handler doesn't work very well !!!

  6.  

     
  7. #169

    Fincuan's Avatar

    Join Date
    Jan 2009
    Location
    Helsinki, Finland
    Posts
    772

    Re: The Scripting How-To Thread

    The snippet I posted was meant to be in the init of the vehicle, that's why it says "this...". If you use it as such in the respawn script this points to something completely else. To make it work you must change this to a variable that points to the newly created vehicle.

  8.  
  9. #170

    Mikee's Avatar

    Join Date
    Jun 2009
    Location
    Naugatuck, CT | USA
    Posts
    619

    Re: The Scripting How-To Thread

    Okay, I tried implement Norris revive script in my mission. When I tested on dedicated server, no matter what unit i choose, there is black screen coming at the start of mission with text "Your unit is unconscious, please select different unit". It's weird...

  10.  
  11. #171

    Rommel's Avatar

    Join Date
    Sep 2009
    Posts
    119

    Re: The Scripting How-To Thread

    Quote Originally Posted by Mikee View Post
    Okay, I tried implement Norris revive script in my mission. When I tested on dedicated server, no matter what unit i choose, there is black screen coming at the start of mission with text "Your unit is unconscious, please select different unit". It's weird...
    You haven't named your units appropriately, double check.

  12.  

     
  13. #172

    Mikee's Avatar

    Join Date
    Jun 2009
    Location
    Naugatuck, CT | USA
    Posts
    619

    Re: The Scripting How-To Thread

    Quote Originally Posted by Rommel View Post
    You haven't named your units appropriately, double check.
    I did name my units and everything else, just like the read me said. The problem is that script is default for West side, and in my mission we play as Russians. Do you guys know how can i make it work?

  14.  
  15. #173

    Rommel's Avatar

    Join Date
    Sep 2009
    Posts
    119

    Re: The Scripting How-To Thread

    The script is not defaulted for any side. Unless you have not placed the units in the unit array (with all correct names), and also ensured you did not change the default infantryman type in the config; this could be why it does not work for you.

    Try (if it contains it) replacing:
    Code:
    USMC_Soldier
    with
    Code:
    RU_Soldier
    Might help.

  16.  
  17. #174

    Mikee's Avatar

    Join Date
    Jun 2009
    Location
    Naugatuck, CT | USA
    Posts
    619

    Re: The Scripting How-To Thread

    I did this too Rommel . I really have no idea anymore. I guess, theres going to be 60 sec instant respawn in the mission.

  18.  

     
  19. #175

    Rommel's Avatar

    Join Date
    Sep 2009
    Posts
    119

    Re: The Scripting How-To Thread

    Lies! Haha, are you running in the single player editor by any chance? The MP Lives array may not be defaulted and therefore needs to be run in the MP Editor.

    If you sent it over I could figure it out for you, if your worried about losing your mission, just clean out the content and I'll fix the core components.

  20.  
  21. #176

    Sc[ + ]pe's Avatar

    Join Date
    Aug 2007
    Location
    Vancouver, Canada
    Posts
    847

    Re: The Scripting How-To Thread

    Anyone care to teach me how to make an IED script?

  22.  
  23. #177

    Mikee's Avatar

    Join Date
    Jun 2009
    Location
    Naugatuck, CT | USA
    Posts
    619

    Re: The Scripting How-To Thread

    Quote Originally Posted by Sc[ + ]pe View Post
    Anyone care to teach me how to make an IED script?
    You may want to check this link: http://www.armaholic.com/page.php?id=7224.

    You're welcome :P.

  24.  

     
  25. #178


    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    737

    Re: The Scripting How-To Thread

    Code:
    while {player distance myBomb > 10} do {sleep 5;};
    
    _bomb = "Sh_105_HE" createVehicleLocal getPos myBomb;
    Some random code I made just now. Should make a thingy that explodes (or gives an error if the ammo object type wasn't right). myBomb would be any object that you want to explode if the player gets within 10m of it. Run that code on every client, since it uses createVehicleLocal.

  26.  
  27. #179

    Sc[ + ]pe's Avatar

    Join Date
    Aug 2007
    Location
    Vancouver, Canada
    Posts
    847

    Re: The Scripting How-To Thread

    Quote Originally Posted by Mikee View Post
    You may want to check this link: http://www.armaholic.com/page.php?id=7224.

    You're welcome :P.
    I had a few reasons for not liking that script -- instead of disarming being an action menu command, soldiers could inadvertently disarm IEDs by simply walking by them; and the explosion effect seemed to be a missile that was launched at the target vehicle as soon as it got close, which would miss more than occasionally and blow up some poor building behind it.

    But looking at Beta's code, I should be able to alleviate those problems with some number-crunching and patience. Danke!

  28.  
  29. #180

    tralicrifleman's Avatar

    Join Date
    Dec 2007
    Location
    Fort Myers, FL
    Posts
    512

    Re: The Scripting How-To Thread

    In one of the SHQ missions, I think MEU raid 04, there is an IED trigger where you have a bomber and a vehicle and if you kill either it wont go off, so you could have a engineer trigger a bomb when marines get within 10m, but if you shoot the engineer before you get in the correct range then he wont trigger the bomb. Catch me on TS and ill send you the trigger if you want.

  30.  

     

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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


  
 

Back to top