I have some questions to ask...
+2
TheGeneral
Morieza
6 posters
Operation Flashpoint Dragon Rising OFDR Forums :: OPERATION FLASHPOINT: DRAGON RISING :: OFDR EDITING :: EDITING Q+A
Page 2 of 3
Page 2 of 3 • 1, 2, 3
Re: I have some questions to ask...
I set shortcut keys of Notepad.exe to "Ctrl+Shift+C".
but when I try to send "z" or other key, it's no use.
Do you know how to send key to game?
Thanks!
- Code:
require("luacom");
ws = luacom.CreateObject("WScript.Shell");
ws:sendkeys("+^c");
but when I try to send "z" or other key, it's no use.
Do you know how to send key to game?
Thanks!
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: I have some questions to ask...
OK... A simple question: how to use loadlib?
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: I have some questions to ask...
runerback wrote:OK... A simple question: how to use loadlib?
The people that might be able to help you with this no longer visit the forums and TBH, I haven't heard from them since the old CM forums. What you are trying to do has not been done before, partially because the complete lua library is not included in the game. As far as loading the .dll, the only person I know to have done anything similar is Dschonny and has not been heard from for a long time. Sorry I can't be more help.
Cheers
![Very Happy](https://2img.net/i/fa/i/smiles/icon_biggrin.png)
Re: I have some questions to ask...
Oh...It seems that I'm on my own...
I download lua for windows and load user32.dll successfully, then I'm trying to add alien to game.
How about my mission? Does it work correctly?
I download lua for windows and load user32.dll successfully, then I'm trying to add alien to game.
How about my mission? Does it work correctly?
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: I have some questions to ask...
Maybe something useful here:
http://www.suderman.com/OFPDR/DROPP/reference.html
http://www.suderman.com/OFPDR/DROPP/reference.html
Morieza- Points : 25
Reputation : 1
Join date : 2013-10-25
Re: I have some questions to ask...
Thanks! But the hotkey of DROPP is invalid in my game...Morieza wrote:Maybe something useful here:
http://www.suderman.com/OFPDR/DROPP/reference.html
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: I have some questions to ask...
How to use hotkey functions of EDX? Does it need some extra files?
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: I have some questions to ask...
http://www.moddb.com/mods/this-is-war/downloads/ofdr-hotkey-application
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: I have some questions to ask...
What's the mean of TOO Dummy? How to use it?
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: I have some questions to ask...
And "Blocker Logic", it's hard to understand...
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: I have some questions to ask...
I create mission with EDX, can others who do not use EDX run my mission?
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: I have some questions to ask...
Why this cause a mistake?
- Code:
function onEnter(zoneName, unitName)
require("alien");
findW=alien.user32.FindWindowA;
findW:types{"string","string"};
hWnd=findW(nil,"Dragon Rising");
if hWnd==0 then
OFP:displaySystemMessage("-----0------");
else
OFP:displaySystemMessage(hWnd);
MsgBox=alien.user32.MessageBoxA;
MsgBox:types{ret="long",abi="stdcall","long","string","string","long"};
MsgBox(hWnd,"title for test","lua call windows api",0);--here.
end
end
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: I have some questions to ask...
Hi runerback. I'll do my best to answer these questions.
The TOO dummy is there so you can put your player team into a squad that will appear in the pre mission briefing. To date this is the only known application for the TOO dummy parameter.
The blocker logic will not work if you are using the EDX as the EDX replaces the dynamic generation of waypoint code from the editor. This tradeoff had to be made. This isn't a bad deal though since it was ultimately discovered that the code generation caused crashes in the game with the use of fairly few waypoints due to the size of the script that was generated.
If a mission is created with the EDX, all of the code from the EDX will also export into the mission scripts, so the answer to the question is yes. If you use the EDX for your mission, anyone can play it.
As far as what you're attempting to do in the above code, there is no way that I'm aware of to load libraries outside of those that are included in the game. There may be an off chance that if you place the library in the editor folder for library scripts, you may be able to load the library into the editor by placing a library script entity and selecting that library, but I've never tried that approach to anything before. This is, however, the exact method used to get the conversations working in the game.
Hope this helps!
Cheers![Very Happy](https://2img.net/i/fa/i/smiles/icon_biggrin.png)
The TOO dummy is there so you can put your player team into a squad that will appear in the pre mission briefing. To date this is the only known application for the TOO dummy parameter.
The blocker logic will not work if you are using the EDX as the EDX replaces the dynamic generation of waypoint code from the editor. This tradeoff had to be made. This isn't a bad deal though since it was ultimately discovered that the code generation caused crashes in the game with the use of fairly few waypoints due to the size of the script that was generated.
If a mission is created with the EDX, all of the code from the EDX will also export into the mission scripts, so the answer to the question is yes. If you use the EDX for your mission, anyone can play it.
As far as what you're attempting to do in the above code, there is no way that I'm aware of to load libraries outside of those that are included in the game. There may be an off chance that if you place the library in the editor folder for library scripts, you may be able to load the library into the editor by placing a library script entity and selecting that library, but I've never tried that approach to anything before. This is, however, the exact method used to get the conversations working in the game.
Hope this helps!
Cheers
![Very Happy](https://2img.net/i/fa/i/smiles/icon_biggrin.png)
Re: I have some questions to ask...
Thank you very much! Really! ![Very Happy](https://2img.net/i/fa/i/smiles/icon_biggrin.png)
![Very Happy](https://2img.net/i/fa/i/smiles/icon_biggrin.png)
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: I have some questions to ask...
I made a "movie" for a friend, and I want to share it here.
download here
Set "TimeOfDay" to night for better effect.![Smile](https://2img.net/i/fa/i/smiles/icon_smile.gif)
download here
Set "TimeOfDay" to night for better effect.
![Smile](https://2img.net/i/fa/i/smiles/icon_smile.gif)
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: I have some questions to ask...
And I found another game perspective.
watch video here
- Code:
function onIncap(victim, killer, method)
if victim=="player" then
OFP:setInvulnerable(victim,true);
end
end
watch video here
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: I have some questions to ask...
I put lua51.dll and luacom.dll into game root folder, then:
And run it in window mode.
If I know how to get focus of game window, then it can be used conveniently.
But I don't know......
- Code:
function onEnter(zoneName, unitName)
if isActivate(nil,"Dragon Rising") then
OFP:displaySystemMessage("true");
killMenu(nil,unitName);
else
OFP:displaySystemMessage("false");
end
end
function isActivate(self,hwnd)
require "luacom";
local ws = luacom.CreateObject("WScript.Shell");
local boo=ws:AppActivate(hwnd);
ws=nil;
return boo;
end
function killMenu(self,target)
require "luacom";
local ws = luacom.CreateObject("WScript.Shell");
local button = ws:popup("are you sure ?",10,"Kill Yourself",33);
if button==1 then
OFP:damage(target,"headzone",10);
elseif button==2 then
return false;
end
ws=nil;
end
And run it in window mode.
If I know how to get focus of game window, then it can be used conveniently.
But I don't know......
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: I have some questions to ask...
onto the roof
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: I have some questions to ask...
How to know who are pressing hotkeys in coop-mission?
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: I have some questions to ask...
runerback wrote:How to know who are pressing hotkeys in coop-mission?
Since all of the code only executes on the host machine, it is only possible for the host to use hotkeys.
Cheers
![Very Happy](https://2img.net/i/fa/i/smiles/icon_biggrin.png)
Re: I have some questions to ask...
tvig0r0us wrote:runerback wrote:How to know who are pressing hotkeys in coop-mission?
Since all of the code only executes on the host machine, it is only possible for the host to use hotkeys.
Cheers
It's a good news for me, but not for my friend who asked me this question..
Here are my question:
When using selectCamera(), also in coop-mission, is there any case only me can see the camera scene but else playable players?
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: I have some questions to ask...
Any checkpoint will make a error which stop the game... I don't know why
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: I have some questions to ask...
tvig0r0us, I'm a real loser, because I don't know how to use your camera model... Would you like to show me some example? Thanks.
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: I have some questions to ask...
While there should be an example mission for the moving cam in the EDX kit from mdog, I have some sample missions for moving cinematic cams that I can post. I'll have to wait until I'm at my pc though.
Cheers![Very Happy](https://2img.net/i/fa/i/smiles/icon_biggrin.png)
Cheers
![Very Happy](https://2img.net/i/fa/i/smiles/icon_biggrin.png)
Page 2 of 3 • 1, 2, 3
Operation Flashpoint Dragon Rising OFDR Forums :: OPERATION FLASHPOINT: DRAGON RISING :: OFDR EDITING :: EDITING Q+A
Page 2 of 3
Permissions in this forum:
You cannot reply to topics in this forum
|
|