Herdo Posted November 5, 2017 Share Posted November 5, 2017 I'm trying to make what I believe to be a fairly simple mod (my first mod) but I'm having trouble figuring this out. I want to apply the magic effect "detect life hostile" when one is flying in the vertibird. I've cloned the "DetectLifeCloakHostileEffect" and added the condition "player - IsRidingMount == 1". The problem is, I'm not sure how to "trigger" it so to speak. I realize that something has to initialize the actual effect first. I found the actor script "OnPlayerEnterVertibird" https://www.creationkit.com/fallout4/index.php?title=OnPlayerEnterVertibird_-_Actor but I'm not sure how to apply this. I think I've got it pretty much figured out, but I've kinda hit a wall here so any help is greatly appreciated. Link to comment Share on other sites More sharing options...
FlashyJoer Posted November 6, 2017 Share Posted November 6, 2017 One way I do it is to create the magic effect, as you have, and then use an ALCH (consumable item), or POTION, that has the effect tied to it. I use scripting to equip the potion on the player when conditions are met in the code. As so, I assume if you use a player refalias of PlayerREF, the following adds the effect to the player silently when they board the vert: OnPlayerEnterVertibird()PlayerREF.equipitem(potionname, false, true)EndEvent I mean, this is HIGHLY simplified and who knows if it would even work, but the key thing for you is the silent equipitem function which will trigger the magic effect on the player... Link to comment Share on other sites More sharing options...
Herdo Posted November 6, 2017 Author Share Posted November 6, 2017 (edited) One way I do it is to create the magic effect, as you have, and then use an ALCH (consumable item), or POTION, that has the effect tied to it. I use scripting to equip the potion on the player when conditions are met in the code. As so, I assume if you use a player refalias of PlayerREF, the following adds the effect to the player silently when they board the vert: OnPlayerEnterVertibird()PlayerREF.equipitem(potionname, false, true)EndEvent I mean, this is HIGHLY simplified and who knows if it would even work, but the key thing for you is the silent equipitem function which will trigger the magic effect on the player... Hey thanks for the reply. I actually switched how I was doing it and instead went with applying it as a perk through a magazine. So far everything seems in order, except for the actual highlighting of targets, haha. I'm not sure which options to select in order to achieve what I'm trying to achieve. Any ideas? Edited November 6, 2017 by Herdo Link to comment Share on other sites More sharing options...
Herdo Posted November 6, 2017 Author Share Posted November 6, 2017 (edited) OK, so I've made a ton of progress and I've almost got this thing working how I want it. I haven't tested the "IsRidingMount" condition yet, but other than that I've gotten everything working. Except for one little problem. The effect only seems to work on enemies that are currently spawned. If I spawn a Radroach first and then pick up the magazine, it applies the perk and the ability, and then highlights the Radroach. However, if I pick up the magazine and then spawn a Radroach, it doesn't work. Does anyone have any ideas why this would be happening? I need it to continuously highlight enemies like the Power armor mod does. It's kinda useless in its current state. EDIT: I'm wondering if this isn't because I modeled my Perk after the PA targeting hud enchantment. My guess is that the enchantment continuously casts the spell, where as an ability might not have that functionality? Edited November 6, 2017 by Herdo Link to comment Share on other sites More sharing options...
Yulliah Posted November 6, 2017 Share Posted November 6, 2017 *nvm* I don't really know the answer Link to comment Share on other sites More sharing options...
Herdo Posted November 7, 2017 Author Share Posted November 7, 2017 *nvm* I don't really know the answerHaha, no worries. I really don't either. Like I said, I'm wondering if an "ability" won't work the same as an enchantment, even if they are setup the exact same. I'm guessing enchantments repeatedly cast the spell onto the caster, where as an ability won't do that. Maybe. Who knows. Link to comment Share on other sites More sharing options...
Recommended Posts