Using AddSpell To Add Ingestible Effects?

Post » Wed Apr 07, 2010 2:15 pm

I'm trying to add an ingestible effect to an actor by using the addspell function. However the CS will not let me save the script if it is like this. Here is the current Script.

Scn UGMedicHealingApplicationScriptref TargetBegin ScriptEffectStartSet UGMedicVariables.HealingTarget to TargetIf Player.GetItemcount UGHealingTargetToken == 0 && Player.Getdistance Target <= 15 && Player.getitemcount Stimpak >= 1Target.AddSpell StimpakPlayer.RemoveItem Stimpak 1endifend


Is there any possible workarounds to this? It really is essential for the exact same effect that the stimpak has to be applied because many mods change the effect of Stimpaks and I'd like to keep things consistent.

Also, I'd like to try applying this other Aid items other than Stimpaks, hopefully even non-vanilla ones. Would there be a way to do this? The main issue would be designating the item to take the place of the Stimpak.
User avatar
Jack Moves
 
Posts: 3367
Joined: Wed Jun 27, 2007 7:51 am

Post » Wed Apr 07, 2010 9:38 pm

My guess? You are not using the correct reference.

Begin ScriptEffectStart   Set Target to UGMedicVariables.HealingTarget

User avatar
Lily Something
 
Posts: 3327
Joined: Thu Jun 15, 2006 12:21 pm

Post » Wed Apr 07, 2010 3:50 pm

Oh Dur, but no it displays a prompt which states "Stimpak" is not a valid effect.
User avatar
Life long Observer
 
Posts: 3476
Joined: Fri Sep 08, 2006 7:07 pm

Post » Wed Apr 07, 2010 10:53 am

Its because 'Stimpak' is not an effect, it is an ingestable object. Do this instead.

Target.AddItem Stimpak 1Target.EquipItem Stimpak


[EDIT]
You may need to move the 'EquipItem' into a ScriptEffectUpdate block since it may not work in the same execution frame as adding the stimpak.
User avatar
Gill Mackin
 
Posts: 3384
Joined: Sat Dec 16, 2006 9:58 pm

Post » Wed Apr 07, 2010 12:34 pm

Ok I'll try do that tomorrow. That's what I was thinking of doing next. But I'm curious, do you think that if this works it will it work with other aids? Even if I can only get it to work with vanilla chems it'd still be a nice addition.
User avatar
sara OMAR
 
Posts: 3451
Joined: Wed Jul 05, 2006 11:18 pm

Post » Wed Apr 07, 2010 6:15 pm

If http://geck.gamesas.com/index.php/EquipItem works with one ingestible, it should work with all of them.

Cipscis
User avatar
Monika
 
Posts: 3469
Joined: Wed Jan 10, 2007 7:50 pm


Return to Fallout 3

cron