Galacticat42 Posted February 23, 2012 Share Posted February 23, 2012 (edited) Turns out I had to rewrite the code a lil while back since, as it turns out, the script forced me into the ground which caused a slingshot effect most know as the Giant's Club Launch. After correcting it, the Havok effects refused to kick back in which caused me to float there. So I had to ditch the setposition() function and look at ApplyHavokImpulse(). This seemed to be a good idea as its description for objects seemed perfect, but as it turns out the player character doesn't have a mass registered to the engine so ApplyHavokImpulse would be useless since the base mass factor of the character is defaulted to 0 with no obvious way to set it. So finally I'm currently looking into the SetMotionType() function which I think might have been implemented into the Script Dragon SDK incorrectly. Regularly in Papyrus the function would require a reference object and a sub-string to set for either Dynamic or Keyframed modes and oddly enough the Script Dragon version requires a uint and so I have NO idea what the numerical values for Dynamic/Keyframed modes are. /* THE DRAGONBORN LEGACY Script Dragon */ #include "common\skyscript.h" #include "common\obscript.h" #include "common\types.h" #include "common\enums.h" #include "common\plugin.h" #include <math.h> #define CONFIG_FILE "DragonbornLegacy.ini" #define SCR_NAME "DLMain" void flySim(BYTE *FlapKey, PlayerCharacter *ref, bool bAutoFly, int *iFlapCD) { float fPosX = ObjectReference::GetPositionX((TESObjectREFR *)ref); float fPosY = ObjectReference::GetPositionY((TESObjectREFR *)ref); float fPosZ = ObjectReference::GetPositionZ((TESObjectREFR *)ref); float fAngX = ObjectReference::GetAngleX((TESObjectREFR *)ref); //East - West? float fAngY = ObjectReference::GetAngleY((TESObjectREFR *)ref); //North - South? float fAngZ = ObjectReference::GetAngleZ((TESObjectREFR *)ref); //Up - Down float fDragonForm = 3; //0 = regular player race, 1 = first shout level, 2 = 2nd shout word, 3 = 3rd shout word float fThrust = 0; float fPeakThrustTime; if (fDragonForm > 1){ if (GetKeyPressed(*FlapKey)){ if (*iFlapCD == 0){ *iFlapCD = 1000; //1 second. PrintNote("Flap CD: %i.", *iFlapCD); } } if(*iFlapCD > 0){ fPeakThrustTime = *iFlapCD/2; //Times the amount of thrust given by the wings *iFlapCD -= 1; fThrust = 1000; fPosZ -= fThrust; ObjectReference::SetMotionType((TESObjectREFR *)ref, 0, false); }else{ } } } void main() { BYTE FlapKey = IniReadInt(CONFIG_FILE, "Flight", "FlapKey", 0); bool bAutoFly = IniReadInt(CONFIG_FILE, "Flight", "bAutoFlap", 0); PrintNote("[%s] started, press '%s' to use", SCR_NAME, GetKeyName(FlapKey).c_str()); int iFlapCD = 0; while (TRUE) { if (true){ CActor *player = Game::GetPlayer(); flySim(&FlapKey, (PlayerCharacter *)player, bAutoFly, &iFlapCD); } Wait(0); } } I'm still in the middle of rearranging the code so some of the syntax won't make sense. Also note that right now I'm just trying to work on a collision-friendly up/down button. Edited February 23, 2012 by Budz42 Link to comment Share on other sites More sharing options...
hex_ratt Posted February 24, 2012 Author Share Posted February 24, 2012 (edited) Dragon riding? Flying horses? Pah, who needs 'em.....Skyrim needs a Pegasus mount! Edit: The ability to throw rain thunderbolts down on the heads of your enemies would be kinda sweet too.....I always wanted to be Zeus. Isn't Pegasus basically a horse that can fly but has wings. Let me see if I can put wings on a horse and get it to fly. prototype pregasus: Edited September 30, 2012 by hex_ratt Link to comment Share on other sites More sharing options...
porroone Posted February 24, 2012 Share Posted February 24, 2012 Well, after hours of trying to get a proper animation to work, I belive I surrender, my ring works perfect now it just lacks a proper animation, I was hoping if somebody could port a couple things from oblivion, one being the Wings of archangel from midas magic, and the sky dive animation, with those 2 my mod will be complete, else I better start learning 3dsmax lol. Link to comment Share on other sites More sharing options...
xyks Posted February 24, 2012 Share Posted February 24, 2012 Well, after hours of trying to get a proper animation to work, I belive I surrender, my ring works perfect now it just lacks a proper animation, I was hoping if somebody could port a couple things from oblivion, one being the Wings of archangel from midas magic, and the sky dive animation, with those 2 my mod will be complete, else I better start learning 3dsmax lol. I guess you have ssen the mod by now aynway, but here are wings:http://skyrim.nexusmods.com/downloads/file.php?id=10658 What I was wondering about converting stuff from Oblivionif it would also be possible to get VipCxjs Air Fight System for Oblivion working in Skyrim as well? To me it seems that his script somehow managed to include custom animations as well as spellcasting/meleeattacks.http://tes.nexusmods.com/downloads/file.php?id=36903 Link to comment Share on other sites More sharing options...
dontkeepscore Posted February 24, 2012 Share Posted February 24, 2012 Well, after hours of trying to get a proper animation to work, I belive I surrender, my ring works perfect now it just lacks a proper animation, I was hoping if somebody could port a couple things from oblivion, one being the Wings of archangel from midas magic, and the sky dive animation, with those 2 my mod will be complete, else I better start learning 3dsmax lol. perfect as in collisions? Link to comment Share on other sites More sharing options...
zorndyken Posted February 24, 2012 Share Posted February 24, 2012 (edited) you all must be team up to making this realSkeleton winghttp://skyrim.nexusm...ile.php?id=6332 + FavoredSouls Angels will be perfect Edited February 24, 2012 by zorndyken Link to comment Share on other sites More sharing options...
porroone Posted February 24, 2012 Share Posted February 24, 2012 Well, after hours of trying to get a proper animation to work, I belive I surrender, my ring works perfect now it just lacks a proper animation, I was hoping if somebody could port a couple things from oblivion, one being the Wings of archangel from midas magic, and the sky dive animation, with those 2 my mod will be complete, else I better start learning 3dsmax lol. perfect as in collisions?Nop, not sure how to do that without using C++. Link to comment Share on other sites More sharing options...
jimhsu Posted February 24, 2012 Share Posted February 24, 2012 If you want something simple-ish, rig the favoredsouls wings to the skeleton, make a simple-ish flapping animation, and replace the jump animation with that. Yes I know it's simpler said than done, but that shouldn't take more than a day and would get something out now. Link to comment Share on other sites More sharing options...
Korodic Posted February 24, 2012 Share Posted February 24, 2012 cool, i hope to see angel / demon wings armor with this modWe are dovahkiin, I want the ability to grow wings out of my back and fly. EDIT: What he said jimhsu :D Link to comment Share on other sites More sharing options...
jimhsu Posted February 24, 2012 Share Posted February 24, 2012 (edited) cool, i hope to see angel / demon wings armor with this modWe are dovahkiin, I want the ability to grow wings out of my back and fly. The animation required for that would be ... something I'm going to not try to do, judging from how complex the werewolf transformation anim is. Edited February 24, 2012 by jimhsu Link to comment Share on other sites More sharing options...
Recommended Posts