Jump to content

Zombitch

Member
  • Content Count

    54
  • Joined

  • Last visited

  • Medals

Everything posted by Zombitch

  1. Hey guys, I'm facing a new problem. I am using the say function to make a NPC speaking, this works great but I would like that when the character speak it write the text he say on the screen (for the player). So here is what I ve done : In the description.ext file I added this : class CfgSounds { sounds[] = {willEnableLightHouseSound}; class willEnableLightHouseSound { name = "willEnableLightHouseSound"; sound[] = {"willEnableLightHouse.ogg", 1, 1}; titles[] = {"Wait here some seconds, I will check the lighthouse."}; }; }; And I activate the sound doing this : theCharacter say "willEnableLightHouseSound"; But as I said, the sound play but the text do not display on screen. Can you help please ? Thanks ;)
  2. @kylania Thanks, I modified my code according to your advice.
  3. Hello, I would like to playMusic and to execute say function on each client. In fact when a player do a certain action, it's activating this line : guardenKeeper say "willEnableLightHouseSound"; The thing is this function is only "played" on the player who did the action, the other players won't heard what guardenKeeper said whereas I would like all player near the guardenKeeper hear what he said. I gooogled a bit and found I could use RemoteExecution or BIS_fnc_MP, but I didn't understand the real difference between both functions. Does anyone have any example to show me how to make it work ? Thanks a lot. Regards, Zombitch
  4. Hi You can use joinSilent function : [yourTeammate] joinSilent thePlayer; If your teammate in a human, I don't know how to make it. And if it's an AI it's not possible at the moment, check this for more information : http://feedback.arma3.com/view.php?id=3202
  5. @Azer1234 Thanks but it don't work. I tried a lot of thing and the only thing that works is the following : I am using the BIS_fnc_MP function. So first I created a new sqf file (playMusicMP.sqf) with the following content : private["_object"]; _musicName = _this select 0; playMusic _musicName; And in order to play music on each client I use the BIS_fnc_MP : _null = [[["readyToWarMusic"],"MPFunctions\playMusicMP.sqf"],"BIS_fnc_execVM",nil,true] call BIS_fnc_MP; (readyToWarMusic is the music I declared in the description.ext file (in cfgMusic part)) Hope it will help someone else. Bye.
  6. Hello Zenophon, I tried to do what you said (setting a 50m range) but the problem is the same :( Other ideas ? :p
  7. I tried this but when I start the mission it tells me their is an error : No title entry for CfgSounds. Any idea ? Thanks anyway
  8. Thanks it's working perfectly. (I read the wiki about deleteWaypoint function but I didn't read the notes...)
  9. Hi, My mission is almost ready, so I'm testing it. However I would like my mission to be playable in multiplayer, so yesterday I gave my mission to a friend who manage the server and he launched the mission on a multiplayer and the fact is some things do not work anymore on multiplayer. If you ready to help me, you can download all sqf file here. First thing I would like to tell you is sorry. Sorry because I'm not very comfortable (not at all in fact) with locality system. So here are some problems (maybe it's important or not but the host is my friend's computer) : 1) There are 2 player only, at beginning all players lost their weapon and are adding in a boat cargo. The problem is I (as a player) do not get on the boat and I still have my weapon whereas for my friend it worked (he was on the boat without any weapons). Here is one of the script I "launch" in the init.sqf : if(isServer || isDedicated) then { Player1 moveInCargo RescueBoat; Player2 moveInCargo RescueBoat; removeAllWeapons Player1; removeAllWeapons Player2; removeHeadgear Player1; removeHeadgear Player2; Player1 unassignItem "NVGoggles"; Player1 removeItem "NVGoggles"; Player2 unassignItem "NVGoggles"; Player2 removeItem "NVGoggles"; } 2) All tasks (objectives) should be affected to all player. But the problem is that only my friend got the task. Me, I got nothing affected (no task). Again here is the script I launch in the init.sqf to make tasks : if(isServer || isDedicated) then { ["FindStuff_task",true,["Find the box containing your stuff. It should be near a rock","Find stuff","Find stuff"],[3258,1731,0],"ASSIGNED",1,true,false] call BIS_fnc_setTask; ["RescueHostage1_task",true,["Rescue the first hostage.","Rescue Hostage #1","Rescue Hostage #1"],[2779,1746,0],"CREATED",1,true,false] call BIS_fnc_setTask; ["CallTheShip_task",true,["Talk to the lighthouse keeper to call the boat.","Call the ship","Call the boat"],[2717,954,0],"CREATED",1,true,false] call BIS_fnc_setTask; ["CallTheShip_task",true,["Talk to the lighthouse keeper to call the ship.","Call the ship","Call the ship"],[2717,954,0],"CREATED",1,true,false] call BIS_fnc_setTask; } 3) In order to succeed the first task, I made a trigger (with the ingame Arma3 Editor) with this condition : cursorTarget == myGearBox And when the condition meet I do the following (in order to complete the task) : ["FindStuff_task","SUCCEEDED"] call BIS_fnc_taskSetState; This works fine when I play singleplayer, but in multiplayer it doesn't works. I aim at the gear box and nothing happens this is maybe normal since I don't have any task setted up. So I asked my friend to aim the gearbox and he told me that nothing happen. Are there some work to do to make cursorTarget working on multiplayer ? (is it available in multiplayer ?) Now, it's time to thank you very much for reading me ;). See you.
  10. ok, so now almost everything work, thank you very much! I'll explain what I've change step by step : 1) About initialize the players I have exaclty done what chaoticgood said. So i put exctly this in the init.sqf file : waitUntil{!(isNull player)}; _p = player _p moveInCargo RescueBoat; removeAllWeapons _p; removeHeadgear _p; _p unassignItem "NVGoggles"; _p removeItem "NVGoggles"; There still a bug with this, the only thing that don't work is the moveInCargo function (in order to place the player in the rescueBoat). In fact my friend who host the game and play with me was on the boat, but me I wasn't. So if you have any idea ? (maybe as I am a client, at the init phase my client don't know what is the RescueBoat ?) Maybe if I do something like that it will work : (I will try afterwork) if(isServer || isDedicated) { Player1 moveInCargo RescueBoat; Player2 moveInCargo RescueBoat; } waitUntil{!(isNull player)}; _p = player removeAllWeapons _p; removeHeadgear _p; _p unassignItem "NVGoggles"; _p removeItem "NVGoggles"; (Player1 and Player2 are the names of the players that I set in the editor). 2) About the task, I have done again exactly what Johnson11B2P said and it works like a charm! 3) About the cursorTarget it works an both multiplayer AND single player. In fact I think my trigger with the condition : (cursorTarget== myGearBox) and that do the following when condition meet : ["FindStuff_task","SUCCEEDED"] call BIS_fnc_taskSetState; Wasn't working because I was creating the task only when it was a server (checking isServer), so the player wasn't able to succeed task since the task was set on server side. When I made the Johnson11B2P changes all worked. Thanks guys.
  11. Thanks for your answers guys, I will try your solutions when I'll get back home. @Johnson11B2P The thing I want to do with the trigger and myGearBox is : If one of the players is near the gearbox (player distance gearbox < 20) AND the player aim the gearbox then make the current task succeed. Can you help about that ? :)
  12. Looks like pretty easy :p but I 've done this and when the unit arrives to the waypoint he just stops (still standing, or sit and dont move anymore). Any idea ?
  13. Hello mates, I need some advices about creating an intelligent enemy. What I call an "intelligent enemy" is an enemy (AI) that can spot you AND look for you if you ran away (until you are far far away from the enemy ( > 200 m). So here is what I've done : 1) Creating an enemy 2) Set some waypoints to the enemy (waypoints type are "move"). Now the enemy is moving waypoint to waypoint, when he sees me he attacks me, that's OK. But the thing is if I am hinding in a house that is 20m away from the enemy he will continue to go from waypoint to waypoint whereas I would like the enemy look for me (heading to the house and look for me). Is this possible ? And if so, can you give me some tips to achieve this ? Again thanks a lot for you appreciate help. Edit : I have another question about enemy : Is it possible to make enemy live their life ? I mean can I put an enemy in the editor, and without setting waypoints this enemy will walk where ever he wants and will do what he wants ?
  14. @Lappihuan Thanks for your answer. I will try Das Attorney solution first, doing something like this : while(enemyUnit knowsAbout Player1 < 1.5) do { enemyUnit addWayPoint [Player1 getPos, 20]; } But I'm at work at the moment, so I can't test it right now. Moreover I would like my mission available for multiplayer, do I have to write something specially to make it available for multiplayer ? I mean should I run the BIS_Fnc_TaskPatrol on the server only or on all clients ? (I'm not very comfortable on how do things to make a mission available in multiplayer mode) Thanks.
  15. @Das Attorney Looks pretty good and thanks for the links. But instead of making a loop is it possible to add an event handler something like : enemyUnit addEventHandler [knowsAbout < 1.5 , {_this exec "searchAndDestroyPlayer.sqf"}]; Is this possible (to add a condition in a addEventHandler) ? And if so, it's better than using a loop ? One other question :p , where to put the loop script ? In a game logic ? Edit : Since I'm making a simple MP mission, can you tell me if the BIS_Fnc_TaskPatrol should be call by each client or only by the server ?
  16. Hi guys, I am trying to "manage" the waypoints system. So the thing I want to do is to make a ship turn around a little island. In order to achieve this I made 7 waypoints around the island almost everything works fine. The only problem I got is the boat stops some seconds at each waypoint. Do you know if there is a way to tell the ship not to wait and go to Waypoint (n+1) when arrived at Waypoint n ? At the moment here is what my ship do (S = ship; W = Waypoint) S---------(ship go to waypoint1)-----------W1(wait some sec)-----------(ship go to waypoint 2)-----------W2(wait some sec) etc.... If I am not clear about my request, please tell me. Thanks a lot.
  17. I've try this but it has no visible effect, as if I have done nothing. Hello, I read something like that in the armaholic forum, I tried to make it but I didn't succeed synchronize the Trigger with my waypoint. As I'm at work I can't test right now. I 'll tell you once I'll get back home. Thanks ;)
  18. Hello, As I am new to Arma3 scripting, I wonder what are best practices ? Can you share your tips and your practices ? For instance I saw a lot of people scripting with external files such : init.sqf or intro.sdf. And I guess init.sqf is to initialize some value/units/weapons before the mission start but I wonder where, when and how to put that script (in a game logic ?) ? Same question for the intro.sdf ? Thanks for your help. Edit : some more question : Is it possible to deal with global variable ? If so can you show me an example please ? Is it possible to call a timer ? (I mean for instance that each X seconds the player loose some health , this is just an example) What is the difference between *.sqs and *.sqf file ?
  19. This link help a lot (i didn't notice the function viewer in the editor) ! Thanks.
  20. lol ok, but how to tell the boat driver (that is an AI) to turn around the island without waypoints ? ^^
  21. Thanks for your answer guys. @Zenophon This is exactly what I was looking for ;) @tryteyker I'm used to language development, the things I want to know is the BIS functions and game logic ;) And as you said, I am trying to make a simple rescue mission at the moment.
  22. Zombitch

    Condition All Mp Players

    I did not tested what I wrote, but according to the wiki units page you should be able to get all the players (as an array) doing this : player in units group player As I wrote, I can't test at the moment, so tell us if it works or not ;)
  23. Hi guys, I have a map with a player and one gearbox. I would like to succeed the current task when the gearbox is opened. I know how to deal with task and trigger, the only thing I need is : how to check the player "open" a specified gearbox ? In fact in my trigger condition I would like something like : isOpened(my_gearbox) But I don't know if it's even possible. I'll appreciate your help :p Thanks.
  24. Zombitch

    Trigger on opening gearbox

    Yeah it could be done like this I think. So I guess I 'll have to write something like that : (player distance my_gearbox) < 20 && cursortarget==my_gearbox This way I'll check the player is near the gearbox and he is aiming the gearbox. I am at work at the moment, I will try this later and I keep you informed. Thanks for the tips ;) EDIT : I confirm the line code works !
  25. Zombitch

    Trigger on opening gearbox

    Thanks for your answer. I checked your link, and indeed it shows how to know when the player inventory opened. The fact is the player can open his inventory without opening a gearbox, or he can also open another gearbox than the one I want him to open. So the problem still unsolved :p If someone know how to do this, I'll be very grateful :). Otherwise I will do it using another way.
×