InActionMan64 Posted April 6, 2022 Author Share Posted April 6, 2022 We have a winner. I can make that work. CHEERS ONCE AGAIN. This is so frustrating, when the answer turns out to be RIGHT THERE! I'll be so much happier in 20 years time when I know this stuff. Link to comment Share on other sites More sharing options...
Mktavish Posted April 6, 2022 Share Posted April 6, 2022 LOL , 20 years ???Nah at the rate you seem to be going ... 20 weeks is more like it for knowing it all ;) Link to comment Share on other sites More sharing options...
InActionMan64 Posted April 6, 2022 Author Share Posted April 6, 2022 You say that but I've got a simple script that validates and runs but doesn't produce a result and I cannot figure out what I've done wrong. It's basically a direct copy from the Wiki. I've rewritten it 3 times, attached it to different activators and nothing changes. So 20 years seems about right. Link to comment Share on other sites More sharing options...
InActionMan64 Posted April 7, 2022 Author Share Posted April 7, 2022 Update on IsSpellTarget. Nope. But it did lead me to HasMagicEffect. So here's an example, float RandomNumber Begin ScriptEffectStart set RandomNumber to GetRandomPercent if player.getperkrank CustomPerk >= 2 if HasMagicEffect CustomEffect1 if RandomNumber >= 65 player.additem ExtraItem1 1 else player.additem ExtraItem2 1 endif elseif HasMagicEffect CustomEffect2 if RandomNumber >= 85 player.additem ExtraItem3 1 else MessageEx No extra Item endif elseif RandomNumber >= 75 if HasMagicEffect CustomEffect3 player.additem ExtraItem4 1 else player.additem ExtraItem5 1 endif else MessageEx Different No extra Item endif endif end Works like a charm.Was able to condense four similar scripts down to one, put in a perk check and all without having to change the code that applies the Custom Base Effects. Would never has got here so quickly without your help. Again Many Thanks Link to comment Share on other sites More sharing options...
Mktavish Posted April 9, 2022 Share Posted April 9, 2022 Update on IsSpellTarget. To clarify ... said to use "IsSpellTargetAlt" But glad you got it working ... and I guess you figured out "HasMagicEffect" is looking for a base effect ... an effect item on the ingestible , not the ingestible itself ?Where as IsSpellTarget and the Alt version are for checking Actor / object / ingestible effect form-ids . Link to comment Share on other sites More sharing options...
Mktavish Posted April 9, 2022 Share Posted April 9, 2022 You say that but I've got a simple script that validates and runs but doesn't produce a result and I cannot figure out what I've done wrong. It's basically a direct copy from the Wiki. I've rewritten it 3 times, attached it to different activators and nothing changes. So 20 years seems about right. By the way ... care to post this up ? maybe I can point out what the problem is ? Link to comment Share on other sites More sharing options...
InActionMan64 Posted April 9, 2022 Author Share Posted April 9, 2022 Update on IsSpellTarget. To clarify ... said to use "IsSpellTargetAlt" But glad you got it working ... and I guess you figured out "HasMagicEffect" is looking for a base effect ... an effect item on the ingestible , not the ingestible itself ?Where as IsSpellTarget and the Alt version are for checking Actor / object / ingestible effect form-ids . Yeah I meant IsSpellTargetAlt. Played around with it and found that HasMagicEffect better suited what I was doing. Would never have got to it had you not directed my to look at a SPELL based function. The simple validating script that refused to work, turns out it was working I just wasn't looking at the results properly. I'm starting to get into EventHandlers as a way of doing things. They're very handy. Link to comment Share on other sites More sharing options...
Mktavish Posted April 9, 2022 Share Posted April 9, 2022 I'm starting to get into EventHandlers as a way of doing things. They're very handy. Well you be going beyond me then ... I know of and have read about them ... but never used them in practice .I guess you'll be teaching me in another couple weeks :teehee: :geek: :cool: Link to comment Share on other sites More sharing options...
InActionMan64 Posted April 9, 2022 Author Share Posted April 9, 2022 NO, the knowledge is MINE and MINE ALONE!!!!!!!!!!! I'm finding them handy for very specific interactions, circumstances like setting off a Wild Wasteland event. NV uses triggers for WW but you can use Event Handlers to do the same and they're temporary so they can be scripted and then thrown away. Link to comment Share on other sites More sharing options...
Mktavish Posted April 10, 2022 Share Posted April 10, 2022 Well you can throw triggers away too , or any reference for that matter. MyRef.DisableMyRef.MarkForDelete Link to comment Share on other sites More sharing options...
Recommended Posts