Jump to content

clydefrog

Member
  • Content Count

    706
  • Joined

  • Last visited

  • Medals

Everything posted by clydefrog

  1. People saying JSRS, blastcore etc. Really I'm hoping the sound and explosions will have been improved enough that mods like that aren't neccessary. The default sound is arma 2 is really bad so JSRS is pretty much a must for that but I'd like to think they will have done something about that and also improved explosion and smoke effects.
  2. if it counts as a mod, then aside from the obvious ACE and ACRE, I'd like DAC asap.
  3. I have 5 vehicles, I have variable in my init.sqf that says vehicles_destroyed=0. Each time one of the vehicles is killed I have 2 triggers for each vehicle that does the following: Trigger 1A condition - !alive veh1 //checks that veh1 is destroyed onAct - vehicles_destroyed=+1; //adds 1 to vehicles_destroyed so it is now vehicles_destroyed=1 Trigger 1B condition - vehicles_destroyed==1 //checks that vehicles_destroyed number is 1 onAct - hint "vehicle destroyed, 4 vehicles remaining"; //tells player 4 vehicles remain then for the 2nd vehicle: Trigger 2A condition - !alive veh2 //checks that veh2 is destroyed onAct - vehicles_destroyed=+1; //adds 1 to vehicles_destroyed so it should now be vehicles_destroyed=2 if a vehicle has previously been destroyed (which it has when I test) Trigger 2B condition - vehicles_destroyed==2 //checks that vehicles_destroyed number is 2 onAct - hint "vehicle destroyed, 3 vehicles remaining"; //tells player 3 vehicles remain etc. But only the first pair of triggers work. The 2nd vehicles 2nd trigger (Trigger 2B) that checks to see if vehicles_destroyed==2 doesn't work, it is not counting the +1 that was added from the first vehicle being destroyed. What is going wrong here? I need it to +1 to vehicles_destroyed every time a vehicle is destroyed but each trigger ignores the +1 added in the previous trigger.
  4. Now it's not working again, a hint comes up at the mission start saying "vehicle destroyed, 5 vehicles remaining" and then no hints come up when I actually destroy the vehicles, I don't really want to take any more of your time over this though.
  5. Ok it's working now but there's a problem, all the scuds spawn when the mission starts but I want them to spawn through a script when a blufor trigger is activated. e.g. Blufor present condition: this onAct: null = [this] execVM "scudspawns.sqf": nul = [this] execVM "scud1.sqf"; sleep 10; nul = [this] execVM "scud2.sqf"; sleep 10; nul = [this] execVM "scud3.sqf"; sleep 10; nul = [this] execVM "scud4.sqf"; sleep 10; nul = [this] execVM "scud5.sqf";
  6. Ahh right. Yes well there are 2 scripts, the one that actually makes everything work then the one that you select the vehicle/group of vehicles with and set parameters for them. Here is the main script (VehPatrol_fnc.sqf): and here is the script where the scud and it's parameters are spawned from and it's group is named (scud1.sqf): There is also this line in the init.sqf which calls the main script at the start: call compile preprocessfile "VehPatrol_fnc.sqf";
  7. I changed the group names to the names of the groups I'm using so scud1, scud2, scud3, scud4, scud5 all the group names are defined in the scripts that spawns each of them and they work because the final trigger checks the number of alive units is 0 for each of those groups then gives a task completed hint. But if it works for you I must be doing something wrong.
  8. Nice thanks, I want it for specific groups, so how would I put that into the rest of your code? Sorry I'm not too good with editing scripts really.
  9. I think you misunderstood my question, also the triggers that count the units in the vehicle groups don't seem to need the isServer bit for some reason, it already works fine. What I meant was, is in qbt's code there is the bit that says: } forEach [veh1, veh2, veh3, veh4, veh5]; How would I change that script so it isn't doing it by unit names but by group names and is checking the groups have less than one unit in each? Really I don't think I actually need to use that as the vehicle count thing seems to be working ok, and now so is the objects count after adding isServer to the trigger condition. It's strange though how the vehicles one doesn't have that problem, the only difference between the vehicles destroyed and the objects destroyed is the vehicles are spawned through a script and the objects are editor placed.
  10. Hmm, strange thing is though is that I am using this way of counting how many objects have been destroyed to give a message for 2 sets of things. One is for vehicles spawned through scripts which doesn't have the problem of adding more than 1 each time one is destroyed, and the other is for objects destroyed that are just placed in the editor, which is the one that has the count going up 2 each time one is destroyed (and also actually stopped working completely after I destroyed the 3rd object). Why would one work fine and the other not? So you can see what I am doing, here are the triggers for both a vehicle being destroyed (no count issue) and one of the other objects being destroyed (count issue). Also with the vehicles because of how the script is I need to reference them by group name for each one and not unit name, so: Vehicle destroyed Triggers: Trigger 1A Condition: ({alive _x} count units vehicle1) < 1 OnAct: vehicle_count = vehicle_count + 1; publicVariable "vehicle_count"; Trigger 1B Condition: vehicle_count==1; OnAct: titletext ["vehicle neutralised, 4 vehicles remaining.","PLAIN DOWN"]; Object destroyed Triggers: Trigger 2A Condition: !alive foc1 OnAct: deletevehicle foc1; objects_destroyed = objects_destroyed + 1; publicVariable "objects_destroyed"; Trigger 2B Condition: objects_destroyed==1 OnAct: titletext ["Object destroyed, 7 remaining.","PLAIN DOWN"]; ---------- Post added at 11:22 ---------- Previous post was at 11:19 ---------- Thanks for this, if I used that though, since I'm using group names to refer to the vehicles and not unit names (because of the script I'm using, I'd rather be able to use unit names if I could), how would I amend that code so it checks if each group has 0 units left instead of checking if just a unit name is dead?
  11. This doesn't work properly, now each time I destroy one the count goes up by 2 instead of 1, any ideas?
  12. Ok thanks, hopefully that will sort it out. If not, how would you do it using onplayerconnected and GetVariable if you don't mind explaining?
  13. Oh one other thing, do I replace this line in my init: vehicles_destroyed=0; with this one: If (IsNil "vehicles_destroyed") Then {vehicles_destroyed=0}; or do I have both?
  14. Ok so if I did this: Trigger 1A condition - !alive veh1 onAct - vehicles_destroyed = vehicles_destroyed + 1; publicVariable "vehicles_destroyed"; and put that line in my init, that should be fine? Ah I see you edited the post and added that (unless I just missed it originally). Thanks again for your help.
  15. I thought it would be something to do with publicvariable. So which of my triggers in the original post would that go in, 1A or 1B?
  16. I have another question to do with this. As said I have "vehicles_destroyed=0" in my init, then I add 1 to it each time a vehicle is destroyed using vehicles_destroyed = vehicles_destroyed + 1. Then another trigger checks the new count (e.g. vehicles_destroyed==1) then gives a message to say 4 vehicles remaining. This all works but not when it comes to JIP players, I had destroyed 4 of the 5 then reconnected to the dedicated server, when I destroyed the next one it came up saying "4 vehicles remaining. When I reconnected it reset the variable to what it was in the init (vehicles_destroyed=0). How can I make this work for JIP players so that it remembers the current amount of vehicles destroyed? Thanks
  17. Long title but I don't know how to word it any simpler. I'm using a script that opens the ramp on an aircraft, I have got that script to play a sound when the ramp opens. To do this I have just used the "say" command in the script with an .ogg file. The problem with this was only the person running the script could hear it. I then tried using CBA function GlobalSay and GlobalSay3D, both of these made the sound global so now everybody hears it as I want. The problem now is they hear it when the script runs wherever they are on the map at full volume, I only want them to be able to hear it if they are near the aircraft and preferably the further they get away from it the quieter it gets until it's not audible to them. Anybody know how to do this? Thanks.
  18. Sorry but what do I do with this? Do I replace the vehicles_destroyed=+1 with it? Yep just tried it and it works as it's meant to, thanks a lot.
  19. Thanks for that, the guy I've been trying to get it to work with has told me he's already changed that bit so it reads: sound[] = {"\sound\power_down.ogg",db-26.001,1}; and that has got it fine for how he wants it. What do the two 1's mean in the original piece of code ( sound[] = {\sound\power_down.ogg, 1, 1}; ), I'm told the 2nd one is pitch, is the first one volume but you can change it to an actual proper volume in decibels as he's done? edit: nevermind, found the info about that here - http://community.bistudio.com/wiki/Description.ext#cfgSounds
  20. This is the script I'm running the sound from as it is currently (using that CBA function): // openRamp.sqf // © JUNE 2009 - norrin (norrin@iinet.net.au) _vcl = _this select 0; _vcl animate ["ramp_top",1]; _vcl animate ["ramp_bottom",1]; sleep 0.1; _vcl setVariable ["NORRN_openRamp", true, true]; [_vcl, "power_down"] call CBA_fnc_globalSay3d; if (true) exitWith {}; (this script is called from another one, see spoiler if you need to see that too) and here is the cfgsounds from description.ext: class CfgSounds { // List of sounds (.ogg files without the .ogg extension) sounds[] = {power_down}; // Definition for each sound class power_down { name = "power_down"; // Name for mission editor sound[] = {\sound\power_down.ogg, 1, 1}; titles[] = {}; }; }; There is then a folder named sound with the power_down.ogg file inside it.
  21. Thanks for this, I'm sure it will still come in useful at some point.
  22. Hi, I'm using Norrins vehicle respawn with waypoints script, and this is my script file for the waypoints for a vehicle: _unit = _this select 0; _group = group _unit; _waypoint0 = _group addwaypoint[getmarkerpos"WP1",0]; _waypoint0 setwaypointtype"Move"; _waypoint1 = _group addwaypoint[getmarkerpos"WP2",0]; _waypoint1 setwaypointtype"Move"; _waypoint2 = _group addwaypoint[getmarkerpos"WP3",0]; _waypoint2 setwaypointtype"Move"; _waypoint3 = _group addwaypoint[getmarkerpos"WP4",0]; _waypoint3 setwaypointtype"Move"; _waypoint4 = _group addwaypoint[getmarkerpos"WP5",0]; _waypoint4 setwaypointtype"Move"; _waypoint5 = _group addwaypoint[getmarkerpos"WP6",0]; _waypoint5 setwaypointtype"Move"; _waypoint6 = _group addwaypoint[getmarkerpos"WP7",0]; _waypoint6 setwaypointtype"Move"; _waypoint7 = _group addwaypoint[getmarkerpos"WP8",0]; _waypoint7 setwaypointtype"Move"; _waypoint8 = _group addwaypoint[getmarkerpos"WP9",0]; _waypoint8 setwaypointtype"Move"; _waypoint9 = _group addwaypoint[getmarkerpos"WP10",0]; _waypoint9 setwaypointtype"Cycle"; How do I script the waypoint onAct part so I can have something happen to the vehicle (I want to delete it which I already know how to do) when it reaches waypoint 9? I can't find anything about scripting that part of a waypoint anywhere. Thanks
  23. I want to be able to spawn a unit through a trigger and then name them, so that I can then run a script on them to make them move into and patrol a building. I did know how to do it but I lost the page it was on and can't find anything after searching again. Anybody know how? Thanks EDIT: OK I found out how to do that but I have a problem. I am trying to spawn the unit in a trigger and I've tried it multiple ways (blufor present, a unit being dead etc.) but the unit is not created. Here is the code I am using in the triggers onAct: "USMC_Soldier" createUnit [getMarkerPos "spawnmarker", groupAlpha,"housepatrolguy = this", 0.6, "corporal"] What's wrong with this? The faction is present on the map and the group exists, so those aren't the issues, I can't figure it out at all.
  24. Hi, I already have a script that I use to spawn an infantry group on a marker through a trigger, it uses the CBA task patrol function to give the created infantry group some waypoints and sets the combat mode etc. I am looking for basically the same thing but for vehicles, so I could spawn say 3 vehicles that will start randomly patrolling an area. Here is the infantry one I use cut down to show you what I mean: if (!isServer) exitWith {}; _spawnPos = markerPos (_this select 0); _group1 = createGroup EAST; _unit1 = _group1 createUnit ["GUE_Commander", [_spawnPos select 0,_spawnPos select 1,1], [], 1, "FORM"]; sleep 0.2; _unit2 = _group1 createUnit ["ACE_GUE_Soldier_RPG", [_spawnPos select 0,_spawnPos select 1,1], [], 1, "FORM"]; sleep 0.2; [_group1, _spawnPos, 150, 7, "MOVE", "SAFE", "YELLOW", "LIMITED", "WEDGE", "", [3,6,9]] call CBA_fnc_taskPatrol; So basically that will create a group of 2 units that will have 7 "move" waypoints and will move up to 150m away from the marker they are spawned on. I have tried modifying the script to create vehicles instead but this doesn't work. I've also tried using BIS fnc spawnvehicle and the CBA task patrol together as well as a couple of other things and I cannot get vehicles to spawn then use the CBA taskpatrol script. Does anybody know of a way to get this working or know of any existing scripts? The ideal requirements would be: - spawns a group of vehicles with crew inside or adds crew to them upon spawning - able to give the group waypoints, movement and formation types e.g. "MOVE", "AWARE" and "COLUMN" - their movement will be random so they will drive in different directions each time, just like the infantry do in the script posted above Please let me know if you know of anything suitable or have any ideas of how to get this working, thanks.
×