script effect target?

Post » Fri May 27, 2011 7:42 am

I'm going to be creating a bunch of base effects that I'd only like to run if the effect target is the player. I know I could handle that by making it a condition when I add the base effects to the ingestibles, but being able to make it part of the script would simplify things for me and save time (I'll be adding ~6 effects to every ingestible in the game). Wasn't sure if I should post on the FO3 or FNV Geck forum, but this one's definitely more active.
User avatar
trisha punch
 
Posts: 3410
Joined: Thu Jul 13, 2006 5:38 am

Post » Fri May 27, 2011 2:41 am

scn (name)ref EffectVictim(Other variables)Begin ScriptEffectStartSet EffectVictim to GetSelf  If EffectVictim == Player     (Effect for Player)


That might get you going. :)

EDIT:

Ohhhh..... Watch out for adding too many effects, I believe 8 is the max before the game will crash anytime the item is equiped.
User avatar
Helen Quill
 
Posts: 3334
Joined: Fri Oct 13, 2006 1:12 pm

Post » Fri May 27, 2011 7:31 am

Thanks a ton. Regarding the base effect limit, in the past I ran into trouble if the combined number of characters of the effect names exceeded a certain number - shortening my effect names stopped the crashes. I can't remember if I had more than 8 though.

*Edit - gave it a test, and this works too (no pun intended):

scn IMCNBETestbegin scripteffectstart    IF this == player        ;do stuff

User avatar
George PUluse
 
Posts: 3486
Joined: Fri Sep 28, 2007 11:20 pm


Return to Fallout: New Vegas