-
Content Count
58 -
Joined
-
Last visited
-
Medals
Posts posted by HereIsJones
-
-
The HandleHeal event handler fires when healing starts, not finishes. Has anyone figured out an elegant way to tell when a unit is actually healed?
This is code I'm using to increment a variable every time an agent gets healed, but it isn't good because it fires when healing starts, not when the unit is healed. If the unit or the healer walk away mid-heal, the increment breaks (conceptually). Thanks.
{ (agent _x) addEventHandler ["HandleHeal", { params ["_unit", "_healer", "_isMedic"]; //code that does stuff }]; } forEach agents;
-
I'm using BIS_fnc_findSafePos to find a safe position to spawn a group, then using CBA_fnc_taskDefend to set them up to defend.
Issue - BIS_fnc_findSafePos returns pos as [X,Y] but CBA_fnc_taskDefend wants pos as [X,Y,Z].
Is there some kind of conversion function for this, or do I literally just append a "1" to the end of the pos array returned by BIS_fnc_findSafePos ?
Thanks.
-
A new Ravage mission, documenting the "last day" on Altis and a possible origin story for the ubiquitous "Lone Survivor".
I've tested it multiple times, but feel free to let me know if you find an issue.
-
5
-
-
30 minutes ago, Sierra-G339 'Digger' said:Well the Map I'm using is Tria. you really gotta scrape the barrel for supplies. so I'll just put a few sheep in or something...
Zombies kill sheep! Use chickens instead. Don't ask how I know.
Does anyone have a basic black and white Ravage logo?
-
1
-
-
I've created a custom OGG music track for a mission, but when I define it in CfgMusic and trigger it to play with playMusic, it plays back at what sounds like double speed.
BUT, if I define the track in CfgSounds and use playSound, it plays at the correct speed.
I know that happens occasionally when sample rates are off, but I've followed the Arma guidelines here (Sampling rate of 44.1 kHz is OK). And I don't know why it would be different for playSound/playMusic.
Anyone know what solves this? I could just use playSound, but I'm trying to fade out environment sounds and swell in the music in order to make everyone cry bitter tears of grief at the end of my mission (I believe that fadeEnvironment works with playSound and fadeMusic works with playMusic).
Thanks.
[SOLVE] the music plays at the correct speed if I select the track from the trigger music dropdown, so I'll just do that. I'm still wondering what the problem is with playMusic, though.
[FUN FACT] Using a stereo track played back at half speed. So I went mono.
-
I'm using BIS_fnc_spawnVehicle to create a transport truck and crew, then having the truck move to a GETOUT waypoint, like so -
_thisTruck = [_mkrPos, 50, "I_Truck_02_transport_F", west] call BIS_fnc_spawnVehicle; _grpTruck = (_thisTruck select 2); . . . _wpTruck1 = _grpTruck addWaypoint [_mkrAmbush2, 0]; _wpTruck1 setWaypointType "GETOUT";
According to the wiki, the entire group should leave the vehicle and head for the next waypoint, but only the driver gets out and moves to the next waypoint. Am I doing something obviously wrong?
EDIT As is often the case, I did something dumb. I created a group and put them on the truck, but didn't assign them to the crew's group. If someone wants to delete this post, feel free.
-
I've got a timeout with some code that looks like this:
_timeOut = time + 60; while {time < _timeOut} do { //stuff }; if (time > _timeOut) then { //stuff };
I'm testing in the editor so time is generally about 60 seconds, which means that the if should fire in about 2 minutes. The code in the while fires off correctly, but the code in the if doesn't fire when time reaches _timeout. This is all inside of a [ ]spawn, if that makes a difference.
Does anyone know why the if isn't working? Also, do I even need it? Will the code after the while just fire when the while is complete? Thanks for your help.
EDIT NM, it wasn't working because of a never-ending nested while statement. I cleaned up the code and it works now. And yes, the code waits until while is finished before firing.
-
On the Ravage mission I'm working on, I clear the map between two waves using -
{ if (!isPlayer _x) then { deleteVehicle _x; }; } forEach allunits;
That removes all units (including zombies) from the map. But after I use that once, zombies and bandits stop spawning. Does anyone know why? I thought it might just take some time, but I waited for over 5 minutes and nothing. Thx.
EDIT Renegades and pats are showing up, not zombies.
DOUBLE EDIT Ok, everything is working. I must have done something
stupidcool. -
On 5/4/2021 at 10:38 PM, Valken said:Now make a COOP version with twice the chicken, rabbit or sheep or even HUMAN meat we need to win! Or a FFA Battle Royale version with each player needing X to win!
I definitely wanted a MP version of this, but as a new scripter I'm still learning how to script for MP. It might take a little more time.
I came up with the idea of a "delivery point" - once someone (anyone) in MP gets 10 pieces of chicken, the "bbq destination" is announced with, say, a new 5 or 10 minute timer and you win by delivering your chicken there. Everyone now has the option to try to collect their last piece(s) quickly, or head to the destination immediately to try to prevent other players from reaching it (and stealing their chicken in the process). I may have to keep it simple, though.
FYI - zombies attack and kill sheep, but not chickens. Go figure.
-
2
-
-
I need to get a flashlight on a PDW, which isn't equipped with a flashlight slot. Is there a generic way to script a light onto any weapon? Not necessarily the flashlight object, but any kind of light will do, as long as it "acts" like a weapon flashlight. Thanks much.
-
Thanks @kodabar it's my first published Arma mission and I had fun making it. It's basically the Travelling Salesman Problem, with the addition of random factors like starting point/terrain/vehicle. You also have to consider that you'll be blocked by random events like getting pinned down by a patrol, running out of gas or having your engine shot out, needing to detour to the trading post for healing, etc.
One thing I noticed is that after the Arma update from the other day, zombies are no longer "rarely" dropping rare items (weapon attachments and first aid kits). I'm a new scripter, so I blame my code and not Arma, but I've found a way to add it back in. I may ask on the Steam page for comments before I do, as I know a lot of players like things harder. I just thought that getting an occasional scope or suppressor would be fun, given the time limit. -
Ok, I'm finished with the SP Ravage mission you didn't know you needed -
[SP] Ravage | One Hour to Chicken
Randomized and repeatable, with 19 starting points/vehicles and over 50 raid points. The only known issue I've found is that very occasionally the initial fade-in doesn't fire. I have no idea why.
-
4
-
-
Has anyone seen a weird lag in their missions after today's update? I've been testing for two days, and everything was fine, didn't change anything, and now after this update the mission start is now lagged ~2 seconds. Not a lot, but noticeable enough to look strange, so I'll have to change it. Just wondering.
-
Thx for responding. I tried that, but no luck. This may just be a bit of "code entropy", some line of code is crossing another line of code somewhere and causing problems. I may just use the outro w/o music.
-
1
-
-
I've tried triggers, but again they work in a new mission, but not the mission I've created. No music plays anywhere.
I haven't written any sound or music code other than the mission outro, so I just thought I might have accidentally set some kind of global "mute" condition by checking a box somewhere.
-
When I add
playMusic "SkyNet";
...to a new mission, the song plays (it's from the default Arma soundtrack). But when I add it (in the same way) to the mission I'm about to complete, it doesn't play. The music associated with BIS_fnc_endMission "end1" doesn't play in the mission either.
Is there a checkbox somewhere I may have checked that needs unchecking? Maybe a setting I somehow inadvertently changed? Volume is fine, I even tried to fade the music in, but no luck. Each test works in a new mission, but doesn't work in the mission I'm currently finishing.
-
Does anyone know how to access Ravage objects in code? I'm trying to COUNT how many objects are in a player's inventory, and for vanilla items I get a returned number, but for Ravage items I get 0. I've tried rvg_guttingKnife, rvg_Chicken_Meat, rvg_baconEmpty using:
{"rvg_baconEmpty" == _x} count (items player);
It seems to work for vanilla (i.e. FirstAidKit), but not Rvg.
Thanks!
EDIT - for anyone who needs this, it's
{_x == "rvg_baconEmpty"} count (magazines player);
-
Does anyone know how to access Ravage objects in code? I'm trying to COUNT how many objects are in a player's inventory, and for vanilla items I get a returned number, but for Ravage items I get 0. I've tried rvg_guttingKnife, rvg_Chicken_Meat, rvg_baconEmpty using:
{"rvg_baconEmpty" == _x} count (items player);
It seems to work for vanilla (i.e. FirstAidKit), but not Rvg.
Thanks!
-
Each time a player adds a specific item to inventory, I need to fire a COUNT to determine if that player has n number of that item in inventory. When they player finally has n of the item in inventory, the mission will end.
I can write the COUNT code, but I can't figure out what would call it. An event handler for "adding to inventory" would work, so that each time a player picked up an item COUNT would fire for the specific object, but it doesn't look like that event exists. An Open Inventory handler exists, but not sure that will work as it's possible to pick items up using the "fast grab" key.
Is this just a game trigger that I set on the map and fire with some kind of game logic? And how would that fire the COUNT code every time a player added something to inventory?
I feel like this has been probably been done before, but I haven't been able to find anything, so if you just want to point me somewhere that would be awesome.
EDIT: I tried putting this in the CONDITION field of a trigger, but no luck -
{ _x == "FirstAidKit" } count items player == 2
-
34 minutes ago, EO said:@HereIsJones do you mind me asking what mission your using for these tests.
For this test, I simply created a blank map (Altis) and put in a Player and the appropriate Ravage modules (zombie, AI, settings, etc.). I tested this with the default loot system, Tinter's furniture system and no furniture (only loot from world objects) and had the same results. The map above is from the Tinter test.
Are you seeing AI patrols despawn?
-
Cool, thanks! I really like this mod, being late to the game and having only just discovered it. Since the lag feels like it's accumulating, I thought it might either be the loot or AI as the game goes on, and loot makes sense because I've had multiple AI on vanilla Arma missions before with no trouble.
I shall await the update, but since I already did this test here's the info if it helps.
1) This is the map now, after ~20 game-hours (12 sleeping).
2) More AI is on the map (drove and looted from Kavala to Sofia and back again), but interestingly only some are marked as flags, which I believe is the dynamic management system at work. The AI looks like this when you find it via cam:
3) Anything you see on the map that is not being "shut down" dynamically (not a flag) is actually moving around, patrolling.
4) Zombies and Renegades seem to be despawning. I only see patrols (Red, Green and Blue) across the map.
Hope that helps in some way.
-
So I was experiencing a bit of "loot lag" that got worse the longer I played, and have tested a variety of settings, including spawning merchants in as agents (which seems to work well BTW). I finally installed Simple Single Player Cheat Menu, so that I could access the Debug Console and Spectator Cam.
In Altis, I drove from Kavala to Pyrgos (over 10 km), looted a while and then checked the cam. All of the AI that had spawned along the route from Kavala to Pyrgos hadn't despawned. This is a static image, but they were all moving -
Also, when I restarted the game, the AI was still there.
So my question is, should the AI (friendly or not) despawn after a certain distance? Or do they hang around for a specific time period? I think maybe as my lag gets worse, more AI have spawned?
EDIT: forgot to note that my machine is around the lower limit of the Arma required specs, so this could just be me.
-
Just now, EO said:Just curious, are your system specs up to scratch?
No worries, I've thought of that too, but I've tried on two different systems, both which should be ok.
But, I think if it were the system, I would always loot lag, but the issue I'm seeing is lag gradually getting worse over game-days, which feels like something is accumulating. A friend has a high-end gaming PC, I'll see if I can get her to check it.
I'm testing now with everything stripped out but the Ravage modules (I had three merchants on the map as per the Wiki). If it doesn't lag, I'll keep adding things like merchants until I (hopefully) find the problem.
By outdoor looting, you mean just the objects that were already on the map? No Ravage ambient furniture system?
-
1
-
-
53 minutes ago, haleks said:Sounds like something I'll need to fix. Does the lag affect other actions ingame (like repairing vehicles)?
Interactions did seem to lag, and the Health window on the Inventory screen takes an extra second to load.
Also, if this helps - when the loot lag gets really bad after 3 or so game-days (~10 secs lag), when you find loot in an object the inventory window pops up but there's nothing in it.
EDIT - one more thing if it helps, I tested with your ambient furniture system, with Tinter's furniture mod, and with all of it turned off (just loot from world objects) and got the same lag in each case.
HandleHeal EH Timing
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
Thanks, I didn't know about waitUntil.
I had to Spawn it to get it to work, and I simplified it. Now the Hint doesn't fire until the heal is complete.
{ (agent _x) addEventHandler ["HandleHeal", { params ["_unit", "_healer", "_isMedic"]; 0 = _unit spawn { params ["_thisUnit"]; waitUntil { (damage _thisUnit) < .5 }; hint "healed"; }; }]; } forEach agents;