Jump to content

Gamer-3ac24a5e7f4beb96

Member
  • Content Count

    24
  • Joined

  • Last visited

  • Medals

Everything posted by Gamer-3ac24a5e7f4beb96

  1. I have an initServer sqf counting enemy kills. I would like call a separate sqf that plays a sound each time an enemy is killed. How do I correctly format the call to the sound sqf in my code shown here: if (isServer) then { _enemies = allUnits select {!isPlayer _x && side _x == WEST}; political_will = 100; (format ["British Political Will: %1", political_will]) remoteExec ["hint",0,false]; _onKilled = { political_will = political_will - 1; (format ["British Political Will: %1-", political_will]) remoteExec ["hint",0,false]; }; {_x addEventhandler ["killed",_onKilled]; false} count _enemies; }; my sound playing sqf is called killsounds.sqf Do I just need a line of code in the _onKilled brackets?
  2. Gamer-3ac24a5e7f4beb96

    How to call another sqf in the init server sqf

    I'm not trying or claiming to be great at it. I just like this one mod I've made because its fun. Thank you for the help.
  3. Gamer-3ac24a5e7f4beb96

    How to call another sqf in the init server sqf

    Thank you pierremgi is there a way to play the sound globally or for all of opfor? I have 8 player slots and rather than specify the sound on each enemy or each player it would be simpler to have it play for everyone any time an enemy is killed.
  4. Gamer-3ac24a5e7f4beb96

    How to call another sqf in the init server sqf

    Thak you! I have only one playable side and no spawned in enemies in the scenario. The reason I wanted to call another sqm is that i have made one that plays one of four random sounds like this: _sound = selectRandom [ "hitmetal1", // As defined by you in Description.ext "hitmetal2", "hitbody1", "hitbody2", ]; playSound _sound; Can I put that whole chunk where you suggest I put [_unit, "deathSound"] remoteExec [say3D, 0, false]; Out of curiosity does that say 3d command make a 3d sound at the position of the player?
  5. Gamer-3ac24a5e7f4beb96

    How to call another sqf in the init server sqf

    Is there a way to use the remoteExec as in remoteExec [call killsound.sqf]; I'm sure that's not proper though.
  6. I've been playtesting a scenario for the last two months but yesterday all AI stopped finding targets reliably. I have not changed anything AI related between target acquisition working and not working. They have find target enabled. I removed all fog and overcast just in case. It happens to bluefor and opfor AI. Was there an update to AI or something? Is there simple button I might have pressed by mistake that would disable targeting in all AI even though enable target is enabled in all their attribute windows?
  7. Gamer-3ac24a5e7f4beb96

    All AI suddenly not finding targets

    Its more inconsistent targeting than non existent. I some AI target players but face in the wrong direction
  8. Gamer-3ac24a5e7f4beb96

    All AI suddenly not finding targets

    I see that 3den enhanced was updated recently. I don't know if there were any AI updates in that regarding path finding or target finding.
  9. I am using the noticeboard object to create town name signs. I put the jpg into the field marked "texture#0" in the attributes window. The picture shows up fine, but only if the player physically bumps into the sign. Otherwise, it just shows all black. What am I doing incorrectly?
  10. Gamer-3ac24a5e7f4beb96

    Custom image shows up black in game

    Thank you so much. That fixed the problem 😃
  11. Gamer-3ac24a5e7f4beb96

    Custom image shows up black in game

    each side as to be any power of two? or the total number of pixels has to be a power of two?
  12. Gamer-3ac24a5e7f4beb96

    Custom image shows up black in game

    Thanks gc8. I'll try resizing it to 800 by 400
  13. Hello all, I spent the last month making this open world multiplayer scenario where you play as a flying column in the Irish war of independence. It has excellent ambient music tracks and professional voice acting. Travel all around and attack the British forces to weaken their political will. if political will hits 20 or below you win. There are vehicle patrols, foot patrols, barracks with garrisons, lewis guns, rolls royce armored cars, a biplane, dynamically spawning civilian interactions, arms smugglers, real newspaper clippings from the time and place, and you can hear the word "fuck" shouted 13 different ways in an Irish accent when a player dies. Your team spawns at a random location each time you restart. If you find any bugs or have requests for what to put in the game just comment on the workshop page and I'll fix the issue or try to add what is requested. All the best and have fun 😃 https://steamcommunity.com/sharedfiles/filedetails/?id=2851892169
  14. Gamer-3ac24a5e7f4beb96

    Replayable Open world Historical Coop Set in 1920 Ireland

    Thank you johnnyboy. I'm still adding stuff so it will have more of a world to discover and interact with.
  15. Gamer-3ac24a5e7f4beb96

    Syntax question for hints

    I am working on a kill counter sqf and can get it activating correctly but I don't know how to get the kill count variable to display in the hint that shows on the player screen. if (isServer) then { enemy_killed = 0; addMissionEventHandler ["EntityKilled", { _killed = _this select 0; if (side group _killed == west) then { enemy_killed = enemy_killed + 1; hint (format ["Kills", _enemy_killed]); if (enemy_killed > 10) then { failMission "LOSER"; //or any other ending }; }; if (side group _killed == east) then { enemy_killed = enemy_killed - 1; hint (format ["Kills", _enemy_killed]); if (enemy_killed > 10) then { failMission "LOSER"; //or any other ending }; }; }]; }; Right now it just displays the word "Kills" in the hint box. The failure condition works properly so I know its counting. I'm just new to scripting and couldn't figure it from the bohemia's hint info page.
  16. Gamer-3ac24a5e7f4beb96

    Syntax question for hints

    Thank you for the direction. I fixed my extra quotations and saw that my mission event handler line wasn't proper. I know I need something along the lines of addMissionEventHandler ["EntityKilled",0,]; based on the bohemia info but I'm sure that is incomplete somehow. How do I make my variable global? Searching global variable on bohemia didn't turn up a page. My mission is a coop not pvp so hopefully that reduces complications.
  17. Gamer-3ac24a5e7f4beb96

    Syntax question for hints

    I get a generic error and an invalid number error when I put this in an init sqf in the mission folder.
  18. Gamer-3ac24a5e7f4beb96

    Syntax question for hints

    Thank you Harzach! I am making this a script that tracks the political will of the enemy based on kills. If an enemy dies, it goes down by one. If a friendly dies, it does up by one. This is what i came up with: political_will = 100; addMissionEventHandler ["EntityKilled", { _killed = _this select 0; if (side group _killed == west) then { political_will = political_will - 1; format ["Enemy Political Will: %1", political_will] remoteExec ["hint", -2]; if (political_will < 10) then { failMission ""END1""; //or any other ending }; }; if (side group _killed == east) then { political_will = political_will + 1; format ["Kills: %1", political_will] remoteExec ["hint", -2]; if (political_will < 10) then { failMission ""END1""; //or any other ending }; }; }]; I'm using failMIssion to activate end 1 the win screen. Player side is opfor.
  19. Gamer-3ac24a5e7f4beb96

    Jukebox for custom songs

    At the moment i am using this code in my player init to play continual random custom music: playMusic(switch(round(random 7))do{ case 0 : {"music0"}; case 1 : {"music1"}; case 2 : {"music2"}; case 3 : {"music3"}; case 4 : {"music4"}; case 5 : {"music5"}; case 6 : {"music6"}; case 4 : {"music7"};}); addMusicEventHandler["MusicStop",{playMusic(switch(round(random 7))do{ case 0 : {"music0"}; case 1 : {"music1"}; case 2 : {"music2"}; case 3 : {"music3"}; case 4 : {"music4"}; case 5 : {"music5"}; case 6 : {"music6"}; case 4 : {"music7"};});}]; and this in my description to define the music: class CfgMusic { tracks[]={music0,music1,music2,music3,music4,music5,music6,music7}; class music0{name="music0";sound[]={"\Music\1A.ogg",db+0,1.0};}; class music1{name="music1";sound[]={"\Music\1B.ogg",db+0,1.0};}; class music2{name="music2";sound[]={"\Music\2A.ogg",db+0,1.0};}; class music3{name="music3";sound[]={"\Music\2B.ogg",db+0,1.0};}; class music4{name="music4";sound[]={"\Music\3A.ogg",db+0,1.0};}; class music5{name="music5";sound[]={"\Music\3B.ogg",db+0,1.0};}; class music6{name="music6";sound[]={"\Music\4A.ogg",db+0,1.0};}; class music7{name="music7";sound[]={"\Music\4B.ogg",db+0,1.0};}; }; Every 30 minutes or so or very 5th time I start a game it will throw an error about an expected string and stop the music all together. In the past I remember having done this with the jukebox function but for the life of me I can't find the thread I used 2 years ago. How do I use jukebox to continually play random custom music?
  20. I have my one image custom loading screen working great with : loadScreen = "Loading1.jpg"; in my description.ext How could I make it select one from a list of images each time it loads?
  21. Gamer-3ac24a5e7f4beb96

    Multiple Custom Loading screens

    Thanks Harzach! That works perfectly.
  22. Gamer-3ac24a5e7f4beb96

    How to Play a random sound from a list

    works perfectly thank you very much!
  23. I have my sounds set up in the Sounds folder inside the mission folder. I have my sounds configured in my description.ext file. How do I call one sound from the list at random when a trigger is activated?
  24. Gamer-3ac24a5e7f4beb96

    How to Play a random sound from a list

    Thanks Sergeant! When I put [] spawn "Your_sound_script.sqf"; with my sqf name into a trigger i get the error "On activation spawn type string expected code". I have the sqf file in the mission folder. Any ideas?
×