PsychorGames Posted January 30, 2017 Share Posted January 30, 2017 I thought it would be a relatively straghtforward mod, but it's proving to be extremely difficult. I want enemies to flee when one of their limbs is crippled. That's it. The problem is that I can make them flee once they are crippled... but only for about half a second. I am using set EnemyRef to player.getcombattarget which means only one person at a time will flee, and only if I actually aim at them. Is there anything else I can set the enemy to that will effect all enemies? I tried making the script an effect, but again, I didn't know how to actually implement the effect other than to set the EnemyRef as my combat target. Things that I have tried that also don't work are using:IsActorGetInSameCell (or whatever function checks to see if you're in the same cell) How do I make it so that all enemies will react to the action [of getting crippled] by fleeing [preferably for a long duration of time] whether I'm aiming at them or not? Thanks for the help! Link to comment Share on other sites More sharing options...
PsychorGames Posted January 30, 2017 Author Share Posted January 30, 2017 Oh and I'm not saying I want -all- enemies to flee when I cripple -one-. I'm saying I want one enemy to flee when I have crippled one of its limbs, and I want this to apply to every enemy for now. Link to comment Share on other sites More sharing options...
PsychorGames Posted January 31, 2017 Author Share Posted January 31, 2017 What if I use GetType? Link to comment Share on other sites More sharing options...
dubiousintent Posted January 31, 2017 Share Posted January 31, 2017 I am not a mod creator for Fallout or the GECK. But I do know programming, and you are needlessly muddying the waters. You started out with a clear statement of what you wanted: "I want enemies to flee when one of their limbs is crippled. That's it." Then you said your problem is: "The problem is that I can make them flee once they are crippled... but only for about half a second." Implying that the issue is how long they continue to flee. Good so far. But then you go on to confuse the issue with things like "IsActor", "GetInSameCell", and "GetType", which have to do with identifying a particular reference or actor. None of that has to do with the duration of how long a crippled actor flees. So, start with focusing on one problem at a time: duration of the "flee" effect. Break what is required down to single steps. * At the time you "damage" your target you should know it's Ref-ID. Preserve it. * Apply the "flee effect" to that Ref-ID, but only if it is "crippled". So you need to determine if the target IS crippled. That is a "condition" that must be true before you proceed to apply the "effect".* The effect should have a duration parameter. If it's too short, then you need to increase the number of "time units".* You will want either an "Actor Effect" or an "Object Effect" to be applied to the Ref-ID. The effect itself may restrict that choice, or one of the actual mod creators here will have a suggestion as to what is most appropriate. (I don't know.) The question of who is damaged, and if they are crippled is a different issue, and a "precondition" to applying the "flee effect". If you want this effect to apply across the board to anyone "crippled", then you are going to have to make the check every time damage is inflicted or have to check every frame. The latter is a lot of processing overhead, and likely it is going to have to be an "Actor Effect". If you only want it to happen when a particular weapon is used, then it will likely be an "Object Effect". However, there is no single "crippled" stat. You would have to check each body part condition (under "Derived Statistics" on the "Stats List" page of GECK). What would be easier to check and adjust would be "confidence". That already controls when an actor "flees", so simply adjusting that appropriately should be simpler to implement. The same basic process applies. -Dubious- Link to comment Share on other sites More sharing options...
PsychorGames Posted January 31, 2017 Author Share Posted January 31, 2017 Thanks for the tips! I'll try something that you said once I get home. Link to comment Share on other sites More sharing options...
Recommended Posts