Scripts / [Request] Script active LUA on any level and EXE external control

Author
Message
Devcore35
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 5th Aug 2014
Location: Rouen (76) - France
Posted: 31st Mar 2015 11:24
Hello,

I started looking at the design of an inventory "Drag and Drop" to GameGuru.
But I miss some interactions in the LUA script that handles the display of the inventory.

1 - Do you know how to TriggerZone a LUA script and placed on the player at the start of the level makes active LUA script on the entire level? So basically ensure that a LUA script is active throughout an entire level.

2 - Do you know what LUA command to execute an external program developed in C ++ ".exe"? Because the inventory is a C ++ program that will be displayed in GameGuru to give orders (through other LUA scripts) and it will appear in the foreground forced giving back to mouse control the player in order to move the elements .

This is only a test but I wish I had the answers 1 and 2 ^^
If inventory works miraculously I should publish.

Thank you to you!
PM
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 31st Mar 2015 17:51
sounds great, just hope it works, i'm no script writer, but good luck with the inventory, will it be carried across multiple levels?
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 31st Mar 2015 17:57
1. place an entity and set it always active in the properties section (you can hide it in the properties too)

2. you can use os.execute() i guess if the file is inside the standalone files folder
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
tomjscott
User Banned
Posted: 31st Mar 2015 19:29
You'd be better off making your program a Lua extension plugin (DLL). Then you can talk directly to your external C++ code. That's how I did Omega Core and it works great. I was even able to create a 2D GUI layer on top of Game Guru using this technique, which is pretty much what you are trying to do as well.
System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0085
CR4CK3T
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: Deutschland
Posted: 3rd Apr 2015 11:58
Look here ok is in german but you see the comands:
http://lua.gts-stolberg.de/os.php#os.execute


this is a snap shot from me code:



Have Fun & Good luck

PS: os.getenv("USERNAME") is reading system variables

Login to post a reply

Server time is: 2024-05-23 22:42:37
Your offset time is: 2024-05-23 22:42:37