Jump to content

Erwin23p

Member
  • Content Count

    142
  • Joined

  • Last visited

  • Medals

Everything posted by Erwin23p

  1. I didn't try, but maybe using setHitPointDamage and setting the third element to false?
  2. I think that you could create your own addon only with that script, in this case you would have the script added everywhere in the game and you could call it whenever you want. There are several mods that do that, they're just good scripts that people want to use in vanilla missions and with a mod, this script is added to every mission.
  3. Have you tried showGPS show?
  4. unassignVehicle is for individual unit, so use it like this: { unassignVehicle _x; doGetOut _x; } forEach _crew; Check notes from the community wiki:
  5. Hello, I have a problem with some fsm from a mission, I've got an fsm that executes another one and I've got no problem sending some variables to the new fsm but I'm trying to retreive a variable and it just doesn't work. That's what I got: The executed fsm works right and all that but when I try to use _fsmResult with an if statement it tells me that it's not defined. and in the end statement of the other FSM I've got this: _result = true; or false. I've been using this function in other missions and it used to work well, now it just doesn't work.
  6. Erwin23p

    FSM variables...

    Working well now, I defined the variable a state box just before the end box, put a timer condition between and used this to make the "outer" fsm notice that the _fsm is finished: { _x setVariable ["startTasking",true,true]; } forEach (units _crew); _result = true; _t = time + 10; on the outer fsm I got this in the precondition: if (time > _timer) then { _startTrigger = _crewLeader getVariable ["startTasking",false]; _timer = time + 5; }; then a condition box seeking _startTrigger true. Thanks a lot! easy solution yet I was so blind...
  7. Erwin23p

    FSM variables...

    I thought about that, I'm going to try acceding a variable while in the middle of the fsm. Thanks I will try it.
  8. Erwin23p

    FSM variables...

    Same thing 😞
  9. Erwin23p

    FSM variables...

    Yes, just after executing the fsm: _fsm = [_crew, _crewLeader, _basePositions, _usedBases, _groups, _missionNumber] execFSM _fsmName; _fsm setFSMVariable ["_result", false];
  10. Hi, I'm working on a little script that has a listbox, a button and an structured text, when you select an item of the list box it calls a function that displays some info about the selection on the structured text, all good for now. But the problem comes when I run out of items in my list box, I can't clear some of the text, the only solution I found is close the dialog and reopen it again. I'm using this to write my text: and tried:
  11. After reading over and over my script, looking at all the commands/functions I'm using where the problem is, I think the main problem is with the lbSetValue, lbValue. It works only for dialogs I think, so my solution is this: I create an empty array, and when one string of the main array turns true, it sends it to the new array, and the order of the listbox is the same as the commands so, Lb index 0, will always be the new array index 0.
  12. Hi, I have a new problem, tried a lot of things but can't get it working. I'm still with the HUD menu, it has to be with display because it's intended to use when flying so you don't have to lose controls. I have a menu with a listbox: Then the display EH to select an option: then, for closing the script: So, I have a problem with 2 menus like this I have and it's when I choose an option, let's say option 1, it's variable "startEngines" on the atcOptions array, so there is a script in the FSM that does this: player setVariable ["startEngines", false]; so next time I open this same menu, this variable shouldn't appear on the listbox right? So all good, it doesn't apper, the problem comes when I summon: case 2: { elca_selectedAtc = true; _index = lbValue [501, 0]; _function = atcOptions select _index; hint _function; }; it always give me the menu I deleted value, even if a I select option 2 (case 3, index 1) it gives me "startEngines" always... I've been all the day testing... what is my problem here?
  13. I had this kind of problem with a listbox, I fixed it by using this after creating the list if (lbSize 1501 > 0) then { lbSetCurSel [1501, 0] }; maybe using lbSetSelected could work. control lbSetSelected [index, selected]
  14. Thanks a lot! I got it working, I did read that on the bis wiki but I didn't fully understand it...
  15. Hello again, I have a new problem: I'm working on an hud menu style, not a dialog but a display kind: Init: This works just fine. IF radioOpen function is this: but as soon as I add this to the function, when I open radioOpen (press R) I loose all keyboard Ui input: I tried a bunch of things, I also had some spawn functions inside the "case 2:" but I simplified everything just to fix the main error.
  16. That worked just fine, thanks! But what is the main difference with what I tried? And why mine didn't work? _ctrltext ctrlSetStructuredText parseText format [""];
  17. Erwin23p

    GUI Box

    Try passing the listbox selection as an argument when calling executedialog.sqf: action = "closedialog 0;[ lbcursel 1500, lbcursel 1501] execVM 'scripts\range\gui\executedialog.sqf'"; and then selecting them in the script: _index1 = _this select 0; _index2 = _this select 1;
  18. THAANKS! Now I got it working, not only the landing pads needed this but also the arrows I was so dumb to misunderstand that, I could've had it working last week, I'm so sorry for missing that but thanks a lot.
  19. Hello, I'm trying to do a script where just a certain class of vehicles can acces. I have an Array with the classnames: then, I have another array in which the vehicles on the map that correspond to that type of classname are added to this other array. Well my problem is when the script adds the desired vehicles to the new array, they don't get in the array as the classname, but as the .p3d file and some random numbers.
  20. Oh I'm sorry, I looked for that and I thought it was this: pad1 disableCollisionWith _obj; and after this command, then I moved the invisible pad to the garage. Now that you told me again, I've searched more and found the "can_collide" you're talking about, will try when I can and will post results. Sorry again for misunderstanding.
  21. Up :( I tried disabling collision, also tried creating landing pads at 0,0,0 of map, and then attaching them to the garage, not working neither. GarageInit_2.sqf
  22. I don't think it's this, the arrows are just a tool I'm using to see where the invisible helipads are, in the script I don't have these. The problem is the placement of the invisible helipads, I use these for the conditions in the addActions and movement points.
  23. Hello again, I have a little problem with my garage script: Instead of using objects set in the editor for movement and condition references, the script creates two invisible landing pads (one for each door) and from there I use modelToWorld to get diferent positions. Well to get the correct positions relative to the garage object, I went to a empty virtual reallity map and put the object on 0,0,0 and from there I could know the relative position. I use this pad1 = "Land_HelipadEmpty_F" createVehicle (_obj modelToWorld [-6.65,-5.75,-2]); // Left pad2 = "Land_HelipadEmpty_F" createVehicle (_obj modelToWorld [1.3,-5.75,-2]); // Right in the visual reality map it gave me no error but when I moved to the actual mission I'm working on, the two points were not in the same position.. I used two arrows to see that position. "Sign_Arrow_Blue_F" createVehicle (getPos pad1); "Sign_Arrow_Blue_F" createVehicle (getPos pad2); What could be creating this error? I also tried modelToWorldVisual. GarageInit.sqf Garage.sqf
  24. Ok I think I solved the problem, now I've got all working. Well I'm still learning so I'm trying to do scripts about everything for practice, and for a mission I'm working I wanted to create a simple garage script, when approaching the garage door you get an addaction to move inside, and when you're inside another to move outside. Really simple, but I wanted to create i with functions because I've never really knew how to use these, now I know. :) garage.sqf I still have to fix the conditions of the addactions, instead of "Door1", (Move_Points select 0).
×