Beginning with LUA

  • #20, by MachtnixThursday, 21. August 2014, 18:42 10 years ago
    For my next game (if Visionaire works and after I bought it.... ;-), I want to make some side quest characters (Nebencharakter) automatically walk. Now it's impossible, because I have only one way system per scene (Wegesystem) for all my characters. I can't determinate how they cross each other on the floor.

    2nd: I can't move my character up and down (in my testgame I used a flying robot 2 Meters above the floor, so he crosses other characters without tangle), but he can't move down without changing its fixed movement center in the animation studio. The results are outfits with different coordinate centres of the same robot. I think that's all problems LUA can help.
    But that's still a long way off.

    Machtnix

    Thread Captain

    1097 Posts


  • #21, by afrlmeThursday, 21. August 2014, 19:08 10 years ago
    1. you are talking about basic A.I & collision detection, similar to what Revolution Soft. did in Lure of the Temptress when characters came into contact with each other & either greeted one another, or one of the characters would side step out of the way? If that's what you are talking about then I too would also like to see something implemented into the engine for achieving that. I believe it would already be possible to do the collision detection because of the chase character function which I believe uses a radius around the character to determine when the character doing the chasing comes within x pixels from the character being chased. But I'm not sure how to use said information, at the minute.

    You can have characters move with loops, if queries & random values etc...

    2. Unfortunately you can't update the character center of the robot. You could however create different heights of the robot in the same animation & control the frames very easily with lua script. Or alternatively you could create the robot as a scene object with animation & easily move it to a new position with the new move object action part or with the lua moveObject workflow function I wrote recently which is the same as the move object action part but with more options. You would have to use lua to control the scale of the character but that could also be done via lua.

    Imperator

    7278 Posts

  • #22, by MachtnixThursday, 21. August 2014, 20:00 10 years ago
    1. you are talking about basic A.I & collision detection, similar to what Revolution Soft. did in Lure of the Temptress when characters came into contact with each other & either greeted one another, or one of the characters would side step out of the way?

    Yes. But collision detection is much more than I want, I only want to have similar "ways" the characters walks undisturbed - like a 19th century paper theatre with stacks of sceneries. Collision detection would be very great, but it's for Visionaire 6.0, I think... ;-)

    2. Unfortunately you can't update the character center of the robot. You could however create different heights of the robot in the same animation & control the frames very easily with lua script.

    That's what I hope for. Having f.e. three animations with different midpoints and change them or the position via LUA.

    Now I use an action "change outfit", but I need EVERY animation in EVERY angle, that's a lot of memory... Because the robot follows the main character I need this three animations for EVERY stage (every scene needs a new robot). That's why I stopped this idea...

    Machtnix

    Thread Captain

    1097 Posts

  • #23, by afrlmeFriday, 22. August 2014, 00:49 10 years ago
    http://wiki.visionaire-tracker.net/wiki/Basic_lua:_Index

    Index page done. (well need to add more pages to index list when I've add the pages)
    & the operators page is finished. Will try & sort out Lua Types page the morrow.

    By the way the floating block on the left hand side of the wiki is the content menu. Hover mouse over it to slide it out. If there's no text then it's probably because there's no headers or sub header categories on the page.

    Imperator

    7278 Posts

  • #24, by marvelFriday, 22. August 2014, 09:50 10 years ago
    Very cool smile And thanks for all the effort that you put in it!

    Unfortunately the color contrasts and fonts (sizes and types) are a little problematic. I's not very good to read. And maybe there's a different template that fit's better to the style of VIS? smile

    Key Killer

    598 Posts

  • #25, by afrlmeFriday, 22. August 2014, 12:48 10 years ago
    We plan on adding a light theme option too. I've not finished adjusting the css for it yet. I didn't set the font-family - I think it's a web font that came with bootstrap framework theme thing. I can change it & the sizes.

    Imperator

    7278 Posts

  • #26, by ikarusFriday, 22. August 2014, 18:36 10 years ago
    Thanks for your work, AFRme. It's incredible how you worry about this forum. I hope there's more content along the time in that wiki. If you accept a suggestion for future stuff, it'll be great to see a little example of how to do something in VS (it really doesn't matter what) with Lua code.

    Newbie

    37 Posts

  • #27, by MachtnixFriday, 22. August 2014, 20:36 10 years ago
    Maybe the background-colour 20% brighter - would be enough.

    Thread Captain

    1097 Posts

  • #28, by afrlmeFriday, 22. August 2014, 20:39 10 years ago
    Sure you can provide suggestions... Over time I will provide examples & syntax for all vs related functions - I've already added a few examples to the visionaire studio functions of the script index page already.

    I won't be doing much over next couple of weeks because I'm off to England the morrow for 2 weeks (ish).

    Imperator

    7278 Posts

  • #29, by afrlmeFriday, 22. August 2014, 20:50 10 years ago
    I've currently swapped it to a white/grey color. But sure I could brighten the dark theme up a little bit. I want to have 2 themes though that user can swap with a toggle button thing. I prefer darker themes myself because too much white & bright colors irritates my eyes. When I code I use a dark/grey theme for sublime text so that I can write for longer without irritating my eyes or needing to put glasses on.

    Imperator

    7278 Posts

  • #30, by SmithersSaturday, 06. September 2014, 14:04 10 years ago
    I too am just starting to learn Lua. I bought the book mentioned by the OP a while ago. It's a useful reference and has some good exercises in it, so I would recommend it. I also worked through the online exercises that AFRLme referenced, they're useful too. Basically I'm learning from the beginning again how to program. Last time I did any programming it was in Basic in the 1980s!

    Newbie

    3 Posts