Difference between revisions of "Talk:SetPlayerProjectile"
imported>Mitchalek m |
imported>DragoonWraith |
||
Line 21: | Line 21: | ||
I'd also like to add that if you want to avoid getting skillup set type to lesser power. | I'd also like to add that if you want to avoid getting skillup set type to lesser power. | ||
[[User:Mitchalek|Mitchalek]] 16:03, 6 October 2011 (EDT) | [[User:Mitchalek|Mitchalek]] 16:03, 6 October 2011 (EDT) | ||
:Interesting stuff; that's a serious bug, if true. If you can really nail down how that happens, that would be great. | |||
:[[User:DragoonWraith|<span style="font-family: Oblivion; size=2;">D</span>ragoon <span style="font-family: Oblivion; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion; size=2;">TALK</span>]] 18:17, 6 October 2011 (EDT) |
Revision as of 17:17, 6 October 2011
This is an incredibly useful function, but actually getting a reference to a projectile is not explained in the OBSE documentation. The most common use of this is probably going to be catching a scripted effect shot by a hidden activator - here's an example of how to do it:
pActivator.Cast MySpell pTarget; (cast MySpell from pActivator at pTarget) ref pProjectile set pProjectile to GetFirstRef 34 label 4 if (pProjectile != 0) if (pProjectile.GetProjectileSource == pActivator) pProjectile.SetPlayerProjectile endif set pProjectile to GetNextRef goto 4 endif
The shot will be caught instantly and will be treated just like the player fired it. That also means that the player will get the skill increase from the shot hitting a target, which may not be desirable. --Khrabanas 03:00, 23 August 2008 (EDT)
- I've made a template based on this example and added it to all of the projectile function articles.--Haama 11:28, 23 August 2008 (EDT)
I have found a bug. If target dies from a scripted is hit by spell that has been shot from an activator and changed to player projectile all actors that use ranged spells will stop using them for the rest of game session, instead they will just try to summon creatures and attack with melee attacks when approached close enough. It only happens when script is responsible for death. First I tought it is related to script but then I tested some more and it appear to happen even with normal effects and is not related to death. I have hard time to nail down the exact cause as it doesn't seem to happen after first cast. I am doing more testing right now and it appear to happen when casting from activator few times in a row with short time between casts and setting to player spell each time. I'll keep you updated if I find out more.
I'd also like to add that if you want to avoid getting skillup set type to lesser power. Mitchalek 16:03, 6 October 2011 (EDT)
- Interesting stuff; that's a serious bug, if true. If you can really nail down how that happens, that would be great.
- Dragoon Wraith TALK 18:17, 6 October 2011 (EDT)