Difference between revisions of "Template:Projectile Ref"
Jump to navigation
Jump to search
imported>Haama (Category link) |
imported>Haama m (→Findind the Projectile Reference: Spelling) |
||
Line 1: | Line 1: | ||
== | ==Finding the Projectile Reference== | ||
The only way to get a projectile [[Glossary#R|reference]] is by [[Glossary#W|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). | The only way to get a projectile [[Glossary#R|reference]] is by [[Glossary#W|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). | ||
Revision as of 13:09, 23 August 2008
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 Apple set rProj to (GetFirstRef 34 1) Label if rProj if (rProj.GetProjectileType == 0) && (rProj.GetProjectileSource == TriggerHappyFan) rProj.SetPlayerProjectile else set rProj to Apple set rProj to GetNextRef Goto endif endif