Jump to content

Rydygier

Member
  • Content Count

    4805
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by Rydygier

  1. Checked crow function code. Well. There is fsm loop for each spawned crow, so when crow is deleted, immediately new is created instead. Do not see any chance for external interruption of this loop. I see only three options: to write own crows function, or extract and use after modification function from A2 pbo's or do not delete crows, but to hide them via hideObject comand. Visual effect will be same, but crows will be still there, will be heard and will affect performance, so I'm not happy with this. Anyway here is demo with such "hiding" version: Crows&Flies Note: 1. Function module on map seems to be necessary only beacuse of flies function. Crow function works also without it; 2. First kill the soldier in front of you; 3. Wait, and come closer to see, that soon will appear flies; after another delay also crows will show up; 4. To remove body use 0-0-0 key combination (Juliet radio channel); 5. After that plus short delay flies will be removed; 6. After longer delay crows will be hided one by one until all become invisible. EDIT: oh, you can also setPos each crow far, far away, plus maybe limit speed, so they will fly back long enough, but, this method is, well, hmm, :annoy: ---------- Post added at 15:17 ---------- Previous post was at 14:07 ---------- I think, that I have far better solution for crows removing. What, if flock will be not deleted/hidden, but just fly away (really very, very far, so shouldn't return fo very long)? After some test came to this version, seems to be quite fine: Crows&Flies Only problem is, that with every next crow present on map impact on performance will be minimal greater, as none of them will be deleted... Idea for more advanced scripting: do not spawn any new crows, but to use crows already present on map (or maybe add some initially for that purpose) and let them to be dynamically and randomly attracted by places with bodies...
  2. Yep, this trigger way of EH adding is also good. You can try such code of deadbodies.sqf (untested): waituntil { !isNil "BIS_fnc_init" }; _deaddude = _this select 0; sleep (10 + (random 5)); _flies = [(position _deaddude),0.05 + (random 0.05),1 + (random 1)] call bis_fnc_flies;//randomized params sleep (20 + (random 10)); _crows = [_deaddude,20 + (random 10),8 + (round (random 8)),15 + (random 20)] call bis_fnc_crows;//randomized params waitUntil {sleep 1; (isNull _deaddude)};//I hope this will make, that script will wait for vanishing of the body before deleting, but I'm not quite sure of this sleep (10 + (random 5));//some delay {deleteVehicle _x;sleep (random 5)} foreach _flies;//removing flies with some intervals sleep (20 + (random 10));//another delay {deleteVehicle _x;sleep (random 10)} foreach _crows;//removing crows with some delays between each delete Note one important thing: added "_" before variable containing all crow objects for given flock. Why? Because without it it is a global variable. This means, that each next flock will overwrite previous, so only last one can be deleted, and will be deleted regardless, which body is gone. So this "_" makes variable local to given script (body) to avoid such problems... Note also, that in [] brackets before "call" added some randomization for better effect, this can be replaced by default or any other values, if randomization is not desired. Sleeps also can be randomized, so instead of always same 10 second delay can be used random value from eg 10-15 range. Properly used randomization can add to mission some nice flavour. Now this is quite similar to my first method plus these flies... Still be awared, that there is no distance limitation, so if you will have eg 12 bodies close together, there will be really lots of crows and flies over them. This may have impact on performance and may look weird. So still in my opinion would be the best to use my method, eg first. Flies can be easily added here. ---------- Post added at 12:02 ---------- Previous post was at 10:22 ---------- I'm preparing some small demo. One "issue" - noticed, that crow flock is replenished after each deletion, will try to do something about this... There is no such problem with flies.
  3. One crow? Very strange. If code is wrong, then there shouldn't be any crow, if is good, then should be 8-16 crows per flock... Well, it is working for me (tested without long sleep), so maybe give me here a repro mission with this problem, so I can check this, without it I can't say anything, cause currently haven't any info about this problem and do not want to guess blindly.
  4. These aren't three parts, but three alternative solutions. I suggest first or second one, third is rather for curiosity, as is based on another approach. The way: put chosen code into text file named eg "Crows" then change extension from .txt to .sqf, and paste this .sqf file into yours mission folder (or just prepare sqf file via Squint, AEdit or another such editor). Then put this into init field of any unit on map or into init.sqf file, if present in mission folder: nul = [] execVM "Crows.sqf"; Code will be executed automatically at mission start.
  5. 1. Crow_array = []; Nevermore = { _tgt = _this select 0; _tooMuch = false; { if ((_tgt distance _x) < 200) exitwith {_tooMuch = true} } foreach Crow_array; if (_tooMuch) exitwith {}; Crow_array set [(count Crow_array),_tgt]; sleep 600 + (random 300); _crows = []; if not (isNull _tgt) then {_crows = [_tgt,20 + (random 10),8 + (round (random 8)),15 + (random 20)] call bis_fnc_crows}; waituntil { sleep 1; (isNull _tgt) }; {deleteVehicle _x} foreach _crows }; { _x addEventHandler ["killed", {nul = _this spawn Nevermore}] } foreach AllUnits; 2. _eaten = []; Crow_array = []; while {(true)} do { sleep 30; _yum = Alldead - _eaten; { _eaten set [(count _eaten),_x]; [_x] spawn { _tgt = _this select 0; _tooMuch = false; { if ((_tgt distance _x) < 200) exitwith {_tooMuch = true} } foreach Crow_array; if (_tooMuch) exitwith {}; Crow_array set [(count Crow_array),_tgt]; sleep 600 + (random 300); _crows = []; if not (isNull _tgt) then {_crows = [_tgt,20 + (random 10),8 + (round (random 8)),15 + (random 20)] call bis_fnc_crows}; waituntil { sleep 1; (isNull _tgt) }; {deleteVehicle _x} foreach _crows } } foreach _yum }; 3. _cntr = getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"); _rd = 1.5 * (_cntr select 0); Crow_array = []; while {(true)} do { sleep 30; _somethingIsRottenHere = selectBestPlaces [_cntr,_rd,"deadBody",15,10]; { _pos = _x select 0; _val = _x select 1; _tooMuch = false; { if ((_pos distance _x) < 200) exitwith {_tooMuch = true} } foreach Crow_array; if (not (_tooMuch) and (_val > 0.3)) then { Crow_array set [(count Crow_array),_pos]; [_pos] spawn { _tgt = _this select 0; sleep 600 + (random 300); _crows = [_tgt,20 + (random 10),8 + (round (random 8)),15 + (random 20)] call bis_fnc_crows; } } } foreach _somethingIsRottenHere }; (will add up to 10 flocks every 30 seconds if not "handled" yet bodies are found no closer, than about 200 meters from nearest already existing flock.) All tested (without function module) and spawning works (not tested removing crows after removing body), but tests was short, so I'm not sure, if this will be always reliable, this goes especially for third method, where also isn't check after sleep, if body is still there (can be added somehow), and there is no flock removing when body is no longer (probably also can be somehow added). Note also added distance check, so minimum distance between any flock should be around 200 meters (seems to be needed for places with many bodies to avoid too many flocks in one place, distance can be of course changed; if not desired at all - set limit to 0 meters or delete these lines). Time before crows spawning is each time randomly selected from range 10-15 minutes. This was quite hasty scripting, so probably can be done better/cleaner.
  6. Hey, thanks, Icewindo. There is and will be some pause in this part of the front. I'll back to this topic after some time. In the meantime every idea, opinion, help and so on will be very appreciated.
  7. Rydygier

    Why there is a particle limit in arma 3?

    Well, if any increasing of displayed particles or, eg, group limit per side, CPU power for scripts etc. will cause CTD, then of course shouldn't be touched. The question is, why would cause CTD, and not only bigger CPU/GPU load?
  8. Rydygier

    Why there is a particle limit in arma 3?

    Perhaps would be the best (if possible & reasonable), if such hardcoded engine limits (not only graphical) will become adjustable, including total switch'em off, via options and/or script. This way user can fit settings for his hardware and needs.
  9. Thanks, Thromp. For now can't tell, if this will be neccessary, so let's wait with this. I hope, that some people will use this mod in their missions. Personally I have some ideas too... Well I have various ideas for at least a half year of coding and no time yet for all this currently. But there is no rush. :)
  10. Some notes: I doubt, if dragon will get melee attack ability. Dragon is helicopter-based and think about it as about chopper to be awared about its limitations. Probably there will be very heavy difficulties to bring him in reasonable way close enough to perform such attack (and do not make it crash on ground by the way). I think, that dragon should only fly here and there, and perform fire-breath attack on known targets in range. That is my plan here. If will prove possible to add for earth elemental some kind of mentioned "throwing big rocks" (exploding perhaps?) attack - this will make this unit powerful and dangerous enough. Probably this can be done even via "Fired" EH - when tank is firing its gun - to the projectile is attached a rock object and projectile's trajectory and speed is properly adjusted. If not possible - tank-based armament should be sufficient. For clarity - obviously, at least in CEMS, these units will be AI-only, as temporarily summoned, uncontrolled allies.
  11. For elemental did only very short, a few minutes test for now, looks very intryguing and original - I really like it, noticed however, that this is not moving towards waypoint. Also tank sound can be muted or, better, replaced with some, perhaps, sound of rubbing heavy rocks or something like that as movement sound. Best - several short samples randomly chosen one by one, something like foot soldier movement - not know, if possible via config, if not - will add such sounds via script, as for dragon. May be useful also more "massive" variant for stronger (and harder to kill) elemental (bigger stones, lesser spaces between them). Must to think, how to resolve attack ability of such creature. Can stay, as was - tank weaponry, even, if will look quite weird with this model, maybe some muzzle (point of creating projectile) displacement? Or maybe some new attack ability instead - but what? I'll perform more test today or tommorow - depends, I caught cold lately, as often, so my coding work is almost paused for now - hard to think. This is for summoned orcs? :) Very nice too. Now we have something for sticking on the pikes. :) This is another idea - head as separate object, that can be attached anywhere, eg on vehicle as trophy "decoration" or near camp, on the stick as a special kind of warning sign. I see, that thanks to you, Icewindo, Rincewinder will become something of quite new quality level. Thanks again. :) @Chaingunfighter Thanks, man, any sound will be very appreciated. I need rather not looped sounds for wings (will be synchronized with animation via looped script), but I can cut needed part of looped sound file too.
  12. Wow. Also elemental! Thanks a lot. Will test this soon. :)
  13. Great. Sounds good. :) Hmm. Indeed, there is such thing. Probably "Trigerhappy Choppers" or this by zGuba.
  14. Just tried this flamethrower and I'm impressed. Especially this bouncing fire ricochetes on the walls and such - beautiful. Will ask them if they allow me to adjust and use this code.
  15. I'm after first, short tests and simple scripting for dragon - really impressive this dragon, Icewindo. :) Tried with not bad result to script more dragon-like flight dynamic with such code: _dragon = _this select 0; _dragon FlyInHeight 40; _dragon forceSpeed 30; while {(alive _dragon)} do { _DrRnd = random 0.15; _vDir = velocity _dragon; _vx = _vDir select 0; _vy = _vDir select 1; _vz = _vDir select 2; _pwr = 6 + (random 2); _dragon animate ["wings", 0]; sleep 0.05; _dragon setVelocity [_vx * 1.25,_vy * 1.25,_pwr]; sleep (1 + _DrRnd); _dragon animate ["wings", 1]; sleep 0.05; _dragon setVelocity [_vx,_vy, - _pwr]; sleep (1 + _DrRnd) } You can notice, that I moved wings animation here, cause wanted to slowdown wing movements and to synchronize with velocity changes. Tried also to edit config.bin (not know much about this, and failed, cause haven't idea how and why to binarize config, tried to save addon with .cpp, but some syntax errors occured then). So can you prepare for me version without hardcoded sounds? I must to sychronize wing flapping sound with animation frequency, probably will also try to replace this sound with something louder, and, hmm, more "majestic" (perhaps someday may be good to customize somehow wing animations to make'em wider (or rather deeper)). Another matter - weaponry and fire breath sound. It use normal chopper's ammo plus some custom (?), and sound is great here, but when using rapid gun fire, sound is played for each shot, while should once per burst. I think, that will be better also this sound to add via script, eg Fired EH and remove from pbo, at least for CEMS version, also beacause possible loudness adjustments. I think, that dragon should have unlimited, or very big amount of ammo, but only one kind of weapon. However ammo amount can be very easy controlled via script. I will try to add to each shot some fire particle effects to mimic fire-breath, also with ignition of hit/nearby objects (plus progressive damage, similar like with fire elemental). So will be great, if possible, to prepare such config, so dragon will "fire" more willigly, than usually choppers do (I want to see mayhem of fire inferno on the ground like after napalm bombardment :) ), with weapon, that shots some small ammo projectile in single fire mode with low rate of fire - interval should be greater, that length of fire-breath sound. If impossible, then perhaps I'll just try via script to emulate all firing: getting current direction, when towards known enemy in range, then projectile with fire effects is generated and "pushed" towards target, just like in Fireball spell, but with more abundant fire trace and additional effects. Still beter should prove first solution. Oh. And optimal will be of course, if projectile will be shot from the mouth, I do not know, if this is possible or easy enough. If not, then will try to "teleport" there just fired projectile via Fired EH.
  16. Great. Downloading. Thanks a lot, Icewidno. I have to prepare some scripts for combat effective fire-breathing attacks and appriopriate attack/patrol behaviour. :) But first some tests... Yeah.
  17. Thanks, already adjusted all these pulse loops, some disabled (these first-time missions). I guess, only with weak CPU these cyclical lags are present. This must be something with called code, as spawned or execVM-ed code will rather suffer delays, than causing any lags, so for these loops replaced call with spawn and added some sleeps. Two possibities: 1. I missed some loop; 2. This is not because of loop, but maybe caused some another way (???) cyclical CPU overload. Noticeable is, that this is not present in older version... Well, I'll investigate this further. PS. I must admit, that this is first and for now the only mission, I liked so much, that I wanted to do such adjustments for future usage. :) I even have somewhere on my HDD very early, unfinished version of quite similar SP dynamic, that I made before I learned about Lost. It shows how close is the Lost mission to my tastes.
  18. I'm doing some further code customization to better fit things to my tastes, but mostly for better performance on my weak CPU, but one issue still eludes me. On Chernaruss map with default settings, after hint about finished mission initialisation there are half second micro-lags every 5 second (5-6 or more fps drop, eg. from 20 to 15). This is really annoying, makes play, especially fights, quite frustrating because of cyclically disturbed fluency. In older version there wasn't such problem even with more additional addons, so this is about some newly added stuff. Any idea, what may causing this? I looked into probably every file checking for some heavy loops, adjusted all, that I found (some looped calls replaced with spawns, added some sleeps, RUBE weather replaced with far simplier and light makeshift weather "dynamizer", disabled some routines, as looking for nearest door to show up "search" action - now is always visible, and such stuff...), but this problem is still present...
  19. I've looked at GL4 garrisoning method. Seems to be nice, based on doMove - doStop, while HAC's method is based on setWaypointHousePosition. Because waypoints works with whole groups, so here is limitation for only one-member groups (otherwise, I think, all group will crowd around a single position...). Well. Probably should be possible replacing this method with more flexible doMove-doStop as one of future improvements, despite, that this is micro-AI level :P .
  20. Because of some code specificity, currently only "groups", that contain only one member will go inside buildings. Rest will man near static weaponry and will stay outside. Probably HAC's garrison routine can be better, and if can, then probably someday will be. :)
  21. Great! If still needed - this was Chernaruss map, tried with at least three force proportions on first screen, one was all 0, another: USMC, US Army, CDF equal share, also relevant vehicles, OPFOR RU and Chedaki set same way. Third I'm not sure, but probably similar, but CDF and Chedaki ratios was doubled. On second screen tried with deafult settings, and, once, with raised air power to 6 groups. It is possible. Made such thing in my very first serious "coding experience" ("Rusty Sands" mission) for player's team members. It was done via handle damage event handlers (experience was given for each hit, depending on target's skill, damage, distance, target's speed, attacker speed and, inversely, on attacker current experience), but in quite inefficient way, also mostly sqs, it can be done in better manner, I guess. BTW used same code for some bounty money gain for each kill depending on damage, rating and skill of target, but there was opportunity to spend these money on ammo, weaponry or mercs.
  22. Today returned to this problem: Played wit older version after this message quite long, and not noticed any enemy chopper. So this time returned to newest version. Prepared simply reporting code, that sets marker for each air unit on map cyclically (each 5 seconds) plus gives some info into my RPT. After some time are founded two air units, both empty and on ground, not damaged, and that's it. Was chosen 6 air groups. So this is problem with both Lost versions and probably it is because something, that I did (haven't idea, what...), because earlier there was enemy choppers with same settings, I know this, because these flying bastards killed me many times :) ... So now I'm wondering, what is the name of script in .pbo responsible for generating air patrols to investigate this issue and/or what may cause, that Lost will not generate any chopper? BTW. Last time got same message for enemy armor power, but I guess, that this is random, and there is a chance, that there will be not any enemy armor on map... EDIT: Just tried with unchanged in any way mission, without any other addon except provided with this mission - same effect. So this is not about anything, that I or some addon did. This is something with mission itself, I think. But, as I said, previously this worked. I'm simply LOST. :)
  23. That's... that's... That's a DRAGON! Flying dragon! And, I see, already implemented into CEMS! Wooow.
  24. Am I understood correctly, that you suggest to rig up dragon with sandbags, barrels, road signs, and whatever? :) Interesting, but I think, that chopper alone is more like a dragon than chopper with any available stuff atached to it in any way. I suppose, that modelling of a dragon would be really huge amount of work, far bigger, than, eg, new tank, or anything else, that is based on stuff already exist. Such dragon probably must be build from a scratch. Plus flying model, effective fire breathing, brand new set of animations (lots of them)... Really small chance. :( Still, I'm only guessing.
  25. I'm sure, that a good modeller can make a real dragon model, probably even flying and fire-breathing. Theoretically, because, as I wrote, good modellers are mostly occupied with mil-sim stuff, not fantasy, and such model must mean a lots of work, including animations... I'm not a modeller at all, so in Rincewinder summoned "dragon" is substituted by chopper with some particle effects and appriopriate scream sounds. Well. These machines always seemed to me like dragons (or at least dragon-fly :) ). Same way - earth elemental is substituted by APCs or tank with some special effects. Fire elemental though is another story.
×