Jump to content

CordIAsis

Member
  • Content Count

    161
  • Joined

  • Last visited

About CordIAsis

  • Rank
    Hardened

Recent Profile Visitors

1003 profile views
  1. Alright, you've made some progression which is good, but there's more to do. See this. _object = createVehicle ["Ural_TK_CIV_EP1", _posx,_posy,_posz [], 0, "CAN_COLLIDE"]; createVehicle when used in this way expects 5 arguments, the second of which should be a position. Positions are represented as an array with 3 elements, each single element being the distance along one axis. [x-coordinate, y-coordinate, z-coordinate] Before I go on I'm going to make a quick fix to your line of code I showed aboved to make explaining easier. You forgot to put a comma after _posz. _object = createVehicle ["Ural_TK_CIV_EP1", _posx,_posy,_posz, [], 0, "CAN_COLLIDE"]; Now, with that comma put in place can you see an issue yet? Exactly, you've supplied 7 arguments instead of 5. You've also passed in the X, Y and Z coordinates as though they are seperate from each other, when in fact they should be integral to each other. Fixing this code is a very simple matter though, you only have to add 2 brackets. Like so, _object = createVehicle ["Ural_TK_CIV_EP1", [_posx,_posy,_posz], [], 0, "CAN_COLLIDE"]; Now we have 5 elements which is perfect and the position is now an array with 3 elements, 1 for each dimension. The last error here is this _object setposatl _posx; _object setposatl _posy; _object setposatl _posz; _posx, _posy and _posz each represent 1 axis out of 3 for a 3 dimensional world. When these values are not put together in an array, what are they? Just numbers, that's it. Let's use this element of _posArray to demonstrate, [22480.2, 19730.2, 0.001]. So _posx has a value of 22480.2, _posy has a value of 19730.2 and _posz has a value of 0.001. So when you run this line for example, _object setposatl _posx; you're basically saying "Put the vehicle at 22480.2 please.". If I told you to walk to 22480.2, would you have any idea where I wanted you to go? Imagine asking a friend where they are and getting the reply "Oh, I'm at 12 and a half.". Doesn't make much sense right? So, remember that a position is defined as an array with 3 elements, 1 for each axis. With that, go ahead and fix that last bit. Let me know when you've fixed it and I'll show you how you can remove about 3/4 of that code, which will make it easier to understand. Also, check this place out. It has good documentation and examples for almost all functions available in ArmA.
  2. Firstly, when you define _posArray you are leaving a comma after the final element. Leaving a comma in an array lets the compiler know that it should expect more elements to come. This is how it should look: _posArray = [ [22680.2,19930.2,0.001], [22580.2,19830.2,0.001], [22480.2,19730.2,0.001] // Removed this final comma. ]; Next, I'm gonna explain the story of this bit of code: _randPos = _posArray call bis_fnc_selectrandom; _pos = _randPos select 0; So, _posArray holds 3 elements (all are arrays) and we set _randPos to be equal to any of the 3 elements in _posArray. Thats this line, _randPos = _posArray call BIS_fnc_selectRandom; Now, let's say we know which element BIS_fnc_selectRandom gave to _randPos. _randPos is now equal to [22680.2, 19930.2, 0.001], which is perfect because we need 3 dimensions. Next, we set _pos to be equal to the first element in _randPos with this line: _pos = _randPos select 0; So, _pos now equals 22680.2. Now, when we go to create the vehicle we are giving createVehicle a position to spawn the vehicle at, [_pos]. _object = createVehicle ["Ural_TK_CIV_EP1", [_pos], [], 0, "CAN_COLLIDE"]; Because you enclosed _pos in brackets createVehicle will read it as though it is an array. Because this is a 3D game and _pos is only holding 1 dimension out of 3, how is ArmA going to know where to put the vehicle? Can you see where you went wrong yet?
  3. Yeah, I've done that myself too but I really wanted to be able to keep the flares in vehicles. The idea behind this was to be able to make every vehicle seem just like a vanilla DayZ/Epoch vehicle, no gun ammo but flares all round.
  4. That deals with the problem in the same way as in my first spolier tag, a-la if (_this isKindOf 'BLAAAAAAAAAH') then { _this removeWeapon 'cannon'; _this removeWeapon 'something'; ....... ..... and so on. }; if (_this isKindOf 'MEHHHHHHHH') then { blah blah blah; }; Which is what I wanted to avoid :)
  5. I'm back! :) I was really poorly for a while but pigs do fly and now I'm fixed :P I've actually been working on CSAT over the past 3-4 days and got quite a few nice extra features implemented, one of which I just I'll get a new set of files out in the next few days.
  6. Soooo, after quite a while of being away (poorly, blah blah) I've finally been able to come back to ArmA scripting about a month ago, woo. And to kick things off I decided to make a solution for a problem I used to see very often and is probably still fairly common now, getting non DZ/DZE suffixed vehicles to spawn without ammo on server restarts or after being bought. (I actually created this as a feature of CSAT!) I've seen solutions where people do something along the lines of- It's a fine solution, if you're only planning on having a few non standard vehicles on your server but it's a gigantic pain in the arse when you want as many vehicles as you can get. This is where my solution comes into play, it's a single function that is run on every vehicle on server start or on being bought or whatever and will remove every magazine from the vehicle with the exception of the pilot's flares and horn. Installation is fairly straight forward too, which is always nice :) Step 1: At the very top of your server_functions.sqf file add this little nugget (And create the corresponding file, serverside): Step 2: Wherever the file is you chose to create, add this into it: This works by over-writing your default fnc_veh_ResetEH, but only serverside so clients don't need to download extra mission data to get a new version of it. fnc_veh_ResetEH is called on every vehicle that is bought or spawned naturally in the world so it will affect every single vehicle. It's also important that you ExecVM your new file from the very top of server_functions.sqf because it needs to catch and replace the default fnc_veh_ResetEH before any vehicles start being made. I can't be sure how it'll affect server start times on servers with hundreds of vehicles but on my dev server with a whopping 16 vehicles it made no difference. Credit where it's due: Thanks to DenVdmj for the post found here, if I didn't find that I'd be still banging my head against my keyboard trying to figure out how to get turret paths correctly. I've not tried it, but if you wanted to also apply this to vehicles that spawn at missions you could put this- inside wherever it is your mission system spawns it's vehicles and just replace _this with whatever variable references the mission vehicle. (No promises) Enjoy! It's nice to be back :)
  7. All files released free to use. See the original post for the download.
  8. Thankyou guys, I really appreciate that you're not at all sore about this news, I feel a lot of relief now. And thankyou for well-wishing my health! I'll be back on in about a week or so to keep updated.
  9. While packing my admin tool up I remembered I had this piece of code which is exactly what you need. handler = (findDisplay 72) displayAddEventHandler ['unload','_this spawn {hintSilent ""; (_this select 0) displayRemoveEventHandler ["unload",handler];};']; Stick that just after your hintC call and all should be good. Good luck.
  10. Guys, I know it's been a while since I've been on and I'm sorry to you guys who were looking forward to using it. Bad news and (kinda) good news. Bad: I have become very ill, meaning development on this has ended. I don't have enough energy to be able to do any of this stuff. Good: The source, including all extra files and the DLL for logging/bans is up for grabs for someone to continue the work if anyone would like to. If anyone is interested to take this on there are a few things to note: There is not a single comment in all ~3000 lines of code, they break the script past line ~60. If you are not very fluent in Arma scripting it will make no sense to you whatsoever. I will not pass the code onto just anyone, I want to know the person is more than capable of actually completing it. There is also one very important rule you must abide by if you want to continue work on this. You do NOT, in any way, make ANY monetary or equivelant gain off of this code. This includes trading it for services or goods. It doesn't matter if you completed it, you are not allowed. Once again, I'm sorry that I kept you guys waiting so long. If you're interested in continuing this on yourself send me a message on here and I'll get back to you when I can.
  11. You also didn't say you weren't running it, so I thought I would be as clear as I could be.
  12. I'm not entirely familiar with the config of Overwatch, in terms of Overpoch, but I know that the 'sigisolda' isn't in the default Epoch config.
  13. The M107 rifle is a semi-automatic weapon, there's no need to reload between each shot.
  14. So, between real life stuff and developing CSAT I try to play Epoch, but it's damn boring isn't it. I just server surf. 30 minutes on a server and I'm so bored I feel like head butting the wall for 30 minutes would be more fun. It just seems like no one talks anymore and 'manners' and 'respect' are more like artefacts than actual words in the DayZ/Epoch world. I couldn't care less if you're a clan or just a random group who play together, if you want a FNG let me know. I've gotta try find some fun in this game before I give it up as a bad job. I'm 22 so people around that age or older I'd be happy to play with. There should be a Lonely Hearts sub-forum.... :lol:
×
×
  • Create New...