Operation Flashpoint Dragon Rising OFDR Forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

I have some questions to ask...

+2
TheGeneral
Morieza
6 posters

Page 2 of 3 Previous  1, 2, 3  Next

Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by runerback Mon 21 Jul 2014, 07:13

I set shortcut keys of Notepad.exe to "Ctrl+Shift+C".
Code:
require("luacom");
ws = luacom.CreateObject("WScript.Shell");
ws:sendkeys("+^c");
Then I opened notepad.exe in game, 
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

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by runerback Mon 21 Jul 2014, 11:25

OK... A simple question: how to use loadlib?

runerback

Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by tvig0r0us Tue 22 Jul 2014, 00:55

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
tvig0r0us
tvig0r0us
Admin

Location : Nky
Points : 266
Reputation : 29
Join date : 2013-10-16

http://www.moddb.com/members/tvig0r0us

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by runerback Tue 22 Jul 2014, 02:17

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?

runerback

Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by Morieza Tue 22 Jul 2014, 06:14

Maybe something useful here:

http://www.suderman.com/OFPDR/DROPP/reference.html
Morieza
Morieza

Points : 25
Reputation : 1
Join date : 2013-10-25

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by runerback Thu 24 Jul 2014, 06:13

Morieza wrote:Maybe something useful here:

http://www.suderman.com/OFPDR/DROPP/reference.html
Thanks! But the hotkey of DROPP is invalid in my game...

runerback

Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by runerback Thu 24 Jul 2014, 06:15

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

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by tvig0r0us Thu 24 Jul 2014, 06:44

http://www.moddb.com/mods/this-is-war/downloads/ofdr-hotkey-application
tvig0r0us
tvig0r0us
Admin

Location : Nky
Points : 266
Reputation : 29
Join date : 2013-10-16

http://www.moddb.com/members/tvig0r0us

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by runerback Thu 24 Jul 2014, 07:35

Thanks!

runerback

Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by runerback Thu 24 Jul 2014, 07:35

What's the mean of TOO Dummy? How to use it?

runerback

Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by runerback Thu 24 Jul 2014, 09:02

And "Blocker Logic", it's hard to understand...

runerback

Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by runerback Sat 26 Jul 2014, 00:38

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

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by runerback Sat 26 Jul 2014, 09:15

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

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by tvig0r0us Sun 27 Jul 2014, 00:59

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
tvig0r0us
tvig0r0us
Admin

Location : Nky
Points : 266
Reputation : 29
Join date : 2013-10-16

http://www.moddb.com/members/tvig0r0us

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by runerback Sun 27 Jul 2014, 04:32

Thank you very much! Really! Very Happy

runerback

Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by runerback Sun 27 Jul 2014, 04:40

I made a "movie" for a friend, and I want to share it here.
download here
Set "TimeOfDay" to night for better effect. Smile

runerback

Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by runerback Sun 27 Jul 2014, 04:45

And I found another game perspective. 
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

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by runerback Sun 27 Jul 2014, 04:54

I put lua51.dll and luacom.dll into game root folder, then:

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

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by runerback Sun 27 Jul 2014, 15:51

onto the roof

runerback

Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by runerback Tue 12 Aug 2014, 11:51

How to know who are pressing hotkeys in coop-mission?

runerback

Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by tvig0r0us Tue 12 Aug 2014, 17:58

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
tvig0r0us
tvig0r0us
Admin

Location : Nky
Points : 266
Reputation : 29
Join date : 2013-10-16

http://www.moddb.com/members/tvig0r0us

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by runerback Wed 13 Aug 2014, 01:24

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 Very Happy

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

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by runerback Thu 14 Aug 2014, 05:49

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

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by runerback Sun 24 Aug 2014, 01:54

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

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by tvig0r0us Sun 24 Aug 2014, 16:40

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
tvig0r0us
tvig0r0us
Admin

Location : Nky
Points : 266
Reputation : 29
Join date : 2013-10-16

http://www.moddb.com/members/tvig0r0us

Back to top Go down

I have some questions to ask... - Page 2 Empty Re: I have some questions to ask...

Post by Sponsored content


Sponsored content


Back to top Go down

Page 2 of 3 Previous  1, 2, 3  Next

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum