Jump to content

Lua and C++ commands mix


AggrorJorn
 Share

Recommended Posts

I've noticed that a lot of commands that I am using in Lua script can be mixed with the ones from C++. Some times a command works and sometimes it doesn't. The weird thing is that the C++ commands often turn blue while the actual Lua command stays black .

Is this because the commands from C++ are universal too whatever script editor you are using?

 

Place the following in your lua script editor and you'll see:

-- Lua command
body:SetCollisionType(1,1)
--C++
EntityType (body,1)

-- Lua command
body:SetMass(0.01)
--C++
SetBodyMass(body, 0.01)

--confusing:
--Lua command in combination with C++
ground:PaintEntity(material)
--command that you should use, but does not turn blue
ground:Paint(material)

 

Link to comment
Share on other sites

this concerns me too

 

a novice such as myself could use as much help as I can get, and the inconsistency in the way that the commands receive highlighting in the editor is something that has brought doubts to my own coding experience in the past, present and I'm sure the future as well

Core I5 2.67 / 16GB RAM / GTX 670

Zbrush/ Blender / Photoshop CS6 / Renoise / Genetica / Leadwerks 3

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...