Open child script when V-REP is not running

Typically: "How do I... ", "How can I... " questions
mthor13
Posts: 2
Joined: 03 Jul 2017, 08:32

Open child script when V-REP is not running

Postby mthor13 » 17 Jul 2017, 14:58

Hi,
Is it possible to edit child scripts without launching v-rep?
I am currently on Linux and the script only becomes visible when I start v-rep (they are called embScript_*some_number*.lua).

Best,
Mathias Thor

coppelia
Site Admin
Posts: 5901
Joined: 14 Dec 2012, 00:25

Re: Open child script when V-REP is not running

Postby coppelia » 17 Jul 2017, 20:53

Hello Mathias,

yes, the best way would be to have your child script contain something like:

Code: Select all

require('utils')
include('/lua/yourScript.lua')


From V-REP 3.4.1 onwards, you will also be able to directly write:

Code: Select all

sim.include('/lua/yourScript.lua')


this way, your script content will be stored outside of your scene or model file.

Cheers

mthor13
Posts: 2
Joined: 03 Jul 2017, 08:32

Re: Open child script when V-REP is not running

Postby mthor13 » 20 Jul 2017, 19:53

Thank you very much!


Return to “General questions”

Who is online

Users browsing this forum: ag_raed, atom, Google [Bot] and 8 guests