Jump to content

A-SUICIDAL

Member
  • Content Count

    520
  • Joined

  • Last visited

  • Medals

Everything posted by A-SUICIDAL

  1. My bad, sorry Myke, I never posted in the addons section at all before. I do all my posting in the mission editing/scripting section - and I skipped a nights sleep, so I thought I was in the right place. I'll probably just contact Marseille77 or keep hunting for a good Heavy MG for the opfor in my coop mission. About asking for configs and stuff, I wouldn't even know where to begin with that. That MG69 was awesome to use, I just wish the enemy knew how to use it. You can move this.
  2. I'm having a few small problems with this addon. First off, I created a new ammobox script using the class names from the reply above. I tested it in the game and I did not receive any errors upon launching the test mission. I then started to grab guns and test fire them, but I immediately received an error that said... "Picture \kpsf_weapons\data\icons\w_rpd_ca.paa not found", so there was no picture of the RPD in the ammobox and when I chose the weapon, I was holding an invisible gun. Also, only the Assault Rifle 44 and the Uzi's had ammo. The MG42 had ammo, but it did not have the pictures of the magazines and the gun had no sound at all when fired. I installed this addon because I wanted to use the RPD and the MG42 in a mission that I am making. Is there a way to get this addon working correctly? Could somebody please help me with this? I added an ammobox to my mission and put this in its init: null = this execVM "german_ammobox.sqf"; german_ammobox.sqf: while {alive _this} do { clearMagazineCargo _this; clearWeaponCargo _this; _this addWeaponCargo ["KPFS_G1", 8]; _this addWeaponCargo ["KPFS_G3SG1", 8]; _this addWeaponCargo ["kpfs_G3a3", 8]; _this addWeaponCargo ["kpfs_g3a2", 8]; _this addWeaponCargo ["kpfs_g3a4", 8]; _this addWeaponCargo ["kpfs_hk32", 8]; _this addWeaponCargo ["KPFS_HK4", 8]; _this addWeaponCargo ["KPFS_HK416_Aim", 8]; _this addWeaponCargo ["KPFS_Makarov", 8]; _this addWeaponCargo ["KPFS_MG1", 8]; _this addWeaponCargo ["KPFS_MP2", 8]; _this addWeaponCargo ["KPFS_MP2A1", 8]; _this addWeaponCargo ["KPFS_MP5A3SD", 8]; _this addWeaponCargo ["KPFS_MP5A3", 8]; _this addWeaponCargo ["KPFS_MPi_KMKIX", 8]; _this addWeaponCargo ["KPFS_P5", 8]; _this addWeaponCargo ["KPFS_HKP7", 8]; _this addWeaponCargo ["KPFS_P8", 8]; _this addWeaponCargo ["KPFS_HKP30", 8]; _this addWeaponCargo ["KPFS_P1", 8]; _this addWeaponCargo ["KPFS_P88", 8]; _this addWeaponCargo ["KPFS_P99QA", 8]; _this addWeaponCargo ["KPFS_P220", 8]; _this addWeaponCargo ["KPFS_P225", 8]; _this addWeaponCargo ["KPFS_P226", 8]; _this addWeaponCargo ["KPFS_P2000", 8]; _this addWeaponCargo ["KPFS_PM63", 8]; _this addWeaponCargo ["KPFS_PSL", 8]; _this addWeaponCargo ["KPFS_RPD", 8]; _this addWeaponCargo ["KPFS_KarS", 8]; _this addWeaponCargo ["KPFS_MP44", 8]; _this addWeaponCargo ["KPFS_TT33", 8]; _this addWeaponCargo ["kpfs_glock17", 8]; _this addWeaponCargo ["KPFS_P52", 8]; //Ammo _this addMagazineCargo ["kpfs_8Rnd_9x17", 100]; _this addMagazineCargo ["KPFS_120Rnd_MG1", 100]; _this addMagazineCargo ["KPFS_32Rnd_MP2", 100]; _this addMagazineCargo ["KPFS_8Rnd_9x19_P5", 100]; _this addMagazineCargo ["kpfs_8Rnd_9x19", 100]; _this addMagazineCargo ["KPFS_15Rnd_9x19_P8", 100]; _this addMagazineCargo ["KPFS_8Rnd_9x19_P1", 100]; _this addMagazineCargo ["KPFS_16Rnd_9x19_para", 100]; _this addMagazineCargo ["kpfs_9Rnd_9x19", 100]; _this addMagazineCargo ["kpfs_15Rnd_9x19", 100]; _this addMagazineCargo ["KPFS_13Rnd_9x19_P2000", 100]; _this addMagazineCargo ["KPFS_25Rnd_pm", 100]; _this addMagazineCargo ["KPFS_10Rnd_PSL", 100]; _this addMagazineCargo ["KPFS_100Rnd_762x39_RPD", 100]; _this addMagazineCargo ["KPFS_10Rnd_762x39_SKS", 100]; _this addMagazineCargo ["KPFS_30Rnd_762x43_STG44", 100]; _this addMagazineCargo ["KPFS_8Rnd_762x25_TT33", 100]; //Handgrenade _this addMagazineCargo ["HandGrenade_dm41", 100]; //TimeBomb _this addMagazineCargo ["Mine_DM11", 100]; sleep 3600; }; ---------- Post added at 11:39 PM ---------- Previous post was at 10:05 PM ---------- Nevermind. I took a closer look at this mod. It's all screwed up. Tons of problems and errors. My RPT file looks like a nightmare of errors. I figured out the missing ammo problem, but most the guns just look terrible, sorry. Did you take these weapons from an old Cold Crisis addon from 12 years ago? Most the aimsights don't line up center at all either. What's the point of having a high powered scope on the G3 if it's off to the left by 8 millimeters? That will cause you to miss a headshot by about 8 feet to the right at 400 meters. I was really hoping this addon was going to work out well. Now I have to go find some good enemy MG's someplace else. Anybody know where I can find a good MG42, RPD or similar? The ones in this addon do not work at all.
  3. I wrote a script a long time ago and it works fine when I host from my computer, but earlier today I played my mission on somebody's dedicated server and noticed a few of my scripts in my mission were not working. There were no script errors either. This is one of the scripts... Base flagpole: this addaction ["Teleport to Blackhawk", "teleport_blackhawk.sqf"]; _unit = _this select 1; if ( !alive blackhawk ) then { hint "The Blackhawk is currently destroyed."; } else { _freePosGunner = (vehicle blackhawk) emptyPositions "gunner"; _freePosCargo = (vehicle blackhawk) emptyPositions "cargo"; if (_freePosGunner > 0 and _freePosGunner < 2) then { _unit moveInGunner (vehicle blackhawk); } else { if (_freePosCargo > 0) then { _unit moveInCargo (vehicle blackhawk); }; }; }; So my question is... what do I need to change in this script so it will work on a dedicated server? I do not have my own dedicated server to test new script changes, so I was really hoping that somebody could help me with this. Thanks.
  4. I never got your script to work. I think something is failing with the _turretArray and _x. I temporarily remedied my old script by simplifying the script and just moving the player into cargo. Also, In the mission that had the problem, the AI are always disabled, so I don't know how I would have entered the game late and taken the place of an AI. I even have repeating triggers for each player that check if the player is not a real player and will instantly delete the unit if it's an AI. I guess I'll never understand why the script was having problems on dedicated servers. It seemed like a very simple script. In any case, I'm back trying to get this script working again in a new mission that I am currently working on and I'd really like to get your script working if possible. I just tried it again and created a new mission, added a UH-60M and named it "blackhawk", then added a flagpole and put your addAction in the init of the flagpole. Then I copied your script and pasted it into a new "teleport_blackhawk.sqf". I then tested the mission and the action appears, but nothing happens when I perform the action and no errors appear either. I tried a few different things to see if I could fix it, but I still can't get it to work ar all and no errors appear ever - and I always have "show script errors" turned on. Nothing shows up in my RPT file either. I added a hint message to your script and it does appear, so I know the script is executing, it just doesn't seem to want to work correctly.
  5. I have a problem with my "Deploy Rally Point" script. It seems to work fine for the leader "s1", but only if the host is s1. If somebody else takes the leader s1 slot, they are not able to deploy the Rally Point at all. I had the script working in another mission I made, but this time I have written the script a little differently. In the past when the Rally Point was deployed, it would first delete the old Rally Point and then create a new one, but this time I have placed the Rally Point at base and when it is deployed someplace else - I simply setPos the Rally Point in the new position. Again everything seems to be working ok, except it only seems to work if the host is player s1. init.sqf if (isServer) then { rallyMoved=false; publicVariable "rallyMoved"; }; Repeating trigger at base tells player s1 to exec this: s1_add_deploy_rally.sqf if (alive s1) then { _actS1 = s1 addAction ["Deploy Rally Point", "rally\s1_deploy_rally.sqf", [], -1, false, true, "", "(_target == _this) && (speed s1) < 7"]; s1_deploy_rally.sqf: _manS1 = _this select 0; _actS1 = _this select 2; if (alive s1 and rallyTimer>0) then { hint "10 minutes has not yet passed."; sleep 6; hint ""; } else { rallyTimer=1; rallyMoved = false; publicVariable "rallyMoved"; waitUntil {!isNil "rallyMoved"}; _manS1 switchMove "AinvPknlMstpSlayWrflDnon_medic"; sleep 3; _manS1 switchMove "amovpknlmstpsraswrfldnon_gear"; nest setDir ((direction _manS1) -180); nest setPos (_manS1 modelToWorld [0.5,1.4,((position _manS1) select 2)]); crate setDir ((direction _manS1) -90); crate setPos (_manS1 modelToWorld [1.18,1.85,((position _manS1) select 2)-0.12]); nest setpos [(getpos nest) select 0, (getpos nest) select 1, -0.1]; crate setpos [(getpos crate) select 0, (getpos crate) select 1, -0.1]; teleport_to_object setDir ((direction _manS1) -90); teleport_to_object setPos (_manS1 modelToWorld [-0.2,+0.6,((position _manS1) select 2)-2]); "RallyPoint" setMarkerPos getPos teleport_to_object; sleep 0.5; rallyMoved = true; publicVariable "rallyMoved"; waitUntil {!isNil "rallyMoved"}; waitUntil{!(isNil "BIS_MPF_InitDone")}; [s1,nil,rGLOBALCHAT,"Rally Point deployed and marked on map."] call RE; sleep 6; hint "You cannot deploy a new Rally Point until 10 minutes has passed."; sleep 6; hint ""; sleep 588; rallyTimer=0; waitUntil {alive s1}; hint composeText [parsetext format["<t size='1' align='center' color='#00FF00'>Rally Point deploy available.%1</t>"]]; }; so can anybody help me fix this so it works for anybody that choose the leader s1 slot, and not just the host?
  6. Thanks. I'll try testing that now. Basically I am just trying to perform an action where player s1 deploys/moves an object to a new location, but for some reason it only seems to work if the host is player s1.
  7. Nevermind. I found it. Put RIFLE to Backpack Now I just have to find out if there is a way to add a specific weapon to the players "invisible" backpack at mission start.
  8. I'm looking for a non-ace "weapon on back script", if somebody could point me in the direction of one it would be greatly appreciated. I've searched high and low and I'm not having much luck. Thanks.
  9. I got this working, except when dragging the ammobox - if you hit either the enter key or shift key the player will then go into a new animation sequence. Actually, I just want to be able to drag and drop the ammobox, but I'm open for carry suggestions, it's just most the carry animations looked weird when used for an ammobox. I tried examining Norrin's revive scripts for dragging an unconscious player and he uses a "displayAddEventHandler ["KeyDown"....." function, but I can't seem to make it work in my sample mission. I haven't given up yet, but I was kind of hoping somebody could help me. I'm also trying to figure out how to make it so a player cannot drop the ammobox if he is within 4 meters of any object, with a hint warning incorporated - to prevent the player from droping the ammobox inside of a wall or a rock. Lastly, I have a couple of triggers that detach the ammobox if either player s1 or s2 are killed while dragging the ammobox, but this system is my poorman scripting way of getting them to drop it when killed, so I need to find a better way to do that if possible. I'm trying to use the drag and drop ammobox script in a 2 man coop stealth mission that I am making, but I want to get it bug free and usable in future missions that have more than 2 players. It's a good script, any help with perfecting it would be most appreciated. I know there are alot of scripts like it, but I'm not looking to carry artillery pieces around, lol. After a C130 drops the ammobox, I want to be able to drag the ammobox full of rockets behind a big rock before the convoy of tanks spots me rearming in the open. Anyway, here's my script so far First, I added this to my init.sqf file: if (isServer) then { attached = false; publicVariable "attached"; }; I placed an ammo box and named it "ammobox" and put this in the init: this allowDamage false; this addAction ["Drag Ammobox","drag_ammobox.sqf",nil,1,false,false,"","!attached and player distance _target<5"]; drag_ammobox.sqf _box = _this select 0; _unit = _this select 1; _act = _this select 2; _unit removeAction _act; _unit playMove "acinpknlmstpsraswrfldnon"; sleep 2; _box attachTo [_unit,[0,1,0.2]]; attached = true; publicVariable "attached"; _actionId = _unit addAction ["Drop Ammobox", "drop_ammobox.sqf", [], -1, false, true, "", "(attached and (_target == _this))"]; drop_ammobox.sqf _box = _this select 0; _unit = _this select 1; _act = _this select 2; _unit removeAction _act; // if I use... detach _box ...it doesn't work. hmm. detach ammobox; _box setpos [(getpos _box) select 0, (getpos _box) select 1, 0]; _unit switchMove ""; attached = false; publicVariable "attached"; Sample Mission I'm going to keep trying to get this KeyDown stuff working, but I've about given up. I might leave it as it is - if I can't get the few bugs worked out.
  10. A-SUICIDAL

    Drag Carry Ammobox

    First I just want to thank you for all the help you've been giving me. I tested the script and when I am dragging the box and I press my "Enter" key, I still have the problem where the player stops dragging the box and begins to try to carry the box on his back as if it is a wounded soldier. If I press the "Right Shift" key while dragging the box, the player stops dragging and returns to a kneeling position with gun raised and box still attached. I think I know why this is happening. I have all of my key controls re-binded in Arma 2. Basically I do not use any of the default keys. Normally - in every first person shooter that I've been playing over the past 20 years I've been using the 6 keys above the arrow keys as my main directional movement controls. This allows me to have easier access to all the surrounding keys. I use the "Enter" key for "UP" which makes me stand up, and I use "Right Shift" to "CROUCH". Maybe it's not so much the "Enter" key and "Right Shift" that is causing the problem, but instead it might just be that the problem is being caused by the player hitting "CROUCH" or "UP" while dragging the ammobox. So maybe what I need to do is block "UP" and "CROUCH" some how while the player is dragging the ammobox. Try the script yourself and while you are dragging the ammobox, hit your "UP" (standup) key or "CROUCH" key and you will see what I am talking about. ---------- Post added at 01:09 PM ---------- Previous post was at 12:38 PM ---------- Also, I tried adding some extra stuff to detect if the ammobox is withing 4 meters of an object and if it is - to then give a hint warning that the player needs to find a clear area to drop the box. I don't know how to script this correctly. I've never used "nearObjects" before. Anyway, this is what I tried to do, but it gave me errors. The whole idea is... to prevent the player from dropping the ammobox into a wall, rocks, vehicle and then loses the ability to use the ammobox at all. _temp = player getvariable "drop"; _box = _temp select 0; _unit = _temp select 1; _act = _temp select 2; _list= position _box nearObjects ["ALL",4]; if (_list > 0) then { hint "There are objects in the way. Find a clear area to drop the ammobox."; } else { _unit removeAction _act; _unit removeMPEventHandler ["killed",0]; //hint format ["%1",_temp]; detach ammobox; _box setpos [(getpos _box) select 0, (getpos _box) select 1, 0]; _unit switchMove ""; attached = false; publicVariable "attached"; };
  11. A-SUICIDAL

    Drag Carry Ammobox

    F2k Sel, I am now using your script to get the player to drop the ammobox when the player is killed. It works great. Thank you very much. Giallustio, unfortunately you script will not help me in this case, but I do use your script in other missions and I think it is one of the best scripts out there. I remember searching forever for a good lift script and finally came across yours and it worked great and I use it in every mission I make where I need choppers to lift vehicles. I also gave credit to you in my "Co-14 Infiltration" mission: http://www.armaholic.com/page.php?id=15990, which you can see if you scroll down the page. SaMatra, I tried using your script and when testing it worked and the hint appeared, so I then chose the action to drop the ammobox, but I could not get the hint to stop appearing on every keypress from then on. What I would like to do is... if either the "Enter" key or "Shift" key is pressed while the player is currently dragging the ammobox, I want to then exec the "drop_ammobox.sqf" or do the things that are in the "drop_ammobox.sqf" file (basically just get the player to drop the box). Is there a way to make this possible?
  12. A-SUICIDAL

    Drag Carry Ammobox

    Thanks guys, and sorry I have been away for a few days, I had some unexpected business that I needed to tend to, but I am back working hard on my mission now. I will try everything that you guys suggested. I am more confident now that I will get it working correctly thanks to all your help. I will come back and let you know how it's working out.
  13. Updated Video & Download Link Lights are now incorporated.
  14. This is a test mission I created using scripts that I wrote that enables a player to pick the lock of a locked vehicle. When picking a lock a car alarm will go off(I created my own car, pickup and truck alarm sounds). Once the lock is picked and the vehicle is unlocked - the alarm sound will stop and a quick chirp sound will occur letting you know the vehicle alarm is now disarmed. You can also shoot a vehicle and when it takes damage the alarm will go off for 1 minute, but only if the vehicle alarm has not yet been disarmed. After one minute has passed and the alarm has stopped, the alarm will become ready again, so damaging the vehicle further will set the alarm off again for another full minute. If you shoot the vehicle while the alarm is already going off, it will not play another "over-lapping" alarm sound. This script is very useful (and fun) in the 2 man stealth mission I am creating where one of the objectives is to "Steal a car" and there are enemy in the area where the vehicles are located, so an alarm is likely to go off when a bullet hits a vehicle. Lock pick time is 8 seconds. The car alarm has a sound radius of 150 meters. When choosing to repair a vehicle, you will be given a hint letting you know that you must first unlock the vehicle before being able to repair it. When a vehicle is fully destroyed, the alarm will be disabled completely and both the "Pick Lock" and "Repair Vehicle" actions are removed. So far the scripts are bug free as far as I can tell, but I want to test it further before releasing it. I'm not sure if anybody has already created a similar car alarm script, I haven't looked, but this is something I created all on my own today. I'm still a novice when it comes to scripting. I started creating a new 2 man MP Coop/SinglePlayer mission today and it's the first time I've worked on anything related to Arma 2 since I last released a 14 man coop mission !!![CO-14]Infiltration(OA)v2 back in the middle of February this year. I've already gotten rusty at scripting, but my inventive mind is still brewing with new ideas. And I just wanted to say "Hi!" to a bunch of my friends in the forum that I have not seen in quite a while :D Updated Video & Download Sample - Lights are now incorporated.
  15. I was a little confused before about assigning the ai to a vehicle. My problem isn't assigning the ai to the vehicle and gettting him in, my problem was keeping him in the vehicle. It's like he isn't assigned to it at all, even though I just assigned him to it and orderGetIn. He just gets out. I think he might stay in if I assigned him differently. I don't think he likes the un-named vehicle, or something. Maybe he's on drugs. Obviously when you move a human into a cargo seat, you don't have to worry about them getting out against your orders, but ai are a pain in the ass. Humans use a teleport flag at the current spawn area, but the ai need a little help. The spawn area also moves around alot as each new checkpoint area is capped. When the ai dies and respawns it sets aiRespawned=true as a publicVariable and then I have a repeating trigger that checks to see if that variable is true and also checks to see if a bunch of other conditions are met and then activates 1 of 2 triggers. 1 trigger teleports the ai to the player if the player is on foot at the same direction, height etc. The 2nd trigger will teleport the ai into the cargo of whatever vehicle the player is driving. Humans teleport from the flag into the gunner, commander etc, but I limit the ai to just cargo position: Here's just the teleport to vehicle part that the ai uses: cond: (aiRespawned) and (alive s2) and (s2 !=player) and (alive s1) and (vehicle s1 != s1) and (s2 distance rallyFlag <20) act: s2 assignAsCargo (vehicle s1); [s2] orderGetIn true; s2 moveInCargo (vehicle s1); aiRespawned=false; publicVariable "aiRespawned"; The ai is suddenly sitting next to me in the vehicle that I am driving, but as soon as I stop, he hops out and runs away and then stops and stands around looking dumb. I want him to stay in the vehicle until I tell him to get out, because he's my bitch, lol. I'll try a setFormation and see if that helps. Shrug.
  16. I tried his code and I couldn't get it to work. On most normal, non-ace domination servers that I join, they always have an option to "put weapon to back" or something. I forget what the actual action is called exactly. I just wanted to put the same thing in my mission. The last time I had a script like this in my mission, it was over a year ago in some ace mission that I made, but since then I don't have the mission anymore and if I recall correctly, the script only worked with ace. I have seen this script on vanilla servers. I think 7cav uses it. The 18th uses it in their domi mission too.
  17. I still can't find anything :(
  18. I have a similar problem where I have an ai named "s2" that respawns and is then teleported to "s1" leaders position. This works fine, but I have another script that checks if the leader is in a vehicle and if so - teleports the ai into the leaders vehicle, but as soon as the vehicle comes to a stop, the ai gets out and just stand there like duh. I want the ai to stay in the vehicle. I tried to assignAsCargo and orderGetIn "true", but the problem comes in that the vehicle could be any number of different vehicles - and most of the vehicles don't have names. So I need to check to find out what "vehicle s1" is, but I don't know how. It would be great if there was a "getVehicle s1" command, but there's not, and I don't know what the correct way would be move and ai into the cargo of what ever vehicle s1 is currently in. s2 assignAsCargo (vehicle s1???); [s2] orderGetIn true; How would I script this to work correctly?
  19. I'm not sure I understand what you mean.
  20. Well, I'm just a novice at scripting and my sample mission only works for 4 vehicles that use the names "car", "hatchback", "pickup" and "truck". Most all the scripting is done the "poor man" ghetto way, lol. What I originally wanted to do was create a script that would detect the vehicle type and then add the alarm system to specific civilian vehicles. First the vehicles would need to be set as "locked" in order for it to work. Then I thought that maybe it would be easier to just have the script run on all civilian vehicles, but detect the type of vehicle and then apply the correct alarm sound, so a truck alarm would be different from a car alarm. There are many things to take into account when writing a script like this, for instance... Requirements before alarm sound can play: 1. Vehicle is alive. 2. Vehicle has been hit. 3. Vehicle lock is being picked. 4. Alarm is not currently playing an alarm sound. Alarm will not play if: 1. Vehicle is dead. 2. Alarm is currently playing. 3. Vehicle alarm has been is disarmed. To get alarm to play: 1. Attach invisible H to car. 2. Have helipad "say" the sound. 3. Wait aprox 50 secs and delete the H to stop the sound. After picking a lock - stop the sound, but then attach another H and have it say the "ChirpChirp" sound. I'm not ready to write such a script that would work for all civilian vehicles. Maybe one day I might reach an advanced scripting status, but for now I have to struggle. There are plenty of guys in these forums that do have the skills to make it work, and it would be a fun little project for somebody with the skills and the spare time. For now I have it working great for a few vehicles and I can easily expand it to work for more vehicles if I need to, but yeah, it would be great if it worked for all civilian vehicles, then you could just plop an "Ambient Civilian Vehicles" module in your mission and- well you get the picture. Yeah, in the zombie mod it would work great. The vehicle alarm sound could be scripted to alert zombies and make them move to the vehicles position. Make the lock pick time longer, like 30 seconds.
  21. Those car links you posted, you just reminded me that I need to start working on the new cars for my racing team for Game Stock Car. They just released the 2012 Game Stock Car update that uses all new car templates from the 2011 series cars, so I need to start working on them in Photoshop asap since my team currently has no cars to use :( These are the cars I designed for my racing team that are no longer usable with the new 2012 Game stock car release. And this is a sample of what the game is actually like(might need to login to view it): I want to learn the track editor next. Like 4 different games that I am creating stuff for right now, heh. Never gets boring.
  22. I remember when I played Ghost Recon Advanced Warfighter for the first time and I shot a car and the alarm started going off and I thought "wow, that's so cool". I had never seen that before in a FPS game. I also remember way way back when I first started playing OFP Cold Crisis and there was a SP mission called "Steal the car" if I remember correctly. It was a short mission, but I played it over and over again. In my the new MP Coop/Single Player mission I am working on, the first objective after a HALO insertion is to steal a car. I want to create the first objective similar to the old OFP mission, and I just had to give the cars alarms, because I miss hearing them in Advanced Warfighter. It should be a good mission when it's done. For the first time I will be tackling how to use random placement of things like enemy units and vehicles, friendly waypoints and whatever else I can make random. I want the mission to have unlimited playability (never plays the same way twice). I hope it works out.
  23. Download Sample Mission
  24. I tried putting this in the init field of the car: this addEventHandler ["hit","hint 'car was hit'"]; This works, but only when I hit the car with a rocket. If I hit the car with a bullet, or lots of bullets, it does not show the hint message at all. I need it to show the hint message if just 1 bullet hits the car. ---------- Post added at 04:53 AM ---------- Previous post was at 03:53 AM ---------- I tried celery's script and everything works correctly now, except my car takes no damage. If I use this my car alarm script works great and the car detects being hit, but the car never takes damage: this addEventHandler [ "HandleDamage", { // this part activates my alarm trigger, the alarm sound plays from an attached invisible helipad, // both the helipad and trigger are deleted and recreated after 60 seconds // to prevent overlapping alarm sounds when the vehicle is hit. // So when the alarm stops, it can be set off again if the car is hit again. carHit=true; publicVariable "carHit"; } ]; What would I need to add to this script to make the car take normal damage? ---------- Post added at 05:38 AM ---------- Previous post was at 04:53 AM ---------- Nevermind. This worked: this addEventHandler ["HandleDamage", {carHit=true;publicVariable "carHit";((_this select 2)+0)}]; Nearly gave up, tried all of the above. Nothing worked on a car. The car was always indestructible. Then I tried what cuel mentioned above and one of the tires on the car went a little flat, but then I couldn't damage the car any further unless I used a maaw, which blew the car up. Then I tried changing the damage to 0, and everything worked perfect. Thanks cuel, sorta :) Now my car alarms are working perfectly.
  25. When I paste your code into the init field and hit "ok" I get the message "Local variable in global space". I'm assuming it's because of all the underscores, heh. Anyway I'm not sure if my searching lead me to the right place. I'm trying to tweak a script I just created where a car alarm goes off when a specific car is damaged. There are a few triggers involved too, but it's a bit involved to post it here, anyway... the alarm goes off for 1 minute and then stops. I start and stop the sounds by attaching invisible helipads that play the sound and deleting the helipads when i want the sound to stop. After the alarm stops, I would like for the alarm to go off again if the car takes any further damage. Just like a real car. The script I wrote is not working well. After the minute has passed and the alarm has stopped, a newly created trigger is then ready to check if the vehicle gets hit again and takes further damage - and will set the alarm off again. All I really need to do is check to see if the vehicle has been hit again, it doesn't matter what it was hit by or what part of the vehicle was hit, I just need it to detect if it's been hit again and if I can't do that, then I want to try to get the current getDammage of the vehicle and then have the alarm script go off if the vehicle has been damaged more than the current getDammage amount. I hope that made sense. I'm sure this is possible, but I'm not exactly sure how to script it. I wish it were as simple as putting (wasHitAgain car1) in the condition field, lol. =========================== (edit) I'm trying to do something like... trigger condition: getDammage car1 >= getDammage car1 + 0.01 trigger activation: will re-run the car alarm script and deletes this trigger but obviously the condition isn't working for me. Any ideas as to how to make the condition work correctly?
×