Jump to content
⚠ Known Issue: Media on User Profiles ×

fatmanmagister

Supporter
  • Posts

    5
  • Joined

  • Last visited

Nexus Mods Profile

About fatmanmagister

Profile Fields

  • Country
    Sweden

fatmanmagister's Achievements

Newbie

Newbie (1/14)

  • Conversation Starter
  • First Post
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. I said I went with the iterative approach, meaning I used "FindAllReferencesWithKeyword()" which I mentioned in my original question. If you wanted details on how I did it you could just ask, instead of being passive aggressive about it. The source code is packaged with my mod: http://www.nexusmods.com/fallout4/mods/24184
  2. Ok, that looks like a viable way to do it, but I already decided to go with the iterative approach. It has it's drawbacks but I managed to get it working fairly well. Thanks anyway!
  3. All my references can detect OnHit events, I've already tested that. The problem is that explosions placed with PlaceAtMe() does not actually count as a hit. If the player shoots at a Mini Nuke, the explosion goes off, but any nearby explosives remain unaffected and does not receive an OnHit event. The problem isn't with detecting an OnHit event, I got that working, it's that I don't know how to send an OnHit Event programmatically.
  4. I'm trying to make a mod to make objects like Mini Nukes, Mines, Grenades, etc, explode when they're hit. Now I've hit a wall trying to figure out how to make the explosion from an affected object trigger other nearby objects. My script is dynamically added to certain objects in the loaded cell. Relevant code: Event OnHit(ObjectReference akTarget, ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, \ bool abSneakAttack, bool abBashAttack, bool abHitBlocked, string apMaterial) akTarget.PlaceAtMe(fragMineExplosion, 1) //Doesn't trigger OnHit events of other objects akTarget.Delete() EndEvent The fact that explosions or projectiles placed with PlaceAtMe() doesn't trigger OnHit events wasn't all that surprising but I'm stumped to find any other way to trigger the explosion. I guess I could just use FindAllReferencesWithKeyword() and iterate over all nearby explosives, but I feel like that will require quite a bit more complex scripting and will be more prone to bugs. So does anyone know of a way to trigger an explosion from a script that will then also trigger the OnHit events of nearby objects? Any help would be very much appreciated.
×
×
  • Create New...