Difference between revisions of "GetProjectileSource"
Jump to navigation
Jump to search
imported>Haama |
imported>Quetzilla m |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{OBSE v0015}} | |||
A command for [[:Category:Oblivion Script Extender|Oblivion Script Extender]] | A command for [[:Category:Oblivion Script Extender|Oblivion Script Extender]] | ||
Line 5: | Line 6: | ||
Returns the caster of a magic projectile or the archer who fired an arrow projectile. | Returns the caster of a magic projectile or the archer who fired an arrow projectile. | ||
{{Projectile Ref}} | |||
==See Also== | ==See Also== | ||
* [[SetPlayerProjectile]] | * [[SetPlayerProjectile]] | ||
{{Navbox/Projectile Functions}} | |||
[[Category: Functions]] | [[Category: Functions]] | ||
[[Category: Functions (OBSE)]] | [[Category: Functions (OBSE)]] | ||
[[Category: Projectile Functions]] | [[Category: Projectile Functions]] | ||
[[Category: Projectile Functions (OBSE)]] | [[Category: Projectile Functions (OBSE)]] |
Latest revision as of 11:48, 24 August 2008
A command for Oblivion Script Extender
Syntax:
(source:ref) reference.GetProjectileSource
Returns the caster of a magic projectile or the archer who fired an arrow projectile.
Finding the Projectile Reference[edit source]
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[edit | edit source]
Projectile Functions | |
---|---|
General | GetProjectileType · GetProjectileSource · SetPlayerProjectile |
Magic | GetMagicProjectileSpell · SetMagicProjectileSpell |
Arrows | GetArrowProjectileEnchantment · GetArrowProjectileBowEnchantment · GetArrowProjectilePoison |