Exile007 Posted December 7, 2008 Share Posted December 7, 2008 Hey sorry to bother you guys so soon again but I have another rather strange problem. I've scripted it so that when this script fires, a Sith is supposed to be blown backward. The problem is, the Sith does indeed get up in the air like she's supposed to during the effect, but she doesn't exactly move anywhere. void main(){ object oSith=GetObjectByTag("sith_lord", 0); location lPush=GetLocation(GetObjectByTag("wp_push")); //"wp_push" is a good ten meters behind the sith lord effect efPush = EffectForcePushTargeted(lPush); efPush = EffectLinkEffects(efPush, EffectVisualEffect(1014)); ApplyEffectToObject(1, efPush, oSith, 2.0); } I have a feeling that the effect error is in the location area but I have no idea. I checked the M4-78 source scripts, particulary the one in the Sion Vs. Nihilus mini-scene (where Nihilus blows Sion back). It seemed to work there, but not here... If anyone could point out something wrong with the script or suggest a new method of reaching this effect I'd appreciate it. Link to comment Share on other sites More sharing options...
Star Admiral Posted December 7, 2008 Share Posted December 7, 2008 void main() { object oSith = GetObjectByTag( "sith_lord", 0 ); location lPush = GetLocation( GetObjectByTag( "wp_push" ) ); SignalEvent( oSith, EventSpellCastAt( OBJECT_SELF, 23, 1 ) ); effect eLink1 = EffectForcePushTargeted( lPush ); eLink1 = EffectLinkEffects( eLink1, EffectVisualEffect( VFX_IMP_FORCE_PUSH ) ); ApplyEffectToObject( DURATION_TYPE_INSTANT, eLink1, oSith, 2.0 ); } Not a coding expert, but try this variant. Pretty much the only thing that was added is the SignalEvent, the rest is just replacing some of the numbers by constants. - Star Admiral Link to comment Share on other sites More sharing options...
Exile007 Posted December 8, 2008 Author Share Posted December 8, 2008 Nope, that didn't work. I was wondering if the problem could have something to do with the area I'm using? I used the exact same script on a Ravager module to see something, and to my amazement, the script worked and the NPC was blown backward. But when I use it in the Korriban academy, it doesn't work. The NPC just falls down, but doesn't fly back. I'm fresh out of ideas. Link to comment Share on other sites More sharing options...
Star Admiral Posted December 8, 2008 Share Posted December 8, 2008 Are you sure that the location specified in lPush is a valid location that is unblocked by any object? I checked the function in nwscript, and it suggests that if there isn't a direct clear line to that location, the push might not work. Try changing effect eLink1 = EffectForcePushTargeted( lPush ); to effect eLink1 = EffectForcePushTargeted( lPush, 0 ); That will override the geometry checks for force pushes, so that the object that the effect is applied to is guaranteed to move that far, ignoring collisions. - Star Admiral Link to comment Share on other sites More sharing options...
Exile007 Posted December 11, 2008 Author Share Posted December 11, 2008 Whoops, apparently the area model I was using was 'bugged'. So the pathway was blocked, it works now, thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.