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

Somerville

Member
  • Content Count

    154
  • Joined

  • Last visited

  • Medals

Everything posted by Somerville

  1. Ahh, thanks for the help
  2. Morning all, I've been trying to get this working. The below is a script that is designed to spawn an empty T72, but to try and make it 'enemy' so that an A10 can lock on to it. However, it just shows as a white dot on the radar and won't lock on no matter how many times I fly past. Here is the script: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?!(local Server): exit _Xpos = _this select 0 _Ypos = _this select 1 _Xspread = _this select 2 _Yspread = _this select 3 time = _this select 4 targets = _this select 5 localtargetcounter = 0 showresult = false Publicvariable "showresult" TargetHits = 0 publicVariable "TargetHits" Targetmiss = 0 publicVariable "Targetmiss" targetcount = 0 publicVariable "Targetcount" #loop _X = _Xpos _Y = _Ypos _X = _X + (random _Xspread - _Xspread /2) _Y = _Y + (random _Yspread - _Yspread /2) _target = "T72" createvehicle [_X,_Y,0] _grp1 = createGroup EAST _spawndrive = "SquadLeaderE" createUnit [position _target, _grp1,"spawndrive = this",1,"PRIVATE"] spawndrive moveInDriver _target _target setSide OPFOR _driver disableAI "MOVE" _markerf = createMarker ["Fired", position _target] "Fired" setMarkerSize [250, 250] "Fired" setMarkerColor "ColorRedAlpha" "Fired" setMarkerShape "ELLIPSE" ~240 deleteMarker "fired" targetcount = targetcount + 1 Publicvariable "Targetcount" localtargetcounter = localtargetcounter + 1 testnumber1 = localtargetcounter Publicvariable "testnumber1" testnumber2 = targets Publicvariable "testnumber2" timecount = 0 #Time showhint = false Publicvariable "Showhint" ~0.25 ?(getdammage _target > 0.1) : goto "hit" timecount = timecount + 0.25 ?timecount < time : goto "time" _target setdammage 1 Targetmiss = Targetmiss + 1 Publicvariable "Targetmiss" ~1 showhint = true Publicvariable "Showhint" goto "next" #Hit _target setdammage 1 TargetHits = Targethits + 1 Publicvariable "TargetHits" ~1 showhint = true Publicvariable "Showhint" goto "next" #next ~2 deletevehicle _target ~2 ?localtargetcounter >= targets : showhint = true; Publicvariable "Showhint"; goto "end" goto "loop" #end testinprogress = false Publicvariable "testinprogress" showresult = true Publicvariable "showresult" testnumber1 = 0 Publicvariable "testnumber1" testnumber2 = 0 Publicvariable "testnumber2" I hope you can help Thanks, Somerville
  3. Evening all! Up for Public Beta is Sahraniville, an RPG Map I started working on not long after I bought an import of the Czech version of Armed Assault, those many moons ago. Originally, it was based on CrimeCity scripts from OFP. However, the main issue was Join in Progress. So, I shall tell thee a tale, as I am bored: I made a new version - from scratch. I based the Shops and Money on SPON_Core & Money (I love you Spooner). Spooner was a great help - always willing to respond to a question with helpful advice. There were many other helpful individuals, too, and I'm really grateful to you all So, why has it taken so long? Numerous factors - I'm in a clan, and that takes up a lot of time; other games, university, housework... lots of stuff really. I've reached a point now where I've decided that it's best if I let you have it, play around with it, see what you think and, hopefully, provide some feedback. A lot of the bugs have been ironed out, but there's probably more that'll be found. You can find a bug tracker here, and a developer's blog here. If you want a few pictures, there will be some below. What is Sahraniville? Sahraniville is a Roleplaying Map for Armed Assault. It was originally started ages ago, but has undergone a total revamp since the first version. Yay. What do you do? Well, you either play as a cop or a civilian - kinda like CrimeCity for OFP. As a civilian, you either follow the law, or break it. Cops simply uphold the law but, as you may have worked out, can be corrupt, too. Where can I get it? I'm hoping others will host the mission file, and maybe even the addons required, but we shall see. For now, you can click here. I prefer to use Yoma's Addon tool for Armed Assault, so I've set up one of these for Sahraniville. You can find a guide to setting that all up here. The addons shouldn't take too long to download, as long as you're not on a 56K modem. So yeah.. before you play it, I know it's not amazing, and it's not as good as other RPG maps, but I still hope people will play and enjoy it There is a 24/7 Sahraniville server running, lovingly hosted by -{GOL}- Thanks for reading, hope you enjoy the map - constructive criticism would be appreciated Pickchaz [ig]http://www.gol-clan.net/sahraniville/pictures/jail1.jpg[/img] [ig]http://www.gol-clan.net/sahraniville/pictures/jail2.jpg[/img] [ig]http://www.gol-clan.net/sahraniville/pictures/jail3.jpg[/img] [ig]http://www.gol-clan.net/sahraniville/pictures/blood.jpg[/img] [ig]http://www.gol-clan.net/sahraniville/pictures/graves.jpg[/img] To Editors I don't mind if you edit it - all I ask is that you credit the Sahraniville team for their work thus far. Alternatively, why not ask to work with us?
  4. Somerville

    Sahraniville - An RPG Map for ArmA

    Hi guys, Sorry about the pictures, and the confusion. 1) The 24/7 Server is called -{SAHRANIVILLE}-. However, simply entering "gol" into the server-name filter will bring up the server for you 2) I did write some rules/guidelines/laws... I'll post these later. They need changing, since the mission layout has changed a lot since I first made it. I'll work on it, though! Here's a few rough things though: <ul> [*]New Life Rule - When a unit dies, they CANNOT remember what happened before they died! I.e. You won't remember who shot you. [*]Cop Powers - Cops can and will use their powers. They can detain you in custody (Paraiso Airfield) if they suspect you of a crime. The recommended maximum detention period is 10 minutes, after which the detainee should be charged or released. IF charged, they can be sent to prison for the allotted Jail-time of 10 minutes
  5. Hi all, So I'm working on an RPG map, Sahraniville, and so far it's all going fantastically - work is progressing well, and with the help of numerous members of this forum, we've overcome some scripting obstacles. However, we've encountered a few more, and I'm hoping someone can share some words of wisdom with me Firstly, the scripts; the first script is actions.sqf: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _array = [c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22]; waitUntil {alive player}; if (side player == west) then { { _x addaction ["Arrest Civilian", "arrest.sqs"]; _x addaction ["Fine Civilian", "fine.sqf"]; _x addaction ["Disarm Civilian", "disarm.sqf"]; _x addAction ["Check Car Licence", "clicence.sqs"]; _x addAction ["Check Gun Licence", "glicence.sqs"]; } foreach _array; player addaction ["Stats", "stats.sqf"]; } else { player addaction ["Hands Up", "HandsUp.sqs"]; player addaction ["Stats", "stats.sqf"]; }; As you can see, it makes sure the player is 'alive' before adding the actions to the array. Now, the issue is, when a player joins-in-progress, unless the AI are enabled, the player has no actions. Which is wierd, because I thought at least the actions would be duplicated for existing units? Anywho, the next issue. In Init.sqf, I have put the following: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> player addeventhandler ["killed", {_this execVM "was_killed.sqf"}]; ... And Was_killed.sqf is: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> waitUntil {alive player}; player execVm "actions.sqf"; Which doesn't do anything *profanities, hair tearing*. I'm new to SQF, but I've been told SQS is 'dirty', so I should stay away. I didn't really want to have a trigger for each unit to run the actions for each unit, but if that's the best option in your opinion, I shall opt for it. Can anyone suggest any way to make it work with players who JIP? I can't really ID the actions, because _id is local, and it's not worth tying global variables to actions (or is it?).. any help, pointers or whatever is very much appreciated Somerville
  6. Thanks for the reply, UNN I've not made a public array before - how does it work? Is there any chance you can put together a small example for me? Pwetty pweese? Edit: Okay, I've looked at the Wiki - at ObjNull, isNull, and isNull_grp. What I seem to read of isNull_grp is that it checks if Any_value == isNull_grp. So am I correct in assuming you'd need to create a variable along the lines of "PlayerJIP == true", then check if this variable was true/false before adding actions, right?
  7. Bugger me, this is annoying! Nothing seems to be working! Thanks for the suggestion Odin, but that doesn't seem to work Basically, with the current version in the first post, it works fine. It doesn't work, however, if a unit joins in progress. Anyone who plays from the beginning gets the actions, and I think it works if you leave the AI on. However, that means a load of markers and players cluttering up the map needlessly. Also, the actions don't work when the unit respawns. The problem with actions.sqf above is that it doesn't detect if the unit already has the actions, so you'll end up with units who have duplicate actions, right? Is there any way to stop this, so that units that respawn get the actions again, but those who already have them don't? Please help, I'm literally sobbing now - this is the last issue I need to fix before I can release it - I'll kiss whoever fixes it/helps fix it. Honestly. The other issue, of course, is join in progress - however, all I need to know here is how to check if the actions have already been added and, if so, how to prevent it from being re-added. If I was, for example, to put in a variable - let's say, actions = false, and then declare that as 'true' at the bottom of actions.sqf.. then in the was_killed.sqf say: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ?(actions = TRUE) : exit Hope someone can help - I'm really stuck here
  8. Okay, thanks Odin Is there a way to make ArmA check if the actions are already on the unit, and only then to add the actions to a unit that doesn't have them? Or would it be best just to have 'west' actions script, and 'civilian' actions script, run from the init line of each unit? Edit: Hmm - that doesn't seem to work on our dedicated server. I'm having a tweak with it now, see if I can make it work
  9. Somerville

    Join In Progress Actions

    Hi, So, basically, the above seems to be working with Join in Progress. However, it's not working when a unit dies - they respawn without the actions. I put this into my init.sqf: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player addeventhandler ["killed", {_this execVM "actions.sqf"}]; So that it runs: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (side player == west) then { { _x addaction ["Arrest Civilian", "arrest.sqs"]; _x addaction ["Fine Civilian", "fine.sqf"]; _x addaction ["Disarm Civilian", "disarm.sqf"]; _x addAction ["Check Licence", "clicence.sqs"]; } foreach [c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22]; player addaction ["Stats", "stats.sqf"]; } else { player addaction ["Hands Up", "HandsUp.sqs"]; player addaction ["Stats", "stats.sqf"]; }; However, the problem I can see with this is that it will add the action to all units - C1, C2, C3 etc... regardless of whether or not they have the action already. Is this the case? Is there a way around this at all?
  10. Hi guys, I've got a bit of a problem, but hopefully you can help. I've got 22 civilians, each of whom has the same actions for any player on the WEST side. Here is what I have so far in my init.sqf to add these actions: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (side player == WEST) then { c1 addaction ["Arrest Civilian", "arrest.sqs"]; c1 addaction ["Fine Civilian", "fine.sqf"]; c1 addaction ["Disarm Civilian", "disarm.sqf"]; c1 addAction ["Check Licence", "clicence.sqs"]; c2 addaction ["Arrest Civilian", "arrest.sqs"]; c2 addaction ["Fine Civilian", "fine.sqf"]; c2 addaction ["Disarm Civilian", "disarm.sqf"]; c2 addAction ["Check Licence", "clicence.sqs"]; c3 addaction ["Arrest Civilian", "arrest.sqs"]; c3 addaction ["Fine Civilian", "fine.sqf"]; c3 addaction ["Disarm Civilian", "disarm.sqf"]; c3 addAction ["Check Licence", "clicence.sqs"]; C4 addaction ["Arrest Civilian", "arrest.sqs"]; c4 addaction ["Fine Civilian", "fine.sqf"]; c4 addaction ["Disarm Civilian", "disarm.sqf"]; c4 addAction ["Check Licence", "clicence.sqs"]; C5 addaction ["Arrest Civilian", "arrest.sqs"]; c5 addaction ["Fine Civilian", "fine.sqf"]; c5 addaction ["Disarm Civilian", "disarm.sqf"]; c5 addAction ["Check Licence", "clicence.sqs"]; C6 addaction ["Arrest Civilian", "arrest.sqs"]; c6 addaction ["Fine Civilian", "fine.sqf"]; c6 addaction ["Disarm Civilian", "disarm.sqf"]; c6 addAction ["Check Licence", "clicence.sqs"]; C7 addaction ["Arrest Civilian", "arrest.sqs"]; c7 addaction ["Fine Civilian", "fine.sqf"]; c7 addaction ["Disarm Civilian", "disarm.sqf"]; c7 addAction ["Check Licence", "clicence.sqs"]; C8 addaction ["Arrest Civilian", "arrest.sqs"]; c8 addaction ["Fine Civilian", "fine.sqf"]; c8 addaction ["Disarm Civilian", "disarm.sqf"]; c8 addAction ["Check Licence", "clicence.sqs"]; C9 addaction ["Arrest Civilian", "arrest.sqs"]; c9 addaction ["Fine Civilian", "fine.sqf"]; c9 addaction ["Disarm Civilian", "disarm.sqf"]; c9 addAction ["Check Licence", "clicence.sqs"]; C10 addaction ["Arrest Civilian", "arrest.sqs"]; c10 addaction ["Fine Civilian", "fine.sqf"]; c10 addaction ["Disarm Civilian", "disarm.sqf"]; c10 addAction ["Check Licence", "clicence.sqs"]; C11 addaction ["Arrest Civilian", "arrest.sqs"]; c11 addaction ["Fine Civilian", "fine.sqf"]; c11 addaction ["Disarm Civilian", "disarm.sqf"]; c11 addAction ["Check Licence", "clicence.sqs"]; C12 addaction ["Arrest Civilian", "arrest.sqs"]; c12 addaction ["Fine Civilian", "fine.sqf"]; c12 addaction ["Disarm Civilian", "disarm.sqf"]; c12 addAction ["Check Licence", "clicence.sqs"]; C13 addaction ["Arrest Civilian", "arrest.sqs"]; c13 addaction ["Fine Civilian", "fine.sqf"]; c13 addaction ["Disarm Civilian", "disarm.sqf"]; c13 addAction ["Check Licence", "clicence.sqs"]; C14 addaction ["Arrest Civilian", "arrest.sqs"]; c14 addaction ["Fine Civilian", "fine.sqf"]; c14 addaction ["Disarm Civilian", "disarm.sqf"]; c14 addAction ["Check Licence", "clicence.sqs"]; C15 addaction ["Arrest Civilian", "arrest.sqs"]; c15 addaction ["Fine Civilian", "fine.sqf"]; c15 addaction ["Disarm Civilian", "disarm.sqf"]; c15 addAction ["Check Licence", "clicence.sqs"]; C16 addaction ["Arrest Civilian", "arrest.sqs"]; c16 addaction ["Fine Civilian", "fine.sqf"]; c16 addaction ["Disarm Civilian", "disarm.sqf"]; c16 addAction ["Check Licence", "clicence.sqs"]; C17 addaction ["Arrest Civilian", "arrest.sqs"]; c17 addaction ["Fine Civilian", "fine.sqf"]; c17 addaction ["Disarm Civilian", "disarm.sqf"]; c17 addAction ["Check Licence", "clicence.sqs"]; C18 addaction ["Arrest Civilian", "arrest.sqs"]; c18 addaction ["Fine Civilian", "fine.sqf"]; c18 addaction ["Disarm Civilian", "disarm.sqf"]; c18 addAction ["Check Licence", "clicence.sqs"]; C19 addaction ["Arrest Civilian", "arrest.sqs"]; c19 addaction ["Fine Civilian", "fine.sqf"]; c19 addaction ["Disarm Civilian", "disarm.sqf"]; c19 addAction ["Check Licence", "clicence.sqs"]; C20 addaction ["Arrest Civilian", "arrest.sqs"]; c20 addaction ["Fine Civilian", "fine.sqf"]; c20 addaction ["Disarm Civilian", "disarm.sqf"]; c20 addAction ["Check Licence", "clicence.sqs"]; C21 addaction ["Arrest Civilian", "arrest.sqs"]; c21 addaction ["Fine Civilian", "fine.sqf"]; c21 addaction ["Disarm Civilian", "disarm.sqf"]; c21 addAction ["Check Licence", "clicence.sqs"]; C22 addaction ["Arrest Civilian", "arrest.sqs"]; c22 addaction ["Fine Civilian", "fine.sqf"]; c22 addaction ["Disarm Civilian", "disarm.sqf"]; c22 addAction ["Check Licence", "clicence.sqs"]; player addaction ["Stats", "stats.sqf"]; } else { player addaction ["Hands Up", "HandsUp.sqs"]; player addaction ["Stats", "stats.sqf"]; }; However, I have an issue in trying to make these actions happen for all players, even those who join in progress. Currently, it works for all players who start the map at the same time. However, it does not work for join in progress players. Is there a way of telling ArmA "Check if the actions are already on the unit - if they are, go away, if not, add them"? I'm not sure if naming each action would help - y'know, _arrestc1 = c1 addAction ["Blah", "blah.sqs"].. but surely there's a more efficient way?
  11. Somerville

    Join In Progress Actions

    Ah, I see - many thanks Any thoughts as to how Join In Progress will act with regards to this?
  12. Morning people! Sorry if this seems very straight forward, but I'm struggling to get my head around "addPublicVariableEventHandler". I'm using SPON_Money for Sahraniville, a Roleplaying mission, but I can't seem to get the fines to work. I've e-mailed the developer of SPON_Money/Core, and he suggested trying addPublicVariableEventHandler. There are two variables - one is SPON_PlayerBankBalance, the other SPON_PlayerCashBalance. I've been told that I can't use CashBalance. I am trying to make it so that when a police officer hits the "Fine $1,000 option", the unit in question has that amount removed from their bank account. I had some help from a chap called DeChevs, who provided the following, which he advised to put into my init.sqf: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">fine = []; "fine" addPublicVariableEventHandler {if (player == _civilian) then {SPON_playerBankBalance = SPON_playerBankBalance - _fine; _civilian groupchat format ["You were fined $%1 by the establishment!", _fine];}else{_officer groupchat ["%1 fined.", _civilian];};}; The action "Fine" for the cop executes the following: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_civilian = _this select 0; _officer = _this select 1; _fine = 1000; switch (side player) do { case CIVILIAN: {if (SPON_playerBankBalance < _fine) then {player globalchat "I can't afford the fine." }else{ SPON_playerBankBalance = SPON_playerBankBalance - _fine; player globalchat "I paid the fine.";};}; case WEST: {_msg=Format["I gave %1 a fine.", _civilian]; _officer globalchat _msg;}; }; But this does not seem to work. Originally I tried a CrimeCity style BankBalance = BankBalance - Fine, but that took the money away from every unit that was alive, and I can't figure out a way around it! Any help will be very much appreciated fellas
  13. Yay! JasonO suggested that in the Init.sqf I put this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">fine = []; fine_player = []; "fine" addPublicVariableEventHandler {if (player == fine_player) then {_civilian = fine_player; SPON_playerBankBalance = SPON_playerBankBalance - fine; _civilian groupchat format ["You were fined $%1 by the establishment!", fine];}else{_officer groupchat ["%1 fined.", _civilian];};}; And fine.sqf should be this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_civilian = _this select 0; _officer = _this select 1; _fine = 1000; fine_player = _civilian; publicvariable "fine_player"; fine = _fine; publicvariable "fine"; _msg=Format["I gave %1 a fine of $%2", _civilian,_fine]; _officer globalchat _msg; And it works - thanks for all ze help everyone
  14. Oh noez.. still doesn't work - just tried testing with another player, and their money doesn't get taken away either I've now got this: Finez.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">fine = []; fine_updateFunction = { fine = _this; publicVariable "fine"; // send fine var over the network _this call fine_function; // call the fine function also on this machine, because the pvEH will not trigger on the sending machine by default }; fine_function = { private ["_civilian", "_officer", "_fine"]; _civilian = _this select 0; _officer = _this select 1; _fine = 1000; if (player == _civilian) then { SPON_playerBankBalance = SPON_playerBankBalance - _fine; _civilian groupchat format ["You were fined $%1 by the establishment!", _fine]; } else { _officer globalchat ["%1 fined.", _civilian]; }; }; switch (side player) do { case CIVILIAN: {if (SPON_playerBankBalance < _fine) then {player globalchat "I can't afford the fine." }else{ SPON_playerBankBalance = SPON_playerBankBalance - _fine; player globalchat "I paid the fine.";};}; case WEST: {_msg=Format["I gave %1 a fine.", _civilian]; _officer globalchat _msg;}; }; "fine" addPublicVariableEventHandler { (_this select 1) call fine_function; // (_this select 1) contains the value of "fine" pv, at the time of the event };
  15. Okay chappies! Just done a quick MP Test and sadly, it doesn't appear to be working. I say this only because it does not hint when the player had paid the fine. Although I'm only testing on AI on our dedicated server, it doesn't work *weeps* So, I've got the "finez.sqf" script that I call from my init.sqf, which reads what you have placed above, Sickboy Then, for the "Fine.sqf" which is called when the officer approaches the unit and gives the fine, displays: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[_civilian, _officer] call fine_updateFunction; Am I missing something here? Sorry, it's probably because it's early(ish).. I am very much grateful for the help thus far though
  16. Cheers, guys, thanks for all the help! SickBoy, I love you - I'll test that out and see how it works! Edit: Okay, so I'm trying this in Single Player at the moment, but it's not 'hinting' that the fine has happened.. I'll try it in MP as well to see if it works there
  17. Hi guys, Thanks for all the help so far What I've got is a situation where it can be called from any 1 of 22 playable civilians. The cop walks up, hits the "Fine" option. What I basically need is for the money to come off of the civilian who has been fined. So I guess it's a situation where it only needs to be PublicVariabled on the client end..?
  18. So it doesn't work, or won't work, on our clan's dedicated server? Bugger.. Does anybody know a way around this? Pretty please?
  19. Oopps, my bad - that's from an older version. It's supposed to be just "Fine" - I realised you can't use local variables for it I thought you need not PublicVariable it if you use addPublicVariableEventHandler?
  20. Hi, My Mic works fine over Teamspeak - no staticy-nastiness. However, with VoIP it just transmits static apparantly. I am using an ASUS Striker Extreme, with the sound card that comes with it. Anyone know of any possible way to fix this? I have tried searching Google/here but I can't seem to find anything >< Cheers,
  21. Somerville

    Microphone too loud

    Hi, Sorry to bother you lot with this, but I am at my wits' end >< I recently upgraded my Mobo to an ASUS Striker Extreme. This comes with a Superbeam SoundMax microphone. At the moment, without Microphone boost on, I can record myself from my bedroom upstairs and hear it clearly. I'm wondering if anyone knows a solution to this, so I don't have to play ArmA from outside my flat in order to stop the staticy-nastiness? I've checked the settings, but I can't see where I've gone wrong. Please help!
  22. Hi, I've got the following config, but it seems to add a gunner position to the vehicle >< Can anyone tell me what's wrong with it? <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#define true 1 #define false 0 #define private 0 #define protected 1 #define public 2 #define TEast 0 #define TWest 1 #define TGuerrila 2 #define TCivilian 3 #define TSideUnknown 4 #define TEnemy 5 #define TFriendly 6 #define TLogic 7 #define VSoft 0 #define VArmor 1 #define VAir 2 #define LockNo 0 #define LockCadet 1 #define LockYes 2 #define ReadAndWrite 0 #define ReadAndCreate 1 #define ReadOnly 2 #define ReadOnlyVerified 3 class CfgWeapons { class Default {}; class CarHorn: Default {}; class SportCarHorn: CarHorn {}; class Siren1: SportCarHorn { displayName="Siren Long"; drySound[]={"\sva_polcar\Siren\siren1.ogg",40.000000,1}; }; class SirenShort: SportCarHorn { displayName="Siren Short"; drySound[]={"\sva_polcar\Siren\siren_short.ogg",40.000000,1}; }; }; class CfgPatches { class sva_polcar { units[] = {"sva_polcar"}; weapons[] = {}; requiredVersion = 1.0; requiredAddons[] = {}; }; }; class CfgVehicleClasses { class sva_polcar { displayName = "SahraniVille - Car"; }; }; class CfgVehicles { class Land; // External class reference class LandVehicle : Land { }; class Car : LandVehicle { class HitEngine { armor = 1.2; material = 60; name = "motor"; visual = "motor"; passThrough = true; }; class HitRGlass { armor = 0.5; material = -1; name = "sklo predni P"; passThrough = true; }; class HitLGlass { armor = 0.5; material = -1; name = "sklo predni L"; passThrough = true; }; class HitBody { armor = 0.4; material = 51; name = "karoserie"; visual = "karoserie"; passThrough = true; }; class HitFuel { armor = 1.4; material = 51; name = "palivo"; passThrough = true; }; class HitLFWheel { armor = 0.05; material = -1; name = "Levy predni tlumic"; visual = "Levy predni"; passThrough = true; }; class HitRFWheel { armor = 0.05; material = -1; name = "Pravy predni tlumic"; visual = "Pravy predni"; passThrough = true; }; class HitLF2Wheel { armor = 0.05; material = -1; name = "Levy dalsi tlumic"; visual = "Levy dalsi"; passThrough = true; }; class HitRF2Wheel { armor = 0.05; material = -1; name = "Pravy dalsi tlumic"; visual = "Pravy dalsi"; passThrough = true; }; class HitLMWheel { armor = 0.05; material = -1; name = "Levy prostredni tlumic"; visual = "Levy prostredni"; passThrough = true; }; class HitRMWheel { armor = 0.05; material = -1; name = "Pravy prostredni tlumic"; visual = "Pravy prostredni"; passThrough = true; }; class HitLBWheel { armor = 0.05; material = -1; name = "Levy zadni tlumic"; visual = "Levy zadni"; passThrough = true; }; class HitRBWheel { armor = 0.05; material = -1; name = "Pravy zadni tlumic"; visual = "Pravy zadni"; passThrough = true; }; getInAction = "GetInMedium"; getOutAction = "GetOutMedium"; supplyRadius = 1.2; driverAction = "ManActTestDriver"; cargoAction[] = {"ManActTestDriver"}; hideUnitInfo = false; class Exhausts; // External class reference castDriverShadow = false; castCargoShadow = false; }; class sva_polcar : Car { selectionBackLights = "brzdove svetlo"; selectionBrakeLights = "light_brake"; vehicleClass = "sva_polcar"; scope = public; model = "\sva_polcar\car_sedan.p3d"; Picture = "\Ca\wheeled\data\ico\car_sedan_CA.paa"; Icon = "\Ca\wheeled\data\ico\car_sedan_CA.paa"; mapSize = 6; terrainCoef = 2; turnCoef = 2.500000; accuracy = 0.500000; fuelCapacity = 60; displayName = "Police Sedan"; side = 1; maxspeed = 150; crew = "SoldierWB"; nameSound = "humvee"; weapons[] = {CarHorn,sirenshort,Siren1}; magazines[] = {}; armor = 60; type = VArmor; cost = 100000; armorGlass = 0.5; armorWheels = 0.15; soundEngine[] = { "\sva_polcar\engine.wav", 0.027783, 1.200000 }; soundGear[] = { "\sva_polcar\gear.wav", 0.000178, 1 }; SoundGetIn[] = { "\ca\wheeled\Data\Sound\4WD_DoorOpenClose1", 0.100000, 1 }; SoundGetOut[] = { "\ca\wheeled\Data\Sound\4WD_DoorOpenClose1", 0.031623, 1 }; soundServo[] = {"\ca\wheeled\Data\Sound\servo3", db-40, 1.0}; typicalCargo[] = {"Civilian"}; transportSoldier = 3; canfloat = true; hasGunner = 0; castDriverShadow = true; driverIsCommander = true; driverAction = "Skodovka_Driver"; cargoAction[] = { "Skodovka_Cargo01" }; canLock = LockNo; unitInfoType = "UnitInfoSoldier"; // threat (VSoft, VArmor, VAir), how threatening vehicle is to unit types threat[] = {1, 0.1, 0.4}; }; };
  23. Hi, I've got 20ish units, each named, that has actions that can be access by any WEST unit. Here's the script that adds the actions initially: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _this select 0 ?!(side player == west) : exit _unit addaction ["Arrest Civilian","arrest.sqs"] _unit addAction ["Check License", "clicense.sqs"] exit Now, there's a trigger for each unit detecting if the unit has died, with !alive **UNITNAME** as the condition. It executes the following script: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _this select 0 ?!(player == _unit) : exit @(alive _unit) ~1 [] exec "arrestactions.sqs" exit However, it's not 'readding' the scripts as I would expect it to. Can anyone tell me where we're going wrong with this?
  24. Hi guys, I've got the following script: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _this select 0 ?(_unit = typeOf BLUE_TL) : goto "swatkick" ?(_unit = typeOf BLK_2) : goto "copkick" ?!(side player == WEST) : exit exit #swatkick (_unit setpos (getpos back)) hint "You're not allowed there!" exit #copkick (_unit setpos (getpos back)) hint "You're not allowed there!" exit But this doesn't work. It's basically designed to stop SWAT units from buying cops' weapons, and vice versa. Can anyone tell me what's wrong with this? Or if there's a better solution?
  25. Somerville

    typeOf problem!

    I'm not a hugely advanced scripter - hence the use of SQS. However, I'm learning SQF slowly but surely The reason I can't really use the above suggestion is because I am using SPON Money. As such, you can't restrict one shopkeeper without restricting all of them. I've simply used a trigger now that doesn't transport you away, but closes the dialog if it's called and hints that he cannot sell you anything. The thing now is to stop civilians entering the police department. I dont' want them to die, though - perhaps a simple way to operate it would be similar to the above, simply by hinting that, when they try to buy weapons, they cannot because they're not a cop? I'll look into it though - but if anyone wants to offer any help, feel free - the more the merrier
×