Jump to content

Flying Mod Wip


porroone

Recommended Posts

Hello everyone, I have been working on a mod for a while that lets you fly playing some cool animations, it took me time and a lot of learning but finally I have something decent to show off, here is what I have so far:

http://www.youtube.com/watch?v=D3c4h5aWo2c&feature=player_embedded

I'll explain how this work, since im in need of some help:

First off I made a script to handle the flying, that was the easy part, and with the help of some friends I perfected it, there is still some problems but with the release of skse they will be easily solved. Then came the hard part, I spent like a month studying and trying to modify the behavior file to include my own animations to handle the flying, waste of time, so I decided to take another approach, to create a sub-race and a copy of the character's behavior, so from scripting I switch the race to my custom race, with my custom behavior (note that the sub-races are one for each race, so custom races wont work properly with this mod), after that I went to the animation's tab in the ck, added a new sibling (my custom behavior file) and started adding the Actions to the graph, which works as seen in the video, problem is im missing either some action or animation, as seen in the video the character sometimes gets stuck in the T position, which means it couldnt find the right animation in the graph, I was hoping somebody could tell me what am I missing, here is a picture of my graph right now, currently is missing ActionFall, but dont take it into consideration, already tried it and it doesnt work:

http://s13.postimage.org/8mj5sn9uv/currentgraph.jpg

Im so close of getting this to work, so I would really appreciate any help.

Link to comment
Share on other sites

You know that feeling when you see something really cool and you think to yourself, "Man I've got to have that."

 

This is one of those things.

 

I'm completely useless in terms of helping you, but I thought you should know how awesome your progress is. A lot of people are looking forward to a good flying mod, and this may just be it.

 

Good luck getting the help you need.

Link to comment
Share on other sites

couldt u force by script to play another animation like actionland, or ,dunno, maybe take a look on swim action to see how its setup, it has to be some part in middle to make it smooth, the t pose has happen me a lot when dealing with behaviors and it often happens when u send event to graph and it isnt there. or something isnt correct setup or missing something.
Link to comment
Share on other sites

I tried both, to play them from script and from graph, both failed, here I have a copy of the script playing animations:

Scriptname __PlyFly extends activeMagicEffect

Armor property RingFF auto
Actor property Player auto
import utility
import form
import game
import debug
import ObjectReference
import Math
perk property NoFallDmg auto
Action property JumpS auto
race DefaultRace
race[] property FlyableRace auto
race[] property NormalRace auto
GlobalVariable property DirF auto
GlobalVariable property DirB Auto
GlobalVariable property DirR auto
GlobalVariable property DirL Auto
idle property idleplayer auto
float bearing
float elevation
float speed
float posx
float posy
float posz
int i

Event OnEffectStart(Actor Player, Actor Caster)
       Player = GetPlayer()
       DefaultRace = Player.GetRace()
       CheckRace()
       SetIniFloat("fInAirFallingCharGravityMult:Havok",0)
       if Player.IsEquipped(RingFF)
               while Player.IsEquipped(RingFF)
                       Fly()
               endWhile
       endIf
endEvent

function CheckRace()
       While i < 9
               if DefaultRace == NormalRace[i]
                       Player.SetRace(FlyableRace[i])
               endif
               i += 1
       endWhile
endFunction

