Jump to content

cookies2432

Member
  • Content Count

    246
  • Joined

  • Last visited

  • Medals

Posts posted by cookies2432


  1. So, it's late and my brain isn't working properly sadly. I was wondering if anyone knows how to delete an object without it having a variable name? It calls a function so i tried "deleteVehicle (_this select 0);" but arma 3 gave me hell for that so i haven't consider trying it again. I appriciate all the help I can get, and for anyone who's curious, it's food items, something of a project i'm working on, this is just a part of it :)


  2.  

    You are missing a then,

    if ({_x == _itemType} forEach ["_Rice","_Beans","_Water","_Soda"]) then {

    Thank you! Now it's giving some weird "reserved variable in expression" error message for some reason, it's about this I think:

    if ({_x == _itemType} forEach ["_Rice","_Beans","_Water","_Soda"]
    

    Any idea why? As I understand that's correct usage of forEach but i'm proabably wrong, still learning :). Could it be because i mention the variables twice (private) and in the if statement?


  3. You are calling fnc_addItem before you define it.

    _itemType = (_this select 0);
    
    fnc_addItem = {
    
      private ["_Rice","_Beans","_Water","_Soda"];
    
              _Rice = "Land_RiceBox_F";
              _Beans = "Land_BakedBeans_F";
              _Water = "Land_BottlePlastic_V2_F";
              _Soda = "Land_Can_V1_F";
    
      if ({_x == _itemType} forEach ["_Rice","_Beans","_Water","_Soda"]) {
        hint format ["Hello"];
      } else {
        hint format ["RIP"];
      };
    
      deleteVehicle _itemType;
    
      hint format ["Rice %1 Beans %2 Water %3 Soda %4",_Rice,_Beans,_Water,_Soda];
    
    };
    
    call fnc_addItem;
    

    Should do it.

    Oh well, I'm happy it's that simple lol. Sometimes when you focus on one thing you find it hard to spot other things. Thanks a lot! :D


  4. Hello, i'm in the need of help with a script that's supposed to "pick up" an item from the ground (soda for example) and then it will take its classname, check it if it matches any of the variables in an array and if it does it will add a value to that variable. After all of that it will find the pic of that item in the config file (haven't begun with this part yet). After this it will add the picture to a rsclistBox on a GUI (IDC = 1500) and the name of the item (for example, can of soda or whatever it's called).
     
    I have begun working on it but i'm getting errors about my function being undefined ?
     
    This is my code: 
    _itemType = (_this select 0);
    
    call fnc_addItem;
    
    fnc_addItem = {
    
      private ["_Rice","_Beans","_Water","_Soda"];
    
              _Rice = "Land_RiceBox_F";
              _Beans = "Land_BakedBeans_F";
              _Water = "Land_BottlePlastic_V2_F";
              _Soda = "Land_Can_V1_F";
    
      if ({_x == _itemType} forEach ["_Rice","_Beans","_Water","_Soda"]) {
        hint format ["Hello"];
      } else {
        hint format ["RIP"];
      }
    
      deleteVehicle _itemType;
    
      hint format ["Rice %1 Beans %2 Water %3 Soda %4",_Rice,_Beans,_Water,_Soda];
    
    };
    
    
    
    

    Any help would be extremly appriciated! :)


  5. You may want to change the thread tile to be abit more meaningful.

    What do you suggest, sorry, I really didn't know what to put

     

    Εverybody here working on something for arma and ask for some advice and help.  :)

    You dont need this topic .. Just make another one with the help you really need and the Guy you looking for will come .... ;)

     

     

    Welcome to Arma3 forum !   :)  

    Thank you! I have been here a little but not too often, thing is that i need help with a lot of different kinds of things and when I work on it, I work for only a certain period of time but hard. I just need someone who can quickly helpe me with a small issue :)


  6. Hello, i'm working on something for arma 3 that i've always wanted to do but I could really use some advice or help sometimes, I cannot offer any salary, just looking for someone who shares the same interesst as me, creating content for arma 3 and learning while doing so. Thanks for reading this! :)

     

    The work is about dialogs and scripting :)

     

    Steam: http://steamcommunity.com/profiles/76561198103602415/


  7. I'm about to head out for work, so I can't test yours right now. I'll take a look when I get home but until then you could check out the tutorial I made.

     https://forums.bistudio.com/topic/189494-gui-tutorial-and-simple-vehicle-selector-release/

    You'll see that I do it a different way. In the dialog.hpp, I define the backgrounds, controls, and objects by their names first and then the have the controls with size, type etc after.

    Check out the tut and send me a pm with any questions you have, and I'll read them later. 

    Thanks a lot for the video, it has all I need, I will check it out fully tomorrow (since my brain is overheated and tired atm). :D

×