Author Topic: How do i use "wall spikes" ?  (Read 348 times)

Legacy_CaveGnome

  • Sr. Member
  • ****
  • Posts: 432
  • Karma: +0/-0
How do i use "wall spikes" ?
« on: October 23, 2012, 07:27:40 pm »


               Hi ladies & gents,

Trying to roll my own scripted custom trap for an armoire. So far, no good...

I need help using  visual effects with ApplyEffectAtLocation() and VFX_IMP_WALLSPIKE.

When i use this the visual effect comes always from the same side (spikes going right to left) no matter the source location orientation. How can i make it work with a different orientation ? If not possible, is there any workaround.

I need spikes going left to right, but if you know how to make it work in any trigonometric orientation, that will be great. Help!


Thanks
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
How do i use "wall spikes" ?
« Reply #1 on: October 24, 2012, 03:04:20 pm »


               How are you getting the location to feed to you ApplyEffectAtLocation function?

Have you tried different rotations?

I suggest placing four waypoints facing in different directions. Use each waypoint to get a different location, then use these four locations in four different ApplyEffectAtLocation calls and see what happens.
               
               

               
            

Legacy_CaveGnome

  • Sr. Member
  • ****
  • Posts: 432
  • Karma: +0/-0
How do i use "wall spikes" ?
« Reply #2 on: October 24, 2012, 11:06:14 pm »


               Hello Henesua,

I use a GetLocation on an object that i rotate to the direction i want my spikes going (this is a guess as Lexicon has nothing on how to use VFX_IMP_WALLSPIKE and i can't believe Bioware just made only the "right to left" version). Previously i tried ApplyEffectToObject with the same idea without success.

Script Fragment placed on "OnTrapTriggered" from the armoire placeable:

string sTagCont = GetTag(OBJECT_SELF); // Get tag from trapped container
// Make Tag for getting a second objet used as VFX carrier
string sTagSupVFX = "PIEG_"+sTagCont; // exemple: PIEG_TH_ARMOIRE_GAR
object oSupVFX = GetNearestObjectByTag(sTagSupVFX,OBJECT_SELF); // Get carrier object
// Get location of carrier object
location lTest = GetLocation(oSupVFX);
// Apply VFX effect
DelayCommand(0.1f,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,
   EffectVisualEffect(VFX_IMP_WALLSPIKE),lTest));

And, yes i tested different rotations. I will try your four facing waypoints + four ApplyEffectAtLocation idea.

Thanks for the input
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
How do i use "wall spikes" ?
« Reply #3 on: October 25, 2012, 12:49:24 am »


               Hmm... open up the visualeffects.2da and look for that line. I wonder what the impact node of that VFX is. This may be the issue with regards to rotation. I wonder if we need to apply the VFX to an object rather than a location....
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
How do i use "wall spikes" ?
« Reply #4 on: October 25, 2012, 01:45:45 am »


               <hiding behind...>

Based on the image in the Lexicon...
'Posted
...the VFX was applied to the target person (not a location), like most VFX_IMP.  Not sure how that helps with your orientation problem, but it looks like (from the 2DA) the model is loaded at the target's root node and probably aligned with it.

Label                               Type_FD   OrientWithGround   
486        VFX_IMP_WALLSPIKE        F         0                
You might load an invisible creature, change its orientation and apply the VFX.  Just figure out the angle you need to make it look like it's hitting oTarget.

<...something>
               
               

               


                     Modifié par Rolo Kipp, 25 octobre 2012 - 12:53 .
                     
                  


            

Legacy_CaveGnome

  • Sr. Member
  • ****
  • Posts: 432
  • Karma: +0/-0
How do i use "wall spikes" ?
« Reply #5 on: October 25, 2012, 04:38:58 am »


               In HotU visualeffects.2da i found this data entry:

486 VFX_IMP_WALLSPIKE F 0 **** **** **** vim_wallspike **** **** **** sim_spike (and 15 **** trailing).

Imp_Impact_Node is a "****" entry. But what to do whith that? ;-)

I've tried four different facing waypoints with no progress. Tried creatures oriented 0,90,180, 270 with no success. ApplyEffectAtLocation works with the same limited result as ApplyEffectToObject if using an object or creature as vfx support. Tried using invisible objects at diverse angles auto-applying the VFX to themselves with no more chance. At all times the result is the same vfx (spikes launched East to West).

Well, if someone has a suggestion... Wondering if some hard hack (new custom graphics) could add the 3 missing wallspikes (W->E, N->S, S->N).

By the way, you sirs, are true Gentlemans for helping a poor gnome stranded in scriptland...
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
How do i use "wall spikes" ?
« Reply #6 on: October 25, 2012, 05:16:39 am »


               I had the same problem with swinging blade VFX: IMAGE / THREAD

unfortunately noone was able to help me with it
               
               

               


                     Modifié par ShaDoOoW, 25 octobre 2012 - 04:31 .
                     
                  


            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
How do i use "wall spikes" ?
« Reply #7 on: October 25, 2012, 05:28:54 am »


               Ah I think it something with the setting on the mdl of the effect. I look into these two when I get some time. No one in the CC forum check into it yet?
               
               

               
            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
How do i use "wall spikes" ?
« Reply #8 on: October 27, 2012, 04:49:24 am »


               Well these effects are using models so they do have to placed on a creature or placable to make the orient and work with apply at location we have to switch them to emitter versions I think. Just some of my checking so far. I could also make multiple versions, but then you have to make a custom function to select the proper one. Sorry
               
               

               
            

Legacy_CaveGnome

  • Sr. Member
  • ****
  • Posts: 432
  • Karma: +0/-0
How do i use "wall spikes" ?
« Reply #9 on: October 27, 2012, 05:28:49 am »


               Hello ShadowM,

Reading your comment, i suspect switching to emitter version would be more practical, but it's not in my knowledge zone for the moment... Is this donne moding the VFX with CAD software?

Don't be sorry, discussing things is a step in the right direction ;-)