Chuc
Member-
Content Count
202 -
Joined
-
Last visited
-
Medals
Everything posted by Chuc
-
nah no good cant work it out. Spent over 3 hours trying to work it out and i just cant seem to get it done. All ravage cars spawned with the module only get backpack loot. This is probably gonna keep me up all night.
-
So after around 2 hours i managed to get the script to loop, for every vehicle. So i was getting full inventory. The car i placed in the editor is a gun nuts heaven. So i thought i would go look for a ravage vehicle to see if they were going through the same thing. Well they were, but only backpacks. Alot of backpacks and respawn camps. I went though heaps of code to figure out how to do it but it is apparently over my head at this time. Considering the way i got it to work shouldn of taken me this long to figure out. All in all i know more about scripting now, after reading so damn much about it. Any help you could give me would be appreciated. All i did in the end was add an extra { before the pistol loot and then added }forEach ["all the custom cars i added to the vehicle module"] after the CBA function. So i couldnt figure out how to "set a variable for the car that has added loot and what is not". I understand what is means but i just couldnt figure it out. giving it one more go, i had an idea
-
Okay. Ill look into it but thats getting abit more then i really know atm but ill try. Edit: So a variable is that private part thats in the radiation script i posted before?
-
@GEORGE FLOROS GR You seem to know what you on about. Did you see my vehicle loot script? It loads a vehicle up with random loot from a list of loot. Now it works perfect for your random vehicle spawn script out of your Salvation mission. But the oddest thing is going on with the ravage vehicle module. What is happening is this. The module is set to wrecks only, doesnt really matter which it does the same for all of them, cache at 750 and no burning car. My vehicle loot script is fired form my initServer.sqf. A placed car next to my test spawn is getting the right loot but ravage vehicles are only getting the backpacks. Backpacks being the last in the script to be placed in a vehicle. Even if i fire the script directly into the modules init (first time i thought of that) the same result is happening. Ill post the script here. Someone may want it aswell. VehicleLoot.sqf
-
So going to bring up the radiation question again because it hasn't been answered yet, as far as i can tell. I would like to know 2 things about the radiation. First. How would i go about making a radiation zone spawn from a script? Second. I have a radiation script that was modified last year some time by me and some others on these forums. I cant remember who. Was wondering if anyone would know how to add ravage radiation to it so you get the ravage rad poisoning and how to make it so you take damage over time not just dead after a set time in the zone. Also how to add the other 2 gas masks to it, so far i only have the one working with it. radiation.sqf
-
edited the OP and title to give the scripts to people looking for them. I still haven't found a random vehicle loot script outside of exile or epoch mods. Sorry for any spelling mistakes or grammar issues in this thread, Kids are making it difficult.
-
So i have made a half arsed script to spawn loot into vehicles. It works quite well. Any vehicle on the map that defines as a "car" will have my random array of loot spawn into it. You get 4 guns with random amount of ammo, sometimes not for the guns in the car. You get some clothes, vests, food, items and backpacks all random amounts. The problem i have it that each car will have the exact same Guns in them but everything else will be different. I have another script that spawns random cars all over, i went to a few of them each time i ran a test and they all had the same guns but everything else was different. I edited the loot script alot but still cant seem to figure out why the guns are all the same. So im here to see if anyone can help me. Original Script. Didnt work to good THis is an edited one that will weapons form there arrays at random and add ammo for them. Should be random for each car. This is my finished script that will spawn guns and ammo at random. Luck of the draw if you happen to get ammo with the guns in the car. Should be random for every car spawned or placed in editor Feel free to use these scripts as you see fit, just change the loot to what you want spawned. Thanks to everyone who gave me advise on this
-
Door Keypad [SCRIPT] Request
Chuc replied to WarhammerActual's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hero's survive script has a key card which is pretty good. Can't remember if it had a keypad script. -
So i tried to implement your code into mine and i got it to spawn the ammo for the guns in car. Guns where random between the 2 editor placed cars i had and all guns had the right ammo. I couldnt seem to spawn in random ammo at all, ammo not for the guns spawned. That wasnt really a problem as a bit more tweaking could add that. The biggest problem was the code wasnt working for vehicles spawned by a script. Not sure what caused that to happen but its okay. What i have done is added the magazines into there own loot list and just have them spawn in with the guns. Sometimes you will not get any ammo for the guns in car but sometimes you do. It works well and is random, random is what i was after. VehicleLoot.sqf There is the Code if anyone would like it. Thanks for your help guys.
-
Okay ill give it ago. Sorry dont usually post something so long
-
so awesome thank you @Grumpy Old Man that works a treat. But now my ammo isn't random. Changed it around heaps but still ammo is the same in all cars, some have different type i.e tracer versions. And none of the ammo fits in any of the spawned guns. My list isnt that long im sure eventually ill find a gun to fit the ammo i have. So i got rid of the arrays i had in my op and made them like the rest. But now the ammo is the same type in all vehicles. The only other way i could think of it is make a loot list for the ammo types i want to spawn in but i was hoping i didnt have to do that. I made them all give me one so i could test what i was getting. The mission is a wasteland that has been that way for years and every car you come across is either a wreck or a survivors car. Being a survivors car there should be gear in it and if there are guns its understandable that there would be ammo for at least one gun in the car.
-
Here you go @GEORGE FLOROS GR i uploaded a vanilla version of my random drop script to the workshop. https://steamcommunity.com/sharedfiles/filedetails/?id=1389027958 They are pretty basic compared to the one im working on now. but it gives a good idea on what i am doing with them. The one im working on now adds about 30 more lines of code to my air_1 script. Once i get it better ill upload that for you as well. Apparently my picture on the work shop is really blury
-
thanks ill give that ago. Was pretty tied last night. Seeing the "You randomize too early" i realized i was randomizing them before putting them in the car
-
how can i make cars spawned in be damaged by the vehicle module?
-
@GEORGE FLOROS GR Awesome mission. Me and my 4 year old gave it ago. Found my first npc after about 20min walking only to have him throw a grenade at me and kill both of us. I decided to take a page out of your book and try and make a mission with scripts. I read that you didnt mind if we pull your mission apart. My missions are for personal use and i never upload them. You have opened my eyes to scripting in a different way than i had been doing. Thank you for that. I really liked your random trader spawning. I also like your supply drop script your have. Using your random trader script as a template i managed to get camps to spawn randomly with a radio and add the airdrop as an add action. Even got squads of friendlies to guard the radio. Mixed with Eden Composition Spawning i have now managed to spawn full camps around the airdrops. i have only used your traders stuff and the random structure spawn out of your mission. Thank you again for your great work
-
yeah i thought that was abit odd so i thought id add in the one i made awhile ago for the people searching
-
if anyone is still looking for this type of thing heres one i made with the help of someone here. Cant remember who but she was nice. Made me make most of it she just got it working for me. PromoteUnit = { private _rks = ["PRIVATE", "CORPORAL", "SERGEANT", "LIEUTENANT", "CAPTAIN", "MAJOR", "COLONEL"]; private _old = rankId _this; if (count _rks - _old > 1) then { _this setRank (_rks select _old + 1); systemChat format ["Unit %1 promoted to %2", _this, rank _this]; } }; I was calling it with an addaction. Was gonna implement it into my mission but my mission files got corrupted, 12 months gone in seconds. heres the one to demote DemoteUnit = { private _rks = ["PRIVATE", "CORPORAL", "SERGEANT", "LIEUTENANT", "CAPTAIN", "MAJOR", "COLONEL"]; private _old = rankId _this; if (count _rks - _old > 1) then { _this setRank (_rks select _old - 1); systemChat format ["Unit %2 demoted to %1", _this, rank _this]; } }; there were errors but i cant remember them. Pretty sure you coudnt be demoted from Colonel or something like that
-
i found this in a mission by [GR]GEORGE F. ; No Kill Zone - v1.16 ; (c)2016 By SuperChicken Productions - Atlanta GA., USA NoKillZone.Sqs Note that this is a SQS file not a SQF file ; usage = [MARKER,DISTANCE,TEXT-IN,TEXT-OUT,PROTECTION] exec "NoKillZone.Sqs"; - MARKER = a marker that is the CENTER of the zone - DISTANCE = how from out from the MARKER to 'protect' - TEXT-IN = text to show via HINT if inside zone - TEXT-OUT = text to show via HINT if outside zone - PROTECTION = if players vehicle is also protected ; example: ["CentralSZ",500,"You Have Entered The Central Safe Zone!","You Have Left The Central Safe Zone!",0] exec "NoKillZone.Sqs"; - this would protect any player and not his vehicle within 500m of the marker called 'CentralSZ' ; run for every marker you have set ; example, for epoch you have 3: ; ["CentralSZ",500] exec "NoKillZone.Sqs"; ; ["WesternSZ",500] exec "NoKillZone.Sqs"; ; ["EasternSZ",500] exec "NoKillZone.Sqs"; ; Also could be: ; #1 - ["CentralSZ",500,"You Have Entered The Central Safe Zone","You Have Left The Central Safe Zone"] exec "NoKillZone.Sqs"; ; #2 - ["CentralSZ",500,"You Have Entered The Central Safe Zone",""] exec "NoKillZone.Sqs"; ; #3 - ["CentralSZ",500,"","You Have Left The Central Safe Zone"] exec "NoKillZone.Sqs"; ; #4 - ["CentralSZ",500,"","You Have Left The Central Safe Zone"] exec "NoKillZone.Sqs"; - this would disable vechicle protection ; #5 - ["CentralSZ",500,"","You Have Left The Central Safe Zone",0] exec "NoKillZone.Sqs"; - this would disable vechicle protection ; #6 - ["CentralSZ",500,"","You Have Left The Central Safe Zone",1] exec "NoKillZone.Sqs"; - this would enable vechicle protection ; TEXT-IN and TEXT-OUT are OPTIONAL - if not supplied, no hint will be shown for that section (in/out) ; if you wished to use ONLY 'OUT' text and NO 'IN' text, you MUST include a empty quote for the 'IN' entry - see #3 above! Missing quote(s) = fails to run! ; text may also use the '\n\ command to allow for multiple lines of text in hint! ; PROTECTION (vechicle protection) is also OPTIONAL. if set to ZERO (0) or left out, it defaults to no protection. ; to enable protection, use a ONE (1) as a paramenter - see #6 above ; marker name and text ALL must be in quotes! ; marker name is the name you gave the marker in the editor - NOT 'text' field, rather the 'NAME' field ; put script call into your server "INIT.Sqf" file to be run at startup and in the "OnPlayerRespawn.Sqf" file so that it may start again at respawn ; for those that may not know, the INIT.Sqf and the "OnPlayerRespawn.Sqf" are where your 'Mission.SQM' reside! Not there? CREATE THEM! ;) ; this runs 100% on the client and NOT on the server! ZERO performence hit on the server side and ZERO interference with most other scrips in use! ; can be used in MP or SP! ; ******************************************************************************** ; make sure script only runs on clients if (isDedicated) then {goto "ExitHere"}; #StartLoop ; set varis to be used by script _NKZver = "1.16" _getdistance = 0; _NKZflag=9; _vp=""; ; text in use flags _inflag = 9; _outflag = 9; ; get params _NKZmarker = _this select 0; _NKZdistance = _this select 1; _NKZTextIn = _this select 2; _NKZTextOut = _this select 3; _NKZvech = _this select 4; ; checks to ensure both parameters (#1 & #2) have been set if ((isNil "_NKZmarker") or(isNil "_NKZdistance")) then {goto "ParaError"}; ; checks to see if text exist, if not flag as such so no hint will show ; checks for inside zone text if (isNil "_NKZTextIn") then {_inflag = 0}; if (!isNil "_NKZTextIn") then {_inflag = 1}; ; checks for outside zone text if (isNil "_NKZTextOut") then {_outflag = 0}; if (!isNil "_NKZTextOut") then {_outflag = 1}; ; check for vechile protection here - if missing, set to 'off' if (isNil "_NKZvech") then {_NKZvech = 0}; if (_NKZvech == 0) then {_vp="Vehicle Protection Is: *Off*"}; if (_NKZvech == 1) then {_vp="Vehicle Protection Is: *On*"}; ; startup notice ;systemchat format ["No Kill Zone Script v%2 Active For '%1'",_NKZmarker, _NKZver]; ;systemchat format ["--- %1 ---",_vp]; ; start the checking here #LoopHere _objcoords = getMarkerPos _NKZmarker; _getdistance = player distance _objcoords; if (_getdistance <= _NKZdistance) then {goto "InsideTheZone"}; if (_getdistance > _NKZdistance) then {goto "OutsideTheZone"}; goto "LoopHere"; ; comes here if player is inside the set zone #InsideTheZone if (_NKZflag == 9) then {_NKZflag = 0}; if (_NKZflag == 0) then {player allowdamage false}; if ((_NKZflag == 0) && (_NKZvech == 1)) then {vehicle player allowdamage false}; if ((_NKZflag == 0) && (_inflag == 1)) then {hint _NKZTextIn}; _NKZflag = 1; goto "LoopHere"; ; comes here if player is outside the set zone #OutsideTheZone if (_NKZflag == 9) then {goto "LoopHere"}; if (_NKZflag == 1) then {player allowdamage true}; if ((_NKZflag == 1) && (_NKZvech == 1)) then {vehicle player allowdamage true}; if ((_NKZflag == 1) && (_outflag == 1)) then {hint _NKZTextOut}; _NKZflag = 0; goto "LoopHere"; ; comes here if the params are not set #ParaError hint format ["You Did Not Use Correct Parameters!\n\n\nMarker Name: %1\n\nDistance: %2\n\nPlease Correct And Try Again!\n",_NKZmarker, _NKZdistance]; goto "ExitHere"; ; master exit point #ExitHere ; ******************************************************************************** [GR]GEORGE F. was using it to make safety around traders in his mission. He executed it at the bottom of the init.sqf with ["Trader1",400,"You Have Entered a Trader Safe Zone!","You Have Left The Safe Zone!",1] exec "scripts\NoKillZone.Sqs"; I havent tried to use this yet as my missions rely on you stopping hostiles from getting near trader zones. If you let a trader die then thats on you.
-
have you tried changing this to player or _unit
-
I've been using this Eden Composition Spawning for the last couple of days and it seems to working quite well mixed in with a random spawn script i use. Did you save the composition with a name then copy it into your mission folder? Did you add the name of your composition into the composition.cfg file that came with Eden Composition Spawning? ill copy one of mine here. composition.cfg LARs_spawnComp_debug = 1; class CfgCompositions { class Ant { #include "ant.sqe" }; class Mort_1 { #include "Mort_1.sqe" }; class Bandit_Camp_1 { #include "Bandit_Camp_1.sqe" }; class Civilian_Camp_1 { #include "Civilian_Camp_1.sqe" }; }; I also removed all of his compositions and addActions. Then i used this code in sqf to spawn it Civilian_Camp_1.sqf pos = [] call BIS_fnc_randomPos; _Civilian_Camp_1 = "Land_HelipadEmpty_F" createVehicle pos; _randPos = _Civilian_Camp_1 getRelPos [0,0]; ["Civilian_Camp_1", _randPos, [0,0,0], random 360, true] call LARs_fnc_spawnComp; _marker = createMarker ["Civilian_Camp_1",getPos _Civilian_Camp_1]; _marker setMarkerType "mil_dot"; _marker setMarkerSize [1,1]; _marker setMarkerColor "ColorBlack"; _marker setMarkerText "Civilian Camp 1"; Added execVM "Scripts\RndComps\Civilian_Camp_1.sqf"; into my initServer.sqf to spawn it. The Eden Composition Spawning will only work on a server. It will not work in singleplayer. I only make mission for myself to play and make them mp for respawning. I just set them to 1 player. My Civ Camp is a shanty town with alot in it. How are you doing it? maybe you have missed something
- 12 replies
-
- compositions
- vectors
-
(and 3 more)
Tagged with:
-
i was just sharing how i got spawned npc's to have the recruit option. With what i posted any spawned friendly, not placed in the editor, will have the recruit option there. Was gonna do more testing with it today
-
i looked every where trying to find a way to make any friendly on the map be recruit able. I tried the script code on the wiki and it didnt work, i kept getting errors. So i mixed a couple of other codes i had and came up with this Recruit.sqf ["man", "init", { _unit addAction ["Recruit Unit", "\ravage\actions\recruit.sqf",[_unit], 1, false, true, "", "alive _target && {group _target != group _this}"]; // _unit addAction ["Dismiss Unit", "\ravage\actions\dismiss.sqf",[_unit], 1, false, true, "", "alive _target && {group _target == group _this}"]; }, true, [], true] call CBA_fnc_addClassEventHandler; this will make any friendly on the map be recruit able. The only problem i had was i had dismiss on my action menu all the time. So once you recruited someone you would get 2 dismiss options but only one would work. So i just commented that line out. I put it in its own Recruit.sqf file and run it form my initServer.sqf with this command execVM "Scripts\Recruit.sqf"; If there is a better way to do please let me know. This took me all night to get to work. its just gone past 1am so im off to bed. Hope otheres find this useful. The Script Recruit code on the wiki doesnt work. well i couldnt get it to.
-
nice to see the mod on the workshop, well done. Was wondering if there was a way to exclude a building from the loot list so furniture dosent spawn in side. I know you can do it by class name but i dont want them all to be empty just one of them. thank you and Great mod
-
No respawning in sp. I searched for ever and the game just can't do it. Just set up a mp mission with only one player slot. A script should be able to restart the mission once you die and can't spawn. I am looking for
-
Ace does work with ravage but it takes abit to get it right. I only stopped using it because of another mod I have. You do get two ways to repair cars and recruit people. You can't use all of aces modules because you will get errors with zombie damage. It's possible but you need to do some work to make it flow right. You don't get any ace stuff in the loot but you still get the first aid kit and when you transfer it into your inventory it just separates into bandages and morphine.