lance3g

Member
  • Content count

    2
  • Joined

  • Last visited

Community Reputation

122 Neutral

About lance3g

  • Rank
    Newbie
  1. I am learning lua recently and find Singles2 is a good source. All of the state machine is written in lua: beginStateMachine() onEnter(function(msg) if this.animName then -- scene graph animation this.startAnimation(this.animName); end if this.hasMaterial("glowMat") then -- texture animation sendMsgThis("startAnim"); end end ) onMsg("startAnim", function(msg) preloadTextures(this, {"Glitzer_000", "Glitzer_001", "Glitzer_002", "Glitzer_003"}); startAnim({"Glitzer_000", "Glitzer_001", "Glitzer_002", "Glitzer_003"}, 0.1); end ) onMsg("showPic", function(msg) replaceTexture("glowMat", msg.data); end ) endStateMachine() The syntax is like an article in Game programming gems 1. But in that article it is written in C. So I am wondering how Single2 utilize this lua code? Maybe they write some cpp functions like beginStateMachine() and onMsg()? And generate a cpp FSM class using the lua code?
  2. Hi, I am trying to write a level editor using maxscrpit. I want something like unreal editor. The user could select a mesh in a separate UI window and place it into the level. I am not sure if I could achieve this in 3dsmax? Could I have a render window that render any mesh in the maxscript generated UI? Many thanks!