So, I'm pretty excited. But like usual I need some more help

Post » Wed Jun 20, 2012 11:21 am

I got my bat form to a point where it works pretty cool. its not perfect but with the right effects and sound it will be smashing.

One final major effect I need to accomplish is having the cavebats (or the black birds that fly around Nocturnal from the Thieves guild quest) model spawning and playing their animation around the character at the casting of the spell. The spell (or voice power is more accurate) is a toggle.

So my question is: Is it possible to call out a model/animation through the script, without it already being at the players location, having it play each time at the casting of the spell then disappearing?

Here's the working script for the spell currently:

Scriptname DV_BatFormTraits extends ActiveMagicEffect  import Gameimport Soundimport Formimport Debugimport Utilityimport GlobalVariableimport ActorActor Property Player AutoSpell Property DVampireBatForm AutoSpell Property DVampireBatFormToggle AutoIdle Property SwimStart AutoIdle Property swimStop AutoIdle Property JumpFall Autobool Property bIsOn Autobool Property bVal AutoEffectShader Property DVCelerityShadow Autofloat bearingfloat elevationfloat speedfloat posxfloat posyfloat poszfloat movefloat dtimeEvent OnEffectStart(Actor Target, Actor Caster)ObjectReference PCVamp = GetPlayer()    if !Caster.HasSpell(DVampireBatFormToggle)    		    Caster.AddSpell(DVampireBatFormToggle, false)            Caster.SetAlpha(0)            Utility.Wait(0.01)		    DisablePlayerControls()		    Wait(0.1)		    SetIniFloat("fInAirFallingCharGravityMult:Havok",0)		    Caster.MoveTo(Caster, 0, 0, 800)		    Caster.TranslateTo(Caster.GetPositionX(), Caster.GetPositionY(), Caster.GetPositionZ(), 0.0, 0.0, 0.0, 0.0)		    Wait(0.1)		    Caster.StopTranslation()		    DVCelerityShadow.Play(Caster)                        GetPlayer().SetAllowFlying()		    ForceThirdPerson()            Wait(0.1)            SendAnimationEvent(PCVamp ,"SwimStart")            EnablePlayerControls()            ;bVal = True            SetIniFloat("fInAirFallingCharGravityMult:Havok",0)            while Caster.HasSpell(DVampireBatFormToggle)				 Fly()		    endwhile    elseif Caster.HasSpell(DVampireBatFormToggle)		    Caster.RemoveSpell(DVampireBatFormToggle)            SendAnimationEvent(PCVamp ,"JumpFall")            Caster.SetAlpha(1)            DVCelerityShadow.Stop(Caster)            GetPlayer().SetAllowFlying()            Wait(1.0)            ;bVal = False    endif            ;Toggle()    EndEventFunction Toggle()    if (bVal == True)        bIsOn = True    elseif (bVal == False)        bIsOn = False    endif    EndFunction
User avatar
Cathrin Hummel
 
Posts: 3399
Joined: Mon Apr 16, 2007 7:16 pm

Post » Wed Jun 20, 2012 12:24 am

This isn't an answer really, but it's a stab in the dark and might help..

Magic-effects have visual effects included in the object. SO for example when you use a shrine/blessing it uses a magic-effect with the hit shader "HealMysticFXS" and you'll notice that it swarms around the player.

Seeing it looks like you're using a spell to do this I would guess that this would be the easiest and less hacked option.
You might be interested in WerewolfTransFXS OR VampireChangeFX, OR just poking around the SpecialEffect > EffectShader folder..
User avatar
Robert Jackson
 
Posts: 3385
Joined: Tue Nov 20, 2007 12:39 am

Post » Tue Jun 19, 2012 7:38 pm

Yeah unfortunately the Bats/Birds are attached to a .nif. They aren't shaders. When you use a shrine it causes a Hit Shader to display on the character. Gives you a spell ability temporarily, essentially.

I have the shaders in place (plus a custom one Im working on atm) and those will work fine. However, what I'm thinking of and hoping is possible is essentially spawning the model that has the animation of bats flying (as they are normally placed on the map statically for a dungeon) and then having it disappear right after it plays through.

The reason I even think this is possible is because the teleport spell exists.

Thank you though man I really appreciate you dropping your ideas. I will continue to check out different shader effects to see what else I can add to make it even cooler. +1 to ya.

EDIT: One thing I tried was adding the bats.nif (not actual name) to a custom made amulet item that would get added to the player and equipped at teh casting of the spell. I first tested this by simply adding the amulet in game and tried it on. It simply crashed the game :P
User avatar
Shelby McDonald
 
Posts: 3497
Joined: Sat Jan 13, 2007 2:29 pm

Post » Tue Jun 19, 2012 10:24 pm

could you put FXTG09NocturnalBirds in a cell and just move it to the player with http://www.creationkit.com/MoveTo_-_ObjectReference
User avatar
Donald Richards
 
Posts: 3378
Joined: Sat Jun 30, 2007 3:59 am

Post » Wed Jun 20, 2012 6:49 am

could you put FXTG09NocturnalBirds in a cell and just move it to the player with http://www.creationkit.com/MoveTo_-_ObjectReference

That would be one way but man that would mean hiding that model in every cell. Not to mention the effect would be void or even possibly crash the game in cells (like those added by other mods) when the power was used.

Perhaps in the end a shader is the only way to go. There's got to be other options I just know it.
User avatar
rebecca moody
 
Posts: 3430
Joined: Mon Mar 05, 2007 3:01 pm

Post » Wed Jun 20, 2012 10:01 am

I tried using PlaceAtMe() but it didn't work very well. I had this as the code:

Scriptname fg109TestMEScript extends activemagiceffect  ObjectReference property BirdsEffect autoObjectReference BirdsRefEvent OnEffectStart(Actor akTarget, Actor akCaster)    Debug.Notification("Start block running")    Form BirdsBase = BirdsEffect.GetBaseObject()    BirdsRef = akTarget.PlaceAtMe(BirdsBase, 1);    BirdsRef.MoveTo(akTarget, 0, 0, -150)    BirdsRef.PlayAnimation("playanim01")EndEvent;Event OnEffectFinish(Actor akTarget, Actor akCaster);    Debug.Notification("Finish block running");    BirdsRef.Disable();    BirdsRef.Delete();    BirdsRef = None;    Dispel();EndEvent

BirdsEffect point to the birds used in the Nocturnal quest and I used GetBaseObject() to get the form. I had to do it that way because I couldn't select FXTG09NocturnalBirds in a Form property, and there is no such thing as MoveableStatic property.

Casting the spell the first time doesn't seem to do anything but subsequent casts work. The PlaceAtMe() put it so it was right above the player's head, so I tried to move it. That made the whole thing not work. The script refused to compile with PlayAnimationAndWait(). I tried to give the spell a duration so that I could un-reference the placed object later and delete it, but that didn't work.

Maybe someone else can figure something out.
User avatar
Victor Oropeza
 
Posts: 3362
Joined: Sun Aug 12, 2007 4:23 pm

Post » Wed Jun 20, 2012 5:42 am

Hmm, I think you're on to something Random.

I also had problems with PaceAtMe in the past. I tried using it for my 'Quick Bite' feed option. It will lift an actor out of a chair or from an idle (like sweeping the floor) but other then that it does not actually place them at you. So no big shocker that it didn't work with the birds. Hmm...

Since it places them right at the actors head what about the cavebats or 'batgroup'?

What if there was an offset with MoveTo instead of PlaceAtMe

Like...

akTargetRef.MoveTo(Game.GetPlayer(), 100, 0, 0)


Thanks for attempting man. it means a lot to me.
User avatar
adam holden
 
Posts: 3339
Joined: Tue Jun 19, 2007 9:34 pm

Post » Tue Jun 19, 2012 11:40 pm

Casting the spell the first time doesn't seem to do anything but subsequent casts work. The PlaceAtMe() put it so it was right above the player's head, so I tried to move it. That made the whole thing not work. The script refused to compile with PlayAnimationAndWait(). I tried to give the spell a duration so that I could un-reference the placed object later and delete it, but that didn't work.

Maybe someone else can figure something out.

Why not just use utility.wait(x) instead of PlayAnimationAndWait, then another utility.wait(y) followed by disable/delete?

Scriptname fg109TestMEScript extends activemagiceffect  ObjectReference property BirdsEffect autoObjectReference BirdsRefEvent OnEffectStart(Actor akTarget, Actor akCaster);StartBlock  Debug.Notification("Start block running")  Form BirdsBase = BirdsEffect.GetBaseObject()  BirdsRef = akTarget.PlaceAtMe(BirdsBase, 1)  BirdsRef.MoveTo(akTarget, 0, 0, -150)  Utility.Wait(0.1)	  ;lame attempt to get this MoveTo+PlayAnim working  BirdsRef.PlayAnimation("playanim01")  Utility.Wait(x) ;where x is how long the animation plays;FinishBlock  Debug.Notification("Finish block running")  BirdsRef.Disable()  BirdsRef.Delete()  BirdsRef = NoneEndEvent
User avatar
Milad Hajipour
 
Posts: 3482
Joined: Tue May 29, 2007 3:01 am

Post » Tue Jun 19, 2012 7:47 pm

That would be one way but man that would mean hiding that model in every cell. Not to mention the effect would be void or even possibly crash the game in cells (like those added by other mods) when the power was used.

Perhaps in the end a shader is the only way to go. There's got to be other options I just know it.

You can move objects between cells, no problem. You only need one bat object, put it in a dummy cell and move it to the player when needed. Afterwards simply disable it. When you need it again you do the same thing. Much better than the needless use of placeatme. Even though it doesn't cause bloat like in Oblivion since at least you can delete refs after they were used it is not needed here.
User avatar
A Boy called Marilyn
 
Posts: 3391
Joined: Sat May 26, 2007 7:17 am

Post » Tue Jun 19, 2012 11:15 pm

This is excellent I think we're on to something here fellas. I can't wiwt to get off work and test this out. I've been messing around with a bat\raven form for over a week.
User avatar
kitten maciver
 
Posts: 3472
Joined: Fri Jun 30, 2006 2:36 pm

Post » Tue Jun 19, 2012 9:52 pm

Alright so I've been messing around this and I haven't got it working yet.

Phitt: I was looking at your suggestion and was curious how you do that? I've yet to do anything with the worldspace. All my modding has been in objects and scripts.
User avatar
Nicole Coucopoulos
 
Posts: 3484
Joined: Fri Feb 23, 2007 4:09 am

Post » Tue Jun 19, 2012 9:19 pm

Phitt is saying what I was saying above.

As for making a cell. Just watch the start of a quick tute video on making a player house (tons around the place) it will give you the basic background on making a new cell.

Then in your script make an object ref property and you should be able to point to any anything in that cell.
User avatar
Darian Ennels
 
Posts: 3406
Joined: Mon Aug 20, 2007 2:00 pm

Post » Tue Jun 19, 2012 9:31 pm

Alright guys thank you so much for explaining script mumbo jumbo that i couldn't find anywhere else.

With all your help I was able to get close to finishing this spell.

The final steps now are figuring out why my custom sound effect doesn't play in game and how to have the spell cancel when other vampire powers are used. I tried creating a keyword for the dispell checkbox in the magic effect for the spell but it doesn't work.

Big thanks again for putting up with my constant needs. ;)
User avatar
Harry Hearing
 
Posts: 3366
Joined: Sun Jul 22, 2007 6:19 am

Post » Wed Jun 20, 2012 12:31 am

Phitt is saying what I was saying above.

As for making a cell. Just watch the start of a quick tute video on making a player house (tons around the place) it will give you the basic background on making a new cell.

Then in your script make an object ref property and you should be able to point to any anything in that cell.

Awesome. Doing that now. Thank you mate.
User avatar
A Dardzz
 
Posts: 3370
Joined: Sat Jan 27, 2007 6:26 pm


Return to V - Skyrim