Play VisualEffect Position

Post » Wed May 11, 2016 7:46 pm

Hello


I'm trying to position a visual effect that is 'placed' using Play. The default is underneath the player but that's not what I want. I have already tried re-positioning the visual effect(healfxhand01) in nifskope. Any ideas on how I can choose where it goes? Maybe with a marker or attaching it to a held item?



Edit: Please help, I can't move forward without this.

User avatar
Rachel Tyson
 
Posts: 3434
Joined: Sat Oct 07, 2006 4:42 pm

Post » Wed May 11, 2016 9:06 am

Mabye you can create MovableStatic and place it somewhere. But I have no idea how to do it.

Im dealing with same problem as you, and this is only way (wrong way I quess) that comes on my mind
User avatar
Nadia Nad
 
Posts: 3391
Joined: Thu Aug 31, 2006 3:17 pm

Post » Wed May 11, 2016 6:54 pm

It sounds like you want to play the effect on the player, but just higher up than the player's feet. Is that correct?



You could try spawning an invisible dummy object and playing the effect on that object instead of playing it on the player. You might have to create an invisible form in the CK for this purpose.



Disclaimer: I didn't test this and It's been a while since I wrote any papyrus code.



;generate an object based on your invisible form
ObjectReference tempObject = PlayerRef.PlaceAtMe(yourInvisibleForm)

;move the object to the player, 30 units below the player's head (might have to play with the exact number here)
tempObject.MoveTo(PlayerRef, 0.0, 0.0, PlayerRef.GetHeight() - 30.0)

;play your effect on the invisible object
yourVisualEffect.Play(tempObject)
User avatar
stevie critchley
 
Posts: 3404
Joined: Sat Oct 28, 2006 4:36 pm

Post » Wed May 11, 2016 12:14 pm

I was thinking of something like that but wasn't sure on how to implement it.





That's pretty much what I want to do but it would need to have an incredibly fast loop for the MoveTo, right? It needs to always be in the position even when the player moves around. What kind of object would be best? Static?


Thanks for the help though! Any step in the right direction is good, especially since I've been stuck on this for so long.

User avatar
michael flanigan
 
Posts: 3449
Joined: Thu Jun 14, 2007 2:33 pm

Post » Wed May 11, 2016 12:05 pm

Yeah, I think the cleanest solution would be to modify the effect in nifskope, but I don't know enough about that to be helpful (and you said you already tried it.)



Other options:


  • You could probably add some sort of loop with a TranslateToRef or SplineTranslateToRef function that keeps moving the object to the player. You'd have to test it out to see how viable that is and how fast the loop would have to be.

  • You could try to use an invisible actor instead of an invisible object, and use the PushActorAway function similar to how Verteiron did in his http://www.gamesas.com/topic/1384695-actor-magnet-tutorial/?hl=%2Bactor+%2Bmagnet#entry21007034. The PushActorAway function is a really convenient way to keep something following an actor around.

User avatar
Sabrina garzotto
 
Posts: 3384
Joined: Fri Dec 29, 2006 4:58 pm

Post » Wed May 11, 2016 5:25 pm

Omg, I tried out DisArmShoutTargetFX.nif which is at the hands by default and it worked, I must not know how to move the mesh in nifskope properly. Damn, wasted my and everyone elses time.

User avatar
Rach B
 
Posts: 3419
Joined: Thu Mar 08, 2007 11:30 am

Post » Wed May 11, 2016 10:19 pm

Thought it did based on how it looked but I see what you're talking about now. Is it possible to work with disarmshottargetfx? Could I attach another mesh to it and reposition that then hide the original? Because that would work perfectly for how I want it to look.

User avatar
Davorah Katz
 
Posts: 3468
Joined: Fri Dec 22, 2006 12:57 pm

Post » Wed May 11, 2016 10:58 pm

What about cast it as spell? (Create Magic Effect and spell with that magiceffect)
User avatar
Poetic Vice
 
Posts: 3440
Joined: Wed Oct 31, 2007 8:19 pm

Post » Wed May 11, 2016 6:26 pm

What do you mean?

User avatar
Amber Ably
 
Posts: 3372
Joined: Wed Aug 29, 2007 4:39 pm

Post » Wed May 11, 2016 9:22 pm

Didn't you say disarmshouttargetfx was already at a position you liked? Yes, you can still reposition it by transforming only the 2 NiNodes named PositionHelper. There's no need to attach it to anything.



Are you sure that's what you want though? It's not a looping animation. It'll play once and stop.

User avatar
CHangohh BOyy
 
Posts: 3462
Joined: Mon Aug 20, 2007 12:12 pm

Post » Wed May 11, 2016 11:24 pm

I do like it but it's not ideal, too magical for what I'm going for but there's nothing else that would come close to what I was trying to do. That edit didn't change anything in game. The thing about it is it will move with the players hands, that includes sheathed and unsheathed positions, so I think there's more to it. As for attaching something, I meant like another mesh, I had a different idea for how it should look, it wasn't meant to be a blue swirly thing but I currently have no choice.



I put it in a while loop so it'll be forced to loop ;)

User avatar
Rude Gurl
 
Posts: 3425
Joined: Wed Aug 08, 2007 9:17 am

Post » Wed May 11, 2016 10:31 am

What are you creating it as in the CK? And what exactly is it supposed to be?

User avatar
Laura Samson
 
Posts: 3337
Joined: Wed Aug 29, 2007 6:36 pm

Post » Wed May 11, 2016 3:50 pm

They're art objects so I can use them as visual effects. It's supposed to be something that the player can see on screen in their hand, it gives the player feedback on light level through coding.

User avatar
J.P loves
 
Posts: 3487
Joined: Thu Jun 21, 2007 9:03 am


Return to V - Skyrim