Difference between revisions of "GetArrowProjectilePoison"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
(return value is a poison)
imported>Haama
(Added projectile ref example)
Line 7: Line 7:


Returns the poison attached to an arrow projectile.
Returns the poison attached to an arrow projectile.
{{Projectile Ref}}


== See Also ==
== See Also ==

Revision as of 09:54, 23 August 2008


A command for Oblivion Script Extender

Syntax:

(poison:ref) reference.GetArrowProjectilePoison
(poison:ref) reference.GetAPPoison

Returns the poison attached to an arrow projectile.

Finding the Projectile Reference

The only way to get a projectile reference is by walking through projectile references with GetFirstRef, GetNextRef and Label/GoTo. See GetFirstRef for the necessary info and a good, generalized example (note that the example walks through door references, change the 24 to 34 for projectiles).

Another example - this one will walk through each projectile until it finds an arrow shot by your companion (Reference EditorID = TriggerHappyFan) and marks the player as the shooter.

ref rProj
...
set rProj to (GetFirstRef 34 1)
Label
if rProj
    if (rProj.GetProjectileType == 0) && (rProj.GetProjectileSource == TriggerHappyFan)
        rProj.SetPlayerProjectile
    else
        set rProj to GetNextRef
        Goto
    endif
endif


See Also