Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

Evilhardt

Member
  • Content Count

    91
  • Joined

  • Last visited

  • Medals

Everything posted by Evilhardt

  1. Hi, I want to build an action that allows you to spawn and despawn a chemlight attached to your character. In the init of the unit I have put: this addAction["personal light on","light_on.sqf"]; Then I have a light_on.sqf: _me = player; Chem = "Chemlight_blue" createVehicle [getPos _me select 0, getPos _me select 1,1]; Chem attachTo [_me,[0,-0.07,0.06],"LeftShoulder"]; _off = this addAction["personal light off","light_off.sqf"]; _me removeAction _on; and a light_off.sqf: _me = player; {deleteVehicle _x} forEach ([Chem]); _on = this addAction["personal light on","light_on.sqf"]; _me removeAction _off; So, what I want is to spawn with the option "personal light on" in my mousewheel menu. When I select that option I want it to disappear, the chemlight to spawn and the option "personal light off" to appear. When I select this option I want the same thing as for the light-on-option just in reverse. But I get none of those, only "personal light on", because it is located in the init of the unit itself. The switching on and off bascially works btw, I have tested that. So, how would I actually need to do this, or what is the part that does not work? Thx Edit: I think the reason for which it is not working is that I do not define which unit gets the action added and removed. But how do I do that?
  2. Evilhardt

    Adjust Cemlight Brigntness

    Oh, that's unfortunate, as I seem to be unable to reproduce a lighting that looks like the one chemlights produce :/ But thank you anyway! :)
  3. Evilhardt

    Adjust Cemlight Brigntness

    I tried this and also setLightBrightness but nothing works.
  4. Evilhardt

    removeAction via SQF?

    Thanks, it works just fine now!
  5. Evilhardt

    removeAction via SQF?

    Ah, thanks a lot. It works. Though, for some reason, only when I use player rather than _this select 0. Is this a problem? It is supposed to work with multiple players all using it independently. @Fusion, nvm, it still helped. :) Edit: There is a minor annoyance remaining. When selecting one option, the other will appear in the center of the screen and only go away, when you scroll once and then rightclick... is there a way to fix that?
  6. Evilhardt

    removeAction via SQF?

    Doesn't work :/ Edit: I'm stupid^^ _on = this addAction["personal light on","light_on.sqf"]; light_on.sqf: _me = player; Chem = "Chemlight_blue" createVehicle [getPos _me select 0, getPos _me select 1,1]; Chem attachTo [_me,[0,-0.07,0.06],"LeftShoulder"]; _off = _me addAction["personal light off","light_off.sqf"]; _me removeAction _on; light_off.sqf: _me = player; {deleteVehicle _x} forEach ([Chem]); _on = _me addAction["personal light on","light_on.sqf"]; _me removeAction _off; I had "this" and now replaced it with "_me". Now it's working... kind of. The remove part still does not. I think now the error lies in the fact, that _on and _off are not defined within each of the SQFs. So when I say "_me removeAction _off;" in the light_on.sqf the computer does not know that variable. Same for "_me removeAction _on" inside the light_off.sqf. Is that the case?
  7. Hey, I want some of my custom textures to only display to OPFOR and some to only display to BLUFOR. Those textures visually mark the border of safezones for the teams, that the other team may not enter. The textures look like this: http://i.imgur.com/SzwohwT.jpg But obviously I don't want the team to see the textures which' safezone they designate. I wonder if that's possible and how to do it. Does anybody have an idea?
  8. Ah okay, I thought in "_x setobjecttexture [0, ""]" "0" would mean false. Like "texture with name 'xxx' false".
  9. Hmm... I did two things. The one thing was to further modify your original script and work with my trigger method, which lead to the result I wanted: myEastZoneObjects = [obj1, obj2]; myWestZoneObjects = [obj3, obj4]; waitUntil{!(isNull player)}; if (side player == west) then { { _x setobjecttexture [0, "safezone.paa"]; }forEach myEastZoneObjects; }; if (side player == east) then { { _x setobjecttexture [0, "safezone.paa"]; }forEach myWestZoneObjects; }; Then, as you say it would be the safer one, I tried your method: I put this in the init.sqf: ["obj1", "obj2", "obj3", "obj4"] execVM "safezones.sqf"; and put your code into the safezones.sqf (and put the texture files name in the " ")s. I also wrote this setobjecttexture [0, "safezones.paa"]; in the init line of each texture carrier object. But the result is, that I again can see all the textures no matter the side I am playing as. What did I do wrong this time?
  10. Ok, but how would that be different from putting if (side player == east) then {this setobjecttexture [0, "mytexture"]; in the init line of the carrier object?
  11. But I want them to be visible only to certain teams. Texture of obj1 and obj2 to Team A, texture of obj3 and obj4 to team B... that is the whole point.
  12. I'd like to know how I can check, whether an entity being located in a trigger's area is in a list that has been defined previously. To my big surprise I could not find an answer to this questing by asking Google.
  13. Thank you, looks like it works, not tested all cases yet though.
  14. Thank you, there is an issue though. I tried the first solution. It works in the editor but not in MP. I also tried the second solution, but did not know how to call the script. I made a gamelogic object and put into its init line: _handle = player execVM "savezones.sqf"; But apparently that's wrong. I also called it with a trigger. At least I got no error there. But it does no work either, as the texture does not appear. I made a BLUFOR-trigger for the east-savezone-textures and put in its ON ACT field: _handle = player execVM "savezones.sqf"; I named the one texture carrier I was testing the script with "obj1". I modified your script as follows, as I want the textures to be visible to the respective opposing team: myEastZoneObjects = [obj1, obj2]; myWestZoneObjects = [obj3, obj4]; if (!(isServer)) then { waitUntil{!(isNull player)}; if (side player == west) then { { _x setobjecttexture [0, "sich2.paa"]; }forEach myEastZoneObjects; }; if (side player == east) then { { _x setobjecttexture [0, "sich2.paa"]; }forEach myWestZoneObjects; }; }; Actually, once the trigger is fired by the BLUFOR-player, the script should be executed and the texture appear on the carrier. Edit2: Uhm... what is the "!" doing there in "!(isServer)" ?? As I deleted it, it suddenly worked... which kind of makes sense... Unfortunately it also only works in the Editor. In MP it works... partly I can't quite figure out when and when not. For exampel it works, when I span in as BLUFOR. But when I span in as OPFOR and then switch team to BLUFOR it no longer does...
  15. Thx, and how would I further investigate on the unit in question. if it is not alive for example? Say, I want a BLUFOR-activated trigger, that only fires, if there is no OPFOR in its area, or if the OPFOR is in the area but dead. In other words, if there is a OPFOR already in the trigger area, when a BLUFOR enters, it does not fire. So something like (The code is syntactical nonsense obviously): // Conidtions: Activated by BLUFOR, present, repeatedly this; {_x in OPFOR_players} !alive x; game logic object, init line: OPFOR_players =[O1,O2,O3,O4,O5,O6,O7,O8]; How would this could need to look like to be correct? Or does it even in principle give the solution to the problem?
  16. It worked! Thanks a lot, man!
  17. Hey, I would like to add a texture with transparent background to my mission, because nether the 1 m nor the 10 m user texture object is appropriate for my needs. But .jpg does not support transparency. Does Arma 3 accept any image formats that support transparency? Or, if not, is there any other workaround to achieve this?
  18. Thx for the hint. I got it to work now. But it is WAY to transparent. The part that is meant to be opaque is almost invisible as well... Do you know what that might cause?
  19. Thank you, but that did not work for me. I created a TGA, installed the tools, opened the TGA with TexView2 and saved it as a PAA. I put the PAA in the folder of the mission and put "this setObjectTexture [0, "<filename>.paa"]"in the user texture object's init line. I get the error: "Picture <filename>.paa not found." Any idea why that is?? I don't see what I could have done wrong. :confused: EDIT: Never mind, I am just retarded. The image DOES appear ingame but with false colors and not with transparent background.
  20. Hello, is it possible to make a notification pop up (preferably in the lower middle of the screen) that is displayed only to one specific player, who released a trigger? What I fond so far through my research were all Arma 2 results. And they said it does not work with hints at least.
  21. Great, I tested it with another player and it works just fine! Thank you.
  22. This is brilliant man! Thank you so much. Exactly what I wanted! I really owe you one! :) Edit: there is a problem though. The messages flashes for a very short time whenever you kill somebody of the faction that is in the condition of the trigger. This indicates that the messages is shown to everybody when the trigger fires... ? Or has it to do with my subjects being bots and as they are calculated on the server, which is me, I get the message? If that should be the case I suppose something with "if (_x == player) then ..." should fix this?
  23. Thank you, but unfortunately I can't get this to work. I made a game logic object and put the script in its init line (just like with he other script), then I placed a marker. I named the marker "myMarker". I placed a BLUFOR player and exited and entered again the area described by the script in the init line of the game logic object. Nothing happens. What am I doing wrong? There is a semicolon missing btw.
  24. Thanks a lot, man! This has bugged me for two weeks now. :P So I take it this cannot easily be done with triggers? Because this basically works like a circle shaped trigger. What if you have a rectangular area that you want to define as the playable area?
×