Search Unity

Flying Script advice and extension

Discussion in 'Scripting' started by Macupuncture, Aug 13, 2006.

  1. Macupuncture

    Macupuncture

    Joined:
    Jun 13, 2005
    Posts:
    179
    Greetings, script Gods. Please help.

    I am working on an 'arcade style' flying script for a project in progress, and my scripter is running out of time to code. I thought I might run this past you.

    The script SHOULd allow for keypad movement and turning (which it does) as well as forward an reverse (which doesn't compile in a build for some reason).

    Ideally, I would like that to be WASD for movement and keypad for altitude and rudder, but I don't know how to do that. Actually, I don't know how to do much in the way of coding at all. (sigh)

    Finally, just for playability, I would like it to have dynamic stabilization ie, if no key is pressed, the player comes back to flat and level within a second or so.

    Once this script is finished, I will gladly make it available for eveyone in the WIKI, so you are not just helping me, you are helping everyone. If anyone has a few minutes to look it over I would really appreciate it.

    Thanks for your knowledge. Regards,

    Mark Houck
    Project SpyFly
     

    Attached Files:

  2. Samantha

    Samantha

    Joined:
    Aug 31, 2005
    Posts:
    609
    The code is pretty messy. I took a minute to just look it over, but it will probably take some serious time to figure out what he's doing and root out the problem. For now, I've just corrected a lot of spacing/layout inconsistencies and made the script generally more readable to everyone.

    Anyone who wants to tackle this one, go for it. I might have time to take a look at it later this week, but too busy right now :eek:
     

    Attached Files:

  3. Macupuncture

    Macupuncture

    Joined:
    Jun 13, 2005
    Posts:
    179
    See? That's what I love about you guys. To me, coding is basically a mess to start with (since I don't understand it), but to the trained eye, it is an elegant, even beautiful intertwining series of structures with very specific rules. Almost like art.

    I think that's very cool. I wish I had it in me to code, but my thinking is far to haphazard and from what I understand, machines don't like 'messy' very much ;-)
    I can write a song or a story, but not code.

    Thanks for taking the time to look it over.