Squirrel

The programming language
Welcome to Squirrel Sign in | Join | Help
in Search

Newbie question: Linking Squirrel and host application.

Last post 06-13-2008, 7:26 PM by drak. 1 replies.
Sort Posts: Previous Next
  •  06-11-2008, 7:53 AM 2563

    Newbie question: Linking Squirrel and host application.

    Good day gentlemen.

    I am going to implement Squirrel in my RPG, but I have never used scripts before. So how can I link Squirell with my application?
    For example, I have wrote class called "Unit" in C++ code. It has list of methods like:
    - Kill
    - SetMana
    - SetHitPoints
    - SetSpeed
    - AddWeapon

    etc. And now I want to have a function called "heal_unit" in my scripts, with arguments like:
    heal_unit(UnitID, Percentage)  

    so I can play with untis trough Squirrel scripts, not C++ code. How can it be done?

    The answer like "Oh my god, what a noob. Learn this: http://xxxxxx.com" will be greatly appriciated.
  •  06-13-2008, 7:26 PM 2567 in reply to 2563

    Re: Newbie question: Linking Squirrel and host application.

    There are two books on game scripting you can read:
    http://www.amazon.com/Game-Development-LUA/dp/1584504048/ref=sr_1_5?ie=UTF8&s=books&qid=1213409360&sr=1-5
    http://www.amazon.com/Game-Programming-Python-Development/dp/1584502584/ref=pd_sim_b_title_5

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems