EPDGaffney Posted March 24, 2018 Share Posted March 24, 2018 (edited) Edit:The dilemma outlined below is sorted out by the following function: SetInteractionDisabledhttps://geckwiki.com/index.php/SetInteractionDisabled Well, detecting the exact explosion damage is still a problem, but that appears to stem from its damage being applied later than the hit; the explosions now register on the enemies and the correct HP is deducted, but this information is not readily available in a script (I am devising a work-around, but the standard methods will not work). But the other nice little æsthetic things I had gained by using SetDestroyed are now present again via SetInteractionDisabled.------------------------------------------------------------------------------------------Original Post:I needed to use SetDestroyed on some actors to simulate corpses because some other stuff I needed wasn't working on actual corpses. It was working really, really well. But I need these 'corpses' to be affected by explosions, and why, oh Jesus, Mary, and Joseph, why, I couldn't say, but SetDestroyed causes actors to be immune exclusively to explosions. I need this not to be the case. I've tried faking it by checking is the weapon responsible an explosive weapon, using GetHitWeapon and IsWeaponSkillType but no luck for some reason. I thought it wasn't even registering the hit but it prints in the console when that block is run, so I'm guessing it's somehow not connecting the explosion to the weapon? How does the mighty and villainous Gamebryo think? Can anyone say? Edited April 3, 2018 by EPDGaffney Link to comment Share on other sites More sharing options...
Deleted1205226User Posted March 24, 2018 Share Posted March 24, 2018 I don't know if it helps, but since its brainstorming... SetDestroyed is used in Destruction Data to end the addon sequence and make the object inert and non responsive to further damage.It basically says "this object cannot have its state modified, it cannot be interacted with anymore". Link to comment Share on other sites More sharing options...
EPDGaffney Posted March 24, 2018 Author Share Posted March 24, 2018 Thanks. Unfortunately, this function just doesn't work that way when used on actors. Truth is, it's meant for objects, not actors, but this is literally the only thing left for me to solve before I can move on, and SetDestroyed was working perfectly for hiding the health bars, hiding the names, hiding the compass markers, even counting headshots and letting me script things with that...it's just this thing where explosives do no damage. Link to comment Share on other sites More sharing options...
kingbeast88 Posted March 24, 2018 Share Posted March 24, 2018 Unless the corpses need to be hit by a player weapon with all the effects that would follow from that, perhaps you could full on fake the explosion? If a hit can be detected to the corpse use a PushActorAway command using whatever variable force you want with some sort of placeat explosion maybe. Link to comment Share on other sites More sharing options...
EPDGaffney Posted March 24, 2018 Author Share Posted March 24, 2018 The corpses need to be hit by the player with most of the effects of that. What I need to detect is when an explosion occurs near them, basically. I've realised that OnHit is only being called when the projectile hits them, not its explosion. Which is hilarious because when they were actual corpses, the explosions were being detected perfectly but PushActorAway was not, which was the entire reason I eventually went with fake corpses. I could use a GameMode block with GetDistance, but this area is getting really script-heavy, so I'd love to avoid that. Link to comment Share on other sites More sharing options...
EPDGaffney Posted March 24, 2018 Author Share Posted March 24, 2018 So, removing the SetDestroyed line from the script does mostly still give me what I want. I just loved the look of the empty health bar when it occasionally did turn up (it shouldn't, ideally), and that it would just have the name of the corpse, not the action you would be attempting to initiate by activating them. Now however, it reads 'Talk' to 'Corpse'. Any other ways to hide this? Tried SetActivatorPrompt but as expected, that works only on activators. Link to comment Share on other sites More sharing options...
Recommended Posts