paulatreides0 Posted August 7, 2016 Share Posted August 7, 2016 I'm trying to attach an ability-type spell into the race record that runs a script. The script itself is very, very simple: Scriptname TestScript:AbilityTestScript extends Actor Message Property Message1 Auto Const Keyword Property Keyword1 Auto Const Event OnItemEquipped(Form akBaseObject, ObjectReference akReference) If akBaseObject.HasKeyword(Keyword1) == True Message1.Show() endIf endEvent This script is then applied to a MagicEffect entry of the "Script" archetype. This MagicEffect is then fed into an ability-type spell. And this ability-type spell is then added to the HumanRace record as an ability. However, when I try equipping a weapon with Keyword1 (which I added to its keyword list) it displays no message, which I think means that the script isn't getting fired. What am I doing wrong?The script is extends Actor and the OnItemEquipped is meant for actors so it should fire, no? Likewise, because it applies to humanrace and PC is humanrace, then it should hold, no? Link to comment Share on other sites More sharing options...
Reneer Posted August 7, 2016 Share Posted August 7, 2016 I'm pretty sure you should have "extends ActiveMagicEffect" instead of "extends Actor". Link to comment Share on other sites More sharing options...
paulatreides0 Posted August 7, 2016 Author Share Posted August 7, 2016 (edited) I'm pretty sure you should have "extends ActiveMagicEffect" instead of "extends Actor". Ahhh, so I can't switch them around? Stupid me, I thought they could be switched. So if I want to run the script above, which extends an actor, I would need to RegisterRemoteEvent during an OnInit event and then run the event using Actor.OnItemEquipped, right? Or would it work as it stands? Okay, just answered my own question through testing. So I guess I understood script extension even less than I thought. Edited August 7, 2016 by paulatreides0 Link to comment Share on other sites More sharing options...
Recommended Posts