BomboBombom
Member-
Content Count
38 -
Joined
-
Last visited
-
Medals
Everything posted by BomboBombom
-
[Requesting assistance] MP Detailed kill messages to server log.
BomboBombom replied to BomboBombom's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Attempting to add the killers gun to the script, so I'm attempting to use damage handle to determine projectile source and then from that determine what gun the person killing used. Been delayed quite a bit in the progress. Will be trying simply identifying the projectiles first and see how that goes. Posting shortly. - Player _x was shot with a _gun, fired by _y. Rather than returning the info I need it makes me invincible though. //waitUntil {isDedicated or !isNull player}; waitUntil {!isNull player}; hint "Start Script {"; //if (isServer) then if (isMultiplayer) then { TAG_LOG_FUNC = { _victim = _this select 0; _killer = _this select 3; _gun = _this select 4; _dmg = _this select 2; _kilGRD = mapGridPosition (getPos (_this select 3)); _vicGRD = mapGridPosition (getPos (_this select 0)); _killeruid = if (isPlayer _killer) then {getPlayerUID _killer} else {_killer}; //[function][format] [[time] [victim][uid] [dmg] [grid][killer][uid] [projectile] [grid][time] [victim] [uid] [dmg] [grid] [killer] [uid] [gun] [grid] hint text format ["%1 PLAYER KILL EVENT : %2 (%3) was hit for %4 damage and killed at %5 by %6 (%7) using %8 ammo in grid %9",round time,name _victim, getPlayerUID _victim,_dmg,_vicGRD,name _killer,_killeruid,_gun,_kilGRD]; _victim removeMPEventHandler ["handleDamage", 0]; }; "TAG_MPKilledLog" addPublicVariableEventHandler { _var = _this select 1; _var call TAG_LOG_FUNC; }; }; if (local player) then { player addEventHandler ["handleDamage", { //if (isServer) && (isPlayer (_this select 0)) && ((_this select 2) >= 0.9) then if (isMultiplayer) && (isPlayer (_this select 0)) && ((_this select 2) >= 0.9) then { hint "call TAG_LOG_FUNC"; _this call TAG_LOG_FUNC; } else { TAG_MPKilledLog = _this; publicVariableServer "TAG_MPKilledLog"; } }]; }; hint "} End Script"; Above is the code cuel provided but modified. Some changes made to test it out on lan host. * It shouldn't. Overwrite current damage handlers, simply add this to detect gun used to kill with. * It should Return gun used. (Currently returning ammo, but not even working because I can't die :p) Will try another method ! Will test using weaponState of triggering killer unit and old script. Should work fine. Update Can't get it to work. trrying to fix it //waitUntil {isDedicated or !isNull player}; waitUntil {!isNull player}; hint "Start Script {"; //if (isServer) then if (isMultiplayer) then { TAG_LOG_FUNC = { //Player victim and murder person _victim = _this select 0; _killer = _this select 1; //Grid location of them perky persons _vicGRD = mapGridPosition (getPos (_this select 0)); _kilGRD = mapGridPosition (getPos (_this select 1)); //get gun _gun = weaponState (_this select 1); //player UIDs _killeruid = if (isPlayer _killer) then {getPlayerUID _killer} else {_killer}; _victimuid = if (isPlayer _killer) then {getPlayerUID _victim} else {_victim}; //print or log data diag_log text format ["%1 PLAYER KILL EVENT == VICTIM %2 (%3) at grid %4. KILLER: %5 (%6) at grid %8 GUN: %7 ",round time,name _victim, getPlayerUID _victim,_vicGRD,name _killer,_killeruid,_kilGRD,_gun]; // _victim removeMPEventHandler ["killed", 0]; }; "TAG_MPKilledLog" addPublicVariableEventHandler { _var = _this select 1; _var call TAG_LOG_FUNC; }; }; if (local player) then { player addEventHandler ["Killed", { if (isServer) then { _this call TAG_LOG_FUNC; } else { TAG_MPKilledLog = _this; publicVariableServer "TAG_MPKilledLog"; } }]; }; above is test script. See an error. Fixing and testing "_gun = weaponState (_this select 1) select 0;" - was missing " select 0" -
Event handlers... unit killed by specific weapon type?
BomboBombom replied to fatty86's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
How would I put this on all and any players instead? * Including respawns. -
[Requesting assistance] MP Detailed kill messages to server log.
BomboBombom replied to BomboBombom's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thank you. Is there any way to log or send events besides the .rpt file? ---------- Post added at 03:22 ---------- Previous post was at 03:11 ---------- http://www.ofpec.com/COMREF/index.php?action=details&id=615&game=All http://www.ofpec.com/COMREF/index.php?action=details&id=613&game=All -- Am reading about these atm. Very little description on functions :| -
[Requesting assistance] MP Detailed kill messages to server log.
BomboBombom replied to BomboBombom's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Can not find the log but it does work and trigger. Tested it with hint. - Tested on dedicated and simply using local hosting through arma client. Thanks a bunch again :O ~am poking script now for more detailed logging~ -
[Requesting assistance] MP Detailed kill messages to server log.
BomboBombom replied to BomboBombom's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Oh wow, amazing. Thanks a whole bunch of tons of awesomeness. I will be testing it in about 3 minutes :-) -
[Requesting assistance] MP Detailed kill messages to server log.
BomboBombom replied to BomboBombom's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks for the spotting :-) Guess lack of sleep isn't good while trying to do these things. :p ~ Bombo. ---------- Post added at 06:00 ---------- Previous post was at 05:44 ---------- I do not see how the event handler is able to grab killer and killed, and it doesn't either. Are there any other event or more handlers that can be linked or used? (Multiplayer) ---------- Post added at 06:51 ---------- Previous post was at 06:00 ---------- * Trigger only works for one death. * Trigger wont return a clean player name, it includes odd characters such as B 1-1-2 etc. Do not want :| Must sleep. Night and thanks -
This is on hold, and has been for quite a while. Work may continue on this once I've learned more and worked out some bugs This thread contains both the script progress of the mission I'm working on as well as requests for codes. All scripts I finish testing will be posted in here for anyone to read and use. Of course credits will be given to all parties from which I've managed to solve, optimize or get complete strips of code from. Any help with suggestive alternative methods for codes, optimizations or curious ideas or questions will be appreciated. Thanks~ * Map/Mission description : Chasers are 1 to 2 players (initially during testing and developing), they get helicopters that they use to track down and kill the runners with. The runners get a choice between a few weapons besides what they spawn with and a couple of vehicles that they may use to defend themselves with and make their way. Tweaks are made to units using scripts rather than mods, to balance health for a fair "feel". This was initially a simple map for fun that me, my brother and a friend of his played to pass time. I ended up trying to make something simple way too advanced. :p TODO - Clean and index thread properly. - LOTS OF CODE! - Share it.. :p Currently working on - Merger of the healing scripts to create a healing platform that heals depending on unit entering, how many they are and how hurt they are. WIP Code in spoiler(complete ammo recharge for vehicle is not included atm, neither does it work of the bat. Progress is halted for today): Problems that have been solved - Spawning and respawning with items of choice. Solved with addWeapon-script, Thank you Celery! A lot remain. - Creating a platform which heals units. my script thread for this strip. (will update when the platform can recharge ammo) - Healing platform progress script addition 3 script: - Healing platform progress script addition 2 script: The main thread Hello there, I've searched and searched for script help on my issue but for the most part I find uncompleted or "cloggy" code which people keep posting how they disagree with each other on. I've tried myself but not gotten very far. At the moment I've got respawning vehicles, some ammo boxes with desired weapons, "ALICE 2" running and am planing to add some changes to my vehicles to make them a tiny bit faster as well as more durable. I thought that if I used a unit respawn script that set the variable playable to true on the unit, it would allow the player to respawn on this unit. That wasn't so. It appears I have to spawn as a default character type and when I do I do not get the full inventory of the originally placed unit. I've searched for a respawn script, or alternative respawn script but I've not found anything claiming clearly to be just that. Player respawner- Modded for players (WIP,Not functioning as intended) . Original code by norris (//Scripting by norrin Oct 2008 ) Useage Put the code bellow Init on a named unit along with a marker for which within it can respawn. nul = [this,"MARKER",EQUIPMENT,RESPAWNS,DELAY] execVM "scripts\respawner2.sqf"; MARKER - Respawn within this marker. Random location within marker not working. EQUIPMENT - 1 will leave equipment on the respawned unit, 0 will remove all equipment including backpack. RESPAWNS - Any number under 900 will result in the ability of the unit to respawn that amount of times, but any number over 900 will result in the unit having infinite respawns. DELAY - Delay before the unit respawns after death. There are more features but I only list the ones I use, for more options read the scrip or readme that comes with the original release. Sorry, do not have time to source atm. File "respawner2.sqf" - Should be saved in a scripts\ folder within your mission. What I wanted this to do is; * Clear the entire inventory of the respawned unit and then give them a map and a compass. Possibly with an option to exec a .sqf or array to equip it with instead. Alternative to this would be having the default spawn unit have custom selected gear. * Disable AI completely, including radio chat and conversation. Would prefer the unit being completely hidden until a player inhabits it. * Random spawning location within a marker. * Possibly an option to random pick model. * Ability to edit the default respawn script to determine what unit spawns and what he weapons and items it has. All scripts I've found has suggested the this removeAllWeapons, etc. But that only applies once, if you die and respawn you become a new unit which I don't know how to poke. * Maybe using a pitch black room underground or so where the players would spawn in would work. Depending on which side they are the players then get teleported to their respective bases. This is to remove the need for none-ai units. However it would still require radio silence as hearing "where are you?" constantly, is quite annoying. It seems the "no ai units" problem is solved already.. here is the description.ext Vehicle respawner - I was using this one, but it proved to not work the way I wanted it and respawned vehicles too fast and too easy. It contains some features that I would enjoy adding to the other respawner. What I want this to do; * If an unmanned vehicles that are not drivable or/and are _X meters from any players they should respawn in base after _Y seconds. Optionally if vehicle is unmanned for _Y seconds it will respawn, do not agree with this function as it can always result in disappointment. * Possibly a chat message respawning all vehicles which are unmanned. * Possibly all vehicles on spawn position made invulnerable. * Possibly optionally setting vehicle max speed to or adding _X as well as general endurance of all parts. * Possibly clear the ground under the spawning unit from clutter such as after an helicopter exploding. * Possibly, Spawn units out in an array within a marker anywhere it has enough room for it to. * Create marker in front of vehicle when map is loaded, use this marker to determine which direction to face the vehicle from then on. (can probably implement this myself) Saves a lot of work with marker placement. Other script wishes: * Road detection script, I've got none and only found very small portions of the code for anything using it. But I'm looking to make random vehicles spawn along the road at a certain chance as you drive along. The vehicles should be picked from an array and spawn on the side of the road where there is room. Not crossing or standing on the road. The script should not be executed all the time and only within a certain rate of any player within the array of "runners". I've read about nearRoad or such script executions, but found no examples which I could understand clearly. Most arma code is confusing to me, and what I see as being logical usually ends up being wrong. ;p Curse my logic. * Building loot script. I've looked through some scripts for this, however the link posted for the script that had most of what I required was a dead link. I'm looking for a script which places loot boxes in buildings at a chance when player is within range. Not completely random loot, random from an array and chance list. I found some old post about a script that scanned the floors of houses and determined spawning locations useable for the house and putting them in an array, not sure how much I would be able to use that for but I can think of a few things. - Alternative would be spawning barracks/field hospitals/tents containing items of various types. - Method of creating tents could be using markers selecting a custom made layout of positions, items and buildings where all containing items would be saved into variables for use for other spawns. When map starts these builings would be removed and then spawned by chance as player gets close to either markers or towns. Spawning them where there is room for them and player can enter them. Using this method all "items" within the structure can be a spawn point for any other item(s), having these locations listed in an array. If this is possible it should make it easier, from my understanding. * Random vehicle spawn in town, in marker, next to road. Pretty much explains another thing I've had in thoughts, but as progress on all other functions have been pretty much halted due to lack of script knowledge and available explanations as to how to use them. * Dynamic spawn location - Spawn at nearest town from where player died, spawn a gear box near or in a building where the player would spawn within and a car or two outside. (This is probably not simple and sort of a mix of the above.) * If item x is in vehicle inventory add y to vehicle stat. * Ammo respawns for currently equiped weapon by chance in buildings as player passes through town/village/city. Erased when player(s) are out of range again. Doesn't reinit for the same town unless the same player(s) enters another first. * Platform that refills Health/Armor/Ammo if landed on top of. (nearly done, not tested on helicopters.. even though I use an helipad!) * Platform that heals injuries and replenishes ammo+health. (nearly done, not gotten trigger creation to work as I want yet though. May no longer need it in either case due to a versatile script I created. It is listed above) * I have pretty much started to understand the biki. Took some time :| Once I am done here I'll post all code in a list with as clear descriptions as I can come up with along with search words for future purposes. Cheers, Bombom.
-
[req] Alternative respawn method, default spawn gear change?, vehicle respawn, etc
BomboBombom replied to BomboBombom's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Originally nearly everything in this thread was questions. I get worried about creating too many topics so I try to squeeze it all into one. This thread is all of my progress on a map. So far I have worked out 3 codes for vehicle, player and all crew in vehicles healing functions. * Vehicles passing through or entering the platform are locked in place at their entering angle. Healed and refuled and then let go again. * Players holster weapon and do an animation, the current animation combination is pretty shabby but I'll work that out later. * Heal only player if player is the only unit in area. Only heal any and all units in vehicle that have taken damage, including the vehicle. All of the above is split into three codes which each took several hours, many of which I was just tired and mistyped variables thus script wouldn't run. ;p * Still not implemented ammo refill, but I believe it is as simple as setVehicleAmmo 1; , not sure if that fills every single turret on a vehicle. I've worked out respawns, all players have a set respawn inventory that they will have every time they spawn. But if they please they may go pick up something else from the weapon boxes filled with a limited selection of theme-chosen weapons and ammo. I've worked out how to make vehicles respawn after they are destroyed. Still need to make it so that they will respawn if they are 1 km from player, or without driver for x seconds and tipped over from their standing position, engine broken or missing a tire or two. I've worked out how to prevent all and any AI units from taking the spot of my player designated spawns. I've worked put random civilians in each town, automatically spawning. Still want to have random towns and cities generated to add some uniqueness to each time anyone plays the map. I've worked out how to reduce the damage taken from any source of damage, changeable by value. I've stopped work on random spawn items in houses and such, but I'd love it. I've looked around for code examples but all I found was links to removed files when anyone posted an example script. I've not yet continued attempting to spawn random vehicles at chance near the roads player drives towards. I've not yet continued in making random armed units that spawn in random locations, avoiding spawning in objects or houses and being hostile towards the "chasers", the riders of the choppers in which they chase the "runners". I've not yet added any rewards or objectives, that is for when code is done. The runners will need to get to bigger towns for some sort of fierce game changer making the chasers make sure to be more careful in their hunt for the poor runners. I've not yet attempted or worked out any part of town name announce script which would note runners of where they are when entering a new town with a name. (Do not want markers or triggers located in each town, maybe initialized once. Hmm, that sounds easy enough! ~light bulb above head~) None of the above would have happened without the biki or this forum (along with a few other places and people, don't worry credit is being placed once everything is done). This probably almost sums everything up, I'm tired atm and can not remember some subjects I've been poking. I'll attempt to index this better tomorrow and add more of the code. -
[req] Alternative respawn method, default spawn gear change?, vehicle respawn, etc
BomboBombom replied to BomboBombom's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I'd enjoy all/any feedback and would love any optimizations to the scripts listed. My gf hates arma 2 for obvious reasons! ;p -
Hello there, I've been working on a map for Arma II OA for me and some friends to play together. While we were testing ACE i opened it up in the editor and made some changes, I do not believe I've used any functions that are specific to ACE at all but it will not run in normal Arma II OA any more. Is there any way I can solve this issue? (I've searched for a solution to it, but I guess my search words weren't wrote well enough for a proper result. These days you pretty much only find DayZ threads :p)
-
From ACE back to Arma II OA
BomboBombom replied to BomboBombom's topic in ARMA 2 & OA - ADDONS & MODS: DISCUSSION
Thanks maturin . I removed all ACE_ ace_ triggers and units. But it seems ace renamed a lot of units. ACE did not add only that problem, respawns on the map no longer works either after fixing the compatibility issue. Some vehicles still get removed even if I replace them with existing ones. But, never the less, I'll post the file. https://dl.dropbox.com/u/92444112/MAPattempt.Chernarus.rar It is a heli chase map, red runs from blue. It is nearly complete :p But then again, ace caused some trouble. Some sort of way to replace wrongful names in a macro would be helpful :| Wish Arma II replaced stuff back to what it should be just as ACE replaced things in my map when used. ---------- Post added at 02:18 ---------- Previous post was at 01:55 ---------- Probably fixed : https://dl.dropbox.com/u/92444112/ProbablyFixed.Mapz.Chernarus.rar Had to Identify all units and entries that were replaced by ACE <.<. To fix the respawn I had to remove entries on the spawned unit, if thats the reason it worked I am not sure. .. remains to test on the other unit spawn for red team. ---------- Post added at 03:46 ---------- Previous post was at 02:18 ---------- The spoiler bellow is simply me forgetting I need a radio to use sideChat etc. Which is annoying as I don't want a radio and hint wont suffice well :p. -
After hours of testing and searching to determine various functions I solved it: The problem of this only reacting to playing people is still there. I have npcs walking around on the map and I do not want any of them to be able to trigger the healers. I don't understand why there is no unit type "Player". In my opinion it is a kind of obvious function. Ellipse shaped Trigger with size a 3.8 by b 3.8 , Angle 0. Activating to anybody and Repeating. Set to Present on Countdown with 0,0,0 in Min,Mid,Max. Type None and name healpad. The 3.8 can vary to mark the area on map. Condition: what = nearestObjects [thisTrigger,["Man","Player","Car","Tank","Helicopter"],3.8]; count what != 0; On Act. if (vehicle (what select 0) isKindOf "Man") exitWith{ hint Format ["%1",what select 0]; }; string = text Format ["%1",what select 0]; { string = text Format ["%1 , %2",string,_x]; } forEach crew (what select 0); hint Format ["%1",string]; Vary the 3.8 after Helicopter to change area of reaction. Full script will be posted. (no slow regen script in use) If anyone has been wanting a code for picking each unit and healing them (not refilling their ammo just yet), here it is a fairly completed script for you. Use the same settings for the trigger as above. car = what select 0; if (vehicle car isKindOf "Man") exitWith{ if ((damage car) > 0) then { car setDamage 0; car sideChat "You have been healed."; }; }; { if ((damage _x) > 0) then { DAMMAGED = DAMMAGED + _x; }; } forEach crew car; if ((damage car) > 0) then { car vehicleChat "Vehicle has been repaired."; car setVehicleAmmo 1; car setVehicleArmor 1;}; i = count DAMMAGED; if ( i == 0 ) exitWith{}; { _x setDamage 0; car vehicleChat Format ["Passanger %1 was healed.",name _x]; } forEach DAMMAGED; Old post spoiler
-
Vehicle passenger array
BomboBombom replied to BomboBombom's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thank you a ton :-) I'll see how well it works.