function Fly()

               posx = Player.GetPositionX()
               posy = Player.GetPositionY()
               bearing = Player.GetAngleZ()
               elevation = Player.GetAngleX()
               posz = Player.GetPositionZ()
               if Player.IsSprinting() && DirF.GetValueInt() == 1
                       speed = 3000
                       sendAnimationEvent(Player,"SprintStart")
                       posx += sin(bearing)*speed
                       posy += cos(bearing)*speed
                       posz -= sin(elevation)*speed
                       Player.TranslateTo(posx,posy,posz,bearing,0,elevation,speed,1)
               else
                       speed = 1000
                       sendAnimationEvent(Player,"sprintStop")
                       
               endIf
               if DirF.GetValueInt() == 1 && DirB.GetValueInt() == 0 && DirL.GetValueInt() == 0 && DirR.GetValueInt() == 0
                       sendAnimationEvent(Player,"blendMoveStop")
                       
                       posx += sin(bearing)*speed
                       posy += cos(bearing)*speed
                       posz -= sin(elevation)*speed
                       Player.TranslateTo(posx,posy,posz,bearing,0,elevation,speed,1)
               endif
               if DirF.GetValueInt() == 0 && DirB.GetValueInt() == 1 && DirL.GetValueInt() == 0 && DirR.GetValueInt() == 0
                       sendAnimationEvent(Player,"moveStart")
                       speed = 600
                       posx -= sin(bearing)*speed
                       posy -= cos(bearing)*speed
                       posz += sin(elevation)*speed
                       Player.TranslateTo(posx,posy,posz,bearing,0,elevation,speed,1)
               endif
               if DirF.GetValueInt() == 0 && DirB.GetValueInt() == 0 && DirL.GetValueInt() == 1 && DirR.GetValueInt() == 0
                       sendAnimationEvent(Player,"moveStart")
                       speed = 600
                       posx += sin(bearing - 90)*speed
                       posy += cos(bearing - 90)*speed 
                       posz -= sin(elevation)*speed
                       Player.TranslateTo(posx,posy,posz,bearing,0,elevation,speed,1)
               endif
               if DirF.GetValueInt() == 0 && DirB.GetValueInt() == 0 && DirL.GetValueInt() == 0 && DirR.GetValueInt() == 1
                       sendAnimationEvent(Player,"moveStart")
                       speed = 600
                       posx += sin(bearing + 90)*speed 
                       posy += cos(bearing + 90)*speed
                       posz -= sin(elevation)*speed
                       Player.TranslateTo(posx,posy,posz,bearing,0,elevation,speed,1)
               endif
               if DirF.GetValueInt() == 0 && DirB.GetValueInt() == 0 && DirL.GetValueInt() == 0 && DirR.GetValueInt() == 0 && !Player.IsSprinting()
                       if Speed > 0
                               debug.Notification(Speed)
                               Speed -= 1
                               Player.TranslateTo(posx,posy,posz,bearing,0,elevation,speed,1)
                               if Player.IsRunning()
                                       sendAnimationEvent(Player,"moveStart")
                               elseif Player.IsSprinting()
                                       sendAnimationEvent(Player,"sprintStart")
                               endIf
                       else
                               Player.StopTranslation()
                               sendAnimationEvent(Player,"moveStop")
                               sendAnimationEvent(Player,"IdlePlayer")
                               Speed = 0
                       endIf
               endIf
               
endFunction

Event OnEffectFinish(Actor Player, Actor Caster)
       Player.StopTranslation()
       SetIniFloat("fInAirFallingCharGravityMult:Havok",1.35)
       Player.SetRace(DefaultRace)
endEvent

I have tried a lot of things already and nothing seems to work :/, there is one event tho that seems that did something, I still get the T animation but for like half a second now, the 00nextclip, Its one of the things I didnt take into consideration cause it was on the LOOSE tab.

Link to comment
Share on other sites

This is so f***ing unreliable, I have no idea on what to do anymore, the error seems to be related to the render time (GOD f***ing KNOWS WHY), so im starting to belive its not a problem I could easy fix by just creating a new behavior, cause maybe, and its a big maybe, the problem comes while creating a new behavior graph inside an ESP, it takes preference to render first, and then play the animations, its really the only explanation I can think of, since in my laptop with lower graphics, it barely happens, when in my pc, with ugrids to 11, enb and everything at ultra it gets stuck several times.
Link to comment
Share on other sites

I have a theory (maybe) I'm not a modder, not in the slightest, so I might be completely retarded, but I had this Vertibird mod for Fallout, and I got the same kind of errors, so I lowered my Graphics and it started working.

 

(again, possibly I'm a retard) but maybe give it a shot.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...