ANNOYED_GRUNT'S PROFILE
Search
Filter
[RM2K3] [DynRPG] Simulate Keypress
It'd be kind of hard to misunderstand GM for AGS, since I've been using Game Maker for the last five years!
Using AGS would not be less work as it's something I've never used while I'm pretty knowledgeable in Game Maker.
As for the time-frame, the deadline is July 11th.
EDIT: Anyway I just bundled the missing DLL with the game and it works now.
Using AGS would not be less work as it's something I've never used while I'm pretty knowledgeable in Game Maker.
As for the time-frame, the deadline is July 11th.
EDIT: Anyway I just bundled the missing DLL with the game and it works now.
[RM2K3] [DynRPG] Simulate Keypress
author=bulmabriefs144
While we're on the topic of the key and mouse, is there a way to tweak it, possibly through the ini or c++ code, so that instead of selecting a point (which seems to happen, it selects the entire tile? I want to activate an event when mouse X is one thing, and Y is another, not X is between two and Y is between two. As in, there's a treasure chest on the roof of a building, you click on it and a character opens it with telekinesis.
Normally when I click, my mouse seems off center, and I need a range to even hit the event, event when clicking like crazy.
I can alter it myself, if I knew what to alter and how.
If you are using Cherry's plug-in, take your Mouse X and Mouse Y variables and assign them to two other variables. Divide those by 16. Use Store Event ID with those coordinates. On mouse click, check if the stored event id is not zero, and if it is not, execute a Call Event to execute it.
[RM2K3] [DynRPG] Simulate Keypress
Well Game Maker is designed for any kind of game :P. The point is that I'm making the game for a contest where only RpgMaker 2000\2003\VX\Ace are allowed, no other software.
EDIT: It doesn't matter what the plugin contains ( I also tried copy-pasting examples form Cherry's website) it will always say that I lack a DLL and that the plug-in is invalid if I run it from somewhere that is not codeblocks.
EDIT: It doesn't matter what the plugin contains ( I also tried copy-pasting examples form Cherry's website) it will always say that I lack a DLL and that the plug-in is invalid if I run it from somewhere that is not codeblocks.
[RM2K3] [DynRPG] Simulate Keypress
I need to make the game in Rm2003. If I didn't have this restriction I'd use Game Maker.
Why doesn't the code I wrote work?
EDIT: Bugmenot's solution works too, but I'd still like to know why my snippet of code does not work.
EDIT: Weirdly enough, if I run the game from the Codeblocks IDE, it works flawlessly, but if I try starting the game from RpgMaker2003 or directly from the RPG_RT it tells me that "libgcc_s_dw2-1.dll" is missing and that the plug-in is invalid.
I just compiled Bugmenot's code.
Why doesn't the code I wrote work?
EDIT: Bugmenot's solution works too, but I'd still like to know why my snippet of code does not work.
EDIT: Weirdly enough, if I run the game from the Codeblocks IDE, it works flawlessly, but if I try starting the game from RpgMaker2003 or directly from the RPG_RT it tells me that "libgcc_s_dw2-1.dll" is missing and that the plug-in is invalid.
I just compiled Bugmenot's code.
#define AUTO_DLLMAIN
#include <DynRPG/DynRPG.h>
void onInitFinished() {
( *reinterpret_cast<int ***> (0x4CDAEC) )[0][40] = 1;
}
[RM2K3] [DynRPG] Simulate Keypress
Hello!
I'm trying to make something akin to a point-and-click in 2003. I'm using Cherry's keyboard and mouse plugin, but I'd want to let my mouse be able to skip dialog when needed (so that the game is 100% mouse operated). In order to do this, I started using the SDK myself (I have absolutely zero knowledge of C++ in particular but oh well).
After a couple hours I came up with this:
In this case I'm simulating vk_escape since it gives me a direct feedback of what I'm doing is working or not (menu opens if I'm doing it right, theoretically).
My problem: if I remove the second keybd_event the menu opens, but x\escape remain "stuck" until I press escape.
If I keep the second keybd (thus simulating a key tap) the menu doesn't open at all.
As for the game, it's just a test map with an event with a single comment @SimulateZ.
I'm trying to make something akin to a point-and-click in 2003. I'm using Cherry's keyboard and mouse plugin, but I'd want to let my mouse be able to skip dialog when needed (so that the game is 100% mouse operated). In order to do this, I started using the SDK myself (I have absolutely zero knowledge of C++ in particular but oh well).
After a couple hours I came up with this:
#define AUTO_DLLMAIN
#include <DynRPG/DynRPG.h>
bool onComment(const char *text, const RPG::ParsedCommentData *parsedData,
RPG::EventScriptLine *nextScriptLine, RPG::EventScriptData *scriptData,
int eventId, int pageId, int lineId, int *nextLineId)
{
if(strcmp(parsedData->command, "simulatez") == 0)
{
keybd_event(VK_ESCAPE,0,0,0);
keybd_event(VK_ESCAPE,0,KEYEVENTF_KEYUP,0);
return false;
}
return true;
}
In this case I'm simulating vk_escape since it gives me a direct feedback of what I'm doing is working or not (menu opens if I'm doing it right, theoretically).
My problem: if I remove the second keybd_event the menu opens, but x\escape remain "stuck" until I press escape.
If I keep the second keybd (thus simulating a key tap) the menu doesn't open at all.
As for the game, it's just a test map with an event with a single comment @SimulateZ.
Pages:
1














