glowplug Posted September 6, 2015 Author Share Posted September 6, 2015 You are correct in every aspect.Just to clarify, I have already done the Constant Zflight paths using...xmarkers to determine height and patrol boundaryCreature script - checks conditions to determine whether to call...StartFlying, Stabilize, Damage, IfTurn (uses my GetDistanceXY)Invisible plane - a nif using an Elevator Collision Mesh....these do not use trigonometry - IfTurn simply checks for out of bounds on the nearest xmarker. Note: the actual Zheight can drop towards ground on frames but not visible in game.This makes GetDistance useless which is why I did the GetDistanceXY. While a parabel algorithm could be based on start xyz to player xyz, I have no idea how to plot points along it relative to GameMode frequency. I had thought of a straight line...Dive bomb flagged to runEach loop of GameMode a Creature New xyz is calculated from Creature current xyz relative to Player current xyz...this, however, has a deceleration and I have failed to get the trigonometry right. Otherwise it could use...Check for proximity - if close flag as doing.Fireball and disappear.Locate near player.Fireball and reappear.Battle till dead.Fireball and disappear - flag as not doing (ready for next)....while it wasn't what I wanted it would be more than adequate. Link to comment Share on other sites More sharing options...
HikariWS Posted September 7, 2015 Share Posted September 7, 2015 It's good to see people still working on Oblivion mods. I'm on my second installment of the game, started it only a couple of months ago, after years not having time to play anything :( Currently I'm doing guild quests, then I'll do city quests then main quest... it's so much content! :D I have a list of quest mods I wanna play after official DLC. I added your mod on top of it. I hope you're still around when I finally start your mod! Link to comment Share on other sites More sharing options...
Surilindur Posted September 7, 2015 Share Posted September 7, 2015 (edited) Haha. Just realised using a parabel placed on player would need the other thing that uses gameworld origo as origo. Otherwise making the move from player to static would become a nightmare. :tongue: Like: z - zp = a(x - xp)2When xp = player x and zp = player z But maybe just a straight line would be handy. I can see if I could somehow make at least that one happen. Just having the thing appear and disappear would look bad. Hey, how would a circle work? With the centre at player's (z,y) and height of the creature's flying level from player as the radius? Would it make plotting points easier? Because it would then be possible to just move the creature along the circle's circle thingy at a constant speed. It should not be difficult to calculate, either. Or how would it work relative to gamemode? How should it work relative to gamemode? If it runs every frame, pacing the movement should not be too difficult. Like if a creature in high-level AI processing has its AI updated once every frame, and the average mod user has an FPS of 30, maybe, and completing the full dive would take four seconds, it could be possible to divide the length of half the circle the angle in the middle in 30*4 parts and then calculate the point on the circle every frame accordingly? But if the circle is three-dimensional, it would probably be easier to use a straight line. I think. Even with a proper formula, moving the circle with player might result in odd movement, as the circle could move, for example, to the left, and the creature would be moved to a new point on the circle, in which case it would jump left. Maybe? I can see if I can make the straight line work somehow when I have time. I am not a professonal mathematician, but I like it a lot, and this sounds like an interesting challenge. :smile: Edited September 7, 2015 by PhilippePetain Link to comment Share on other sites More sharing options...
glowplug Posted September 7, 2015 Author Share Posted September 7, 2015 Your reply has given me the answers to a number of my questions, thank you.I think we agree that a Parabel is complex and unnecessary - forget it.The design of the palace makes circling a problem.The problem with strict straight line as StartXYZ to EndXYZ is that the player moves.If it can be NextXYZ based on CurrentXYZ to PlayerXYZ per frame that would be great.I would call this a FlyToPlayer function.This is where I was talking about Deceleration.Next done as Fraction of Current to Player will slow down on approach.This could be better.If not could be a Unit based on the first Current to Player could work. Link to comment Share on other sites More sharing options...
Recommended Posts