Jump to content

Taylor1984

Member
  • Content Count

    90
  • Joined

  • Last visited

  • Medals

Community Reputation

14 Good

About Taylor1984

  • Rank
    Corporal

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Taylor1984

    Detect weapon reloading

    I found this thread on the subject and their mention something using magazinesDetail and magazinesAmmoFull as methods of counting ammo in mags but I couldn't get it to work.
  2. Taylor1984

    Detect weapon reloading

    Yes, I read about that and maybe that's a solution for a unit on foot. For a unit using the weapon of a vehicle it seems more tricky, at least for me who's not that good at scripting.
  3. Taylor1984

    Detect weapon reloading

    That's right. I'm doing this RTS style mission and when you select a unit detailed information about this unit is being displayed in real time, like: what weapon he is using, ammo count for that weapon, health status, actions. So if the unit for instance is firing the cannon of a vehicle the picture of a cannon is displayed and his action displays "Firing".
  4. Taylor1984

    Detect weapon reloading

    Thanks. Yes, I did not get it to work and also I read somewhere that it fires after the magazine has been reloaded, which is strange because it says in the description otherwise. I'll try some more. Edit: I tried it with a hint and unfortunately the hint displayed after the reloading process was completed. Maybe something within the EH fires at the intial reloading as well but if that is the case I wouldn't know what do do. Perhaps it has something to do with the "_oldMagazine" param?
  5. Hi I've searched everywhere for a solution to my problem but so far no luck. I'd like to detect when a weapon gets reloaded, both infantry weapon and vehicle weapon. I guess you could somehow check when the current magazine in the weapon is out of ammo or something, thus an AI would immediately reload? I know how to count the bullets of all magazines for a ordinary weapon and vehicle weapon but not for just the weapon magazine, at least not for a vehicle weapon. needReload does not help since it returns 0 as soon as the vehicle starts reloading its weapon. Edit: _mag = vehicle player currentweaponTurret [0];player ammo _mag Returns the ammo inside the vehicle weapon magazine but that does not help me since as soon as the vehicle starts reloading an empty magazine it returns a full magazine again. Any help would be much appriciated. Cheers
  6. Taylor1984

    Marker on top of other marker

    I'm still having problems with this, actually. I have these markers placed on the map in the editor and while playing the mission I'm creating new markers as I go and if one of the new markers gets created at the position of one of the original markers the new marker will be placed on top of the original marker. I would like to create new markers that ends up underneath all other markers. Is this possible? Thanks
  7. Hi I would like to check if a specific backpack is on the ground (I guess inside a weaponholder) and have an AI pick up that backpack. I suppose you would use nearestobjects and count the amount of backpacks within the closest weaponholder or something. I know how to find out whether a backpack is inside a crate using {_x == _backpack} count backpackcargo _crate >= 1 but I don't understand how to do this with the closest weaponholder. Cheers I'm sorry, I didn't search the forums well enough since I found a solution: https://forums.bohemia.net/forums/topic/160050-make-ai-pick-up-backpack-from-ground/
  8. Yes surely and it's also part of the fun I guess. My problem is that I'm not really a programmer and don't understand all that I'm doing but through trial and error you can reach results. I found a solution to my problem now by checking for nearbyobjects "house" and check the getHit on the spot every second. I also check when the house becomes a ruin and end the script that way.
  9. First time I notice those watch fields. Thanks. You're right, I did the same thing as you in the watch field and it worked but the trigger with the same condition still didn't fire. Then I tried: test1 gethit "dam1" >=1 and it worked. Thanks all, you're the best. Howerver, a new problem is that when the building gets a gaping hole the building gets deleted and replaced with a new one so then I can no longer check the damage of the building so I guess I'll have to use BuildingChanged somehow or nearestObjects rather. I need to check for holes all over the building and not just one.
  10. Maybe but I noticed now that the building is actually from the CUP mod and some of those buildings are vanilla ones, right? I've only ever created a trigger like this: Condition: house getHit "dam1"==1 Activation: hint "test" In the config viewer I now found the following: replaceDamagedHitpoints[] = {"HitZone_1_Hitpoint","HitZone_2_Hitpoint","HitZone_3_Hitpoint","HitZone_4_Hitpoint","HitZone_5_Hitpoint","HitZone_6_Hitpoint"}; So it appears to be 6 hit zones on the building. Lineintersect, OK, maybe I'll have to look into that.
  11. You're right, when I look at the icon next to it it seem to be from the WW2 mod Iron Front. I thought it was the original building since in the config viewer it says 'author: Bohemia Interactive' and that the mod just makes it possible to place in the editor. It feels like a vanilla building since I don't think they would make that much effort in creating damage models for a house in a mod, plus the AI have paths for walking around on all floors and such. BuildingChanged might work if I find the names of all the models in the config viewer but so far no luck. What happens to this bulding when you put explosives on one side of the building a big gaping hole appears on that spot, so it's more detailed than the houses just falling down. And I found that when I execute: _building setHit ["dam1", 1];, _building setHit ["dam1", 2];, _building setHit ["dam1", 3]; etc I can demolish the different places on the building, so that's why I think it should be possible to detect every individual part. It's also important for me to get the specific part being demolished since I have static objects on the roof of the bulding that I want to delete or move when a big gaping hole appears underneath the object. Otherwize they just hover in the air since they aren't simulated. Maybe it's possible to detect whether an object is hovering in the air with no floor underneath instead? I think I tried getposATL but to no avail. It probalby all comes down to me not being able to type the code correctly, since I think it should work with getHitPointDamage or getHit. Thanks
  12. Ah, right. But checking that the damage of the first part of the building, which I supposed is called 'dam1', then? As I mentioned _building setHit ["dam1", 1]; destroyes the 'first' part of the bulding. _building getHit "dam1"==1 doesn't work for instance. It's the command center made by BIS: 'Land_Mil_House_EP1'. An editor placed object.
  13. Yes, but I couldn't get it to work, besides I need to detect when the part is destroyed not just hit. Thanks
  14. Hi I know how to destroy a certain part of a building by eg using: _building setHit ["dam1", 1]; But how do you detect when a part is destroyed? Thanks
  15. Thanks, that looks really great.
×