You could still hardcode what character ActiveInventory is set for, and which character's ActiveInventory events check for, but I suppose it wouldn't update the mouse cursor if that character isn't currently player.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menuconst char *ourScriptHeader =
"#define CLIPBOARD_PLUGIN\r\n"
"#define CLIPBOARD_PLUGIN_VERSION 0.04\r\n"
"/// Methods to access the Windows clipboard (via AGS Clipboard Plugin)\r\n"
"builtin struct Clipboard {\r\n"
" /// Paste a String from the clipboard. Returns null if not available\r\n"
" import static String PasteText ();\r\n"
" /// Copy a String to the clipboard. Returns true if successful\r\n"
" import static bool CopyText (String copyString);\r\n"
"};\r\n";
const char* Clipboard_PasteText(void) {
HGLOBAL hglb;
LPTSTR lptstr;
const char* pasteString = nullptr;
if (!IsClipboardFormatAvailable(CF_TEXT))
return nullptr;
if (!OpenClipboard(engine->GetWindowHandle()))
return nullptr;
hglb = GetClipboardData(CF_TEXT);
if (hglb != nullptr)
{
lptstr = reinterpret_cast<LPTSTR>(GlobalLock(hglb));
if (lptstr != nullptr)
{
pasteString = engine->CreateScriptString(lptstr);
GlobalUnlock(hglb);
}
}
CloseClipboard();
return pasteString;
}
void AGS_EngineStartup(IAGSEngine *lpEngine) {
engine = lpEngine;
// Make sure it's got the version with the features we need
if (engine->version < 3) {
engine->AbortGame("Engine interface is too old, need newer version of AGS.");
}
engine->RegisterScriptFunction("Clipboard::PasteText", Clipboard_PasteText);
engine->RegisterScriptFunction("Clipboard::CopyText^1", Clipboard_CopyText);
}
#define CLIPBOARD_PLUGIN
#define CLIPBOARD_PLUGIN_VERSION 0.04
/// Methods to access the Windows clipboard (via AGS Clipboard Plugin)
builtin struct Clipboard {
/// Paste a String from the clipboard. Returns null if not available
import static String PasteText ();
/// Copy a String to the clipboard. Returns true if successful
import static bool CopyText (String copyString);
};
Quote from: Kara Jo Kalinowski on Tue 11/02/2025 19:18:58Yes, I did, and it worked. Your solution wouldn't work - both horizontal and vertical walk speed need to change to the same amounts depending on which direction you are facing since you don't walk in purely straight lines i.e. you will still be moving left or right sometimes even when facing down. (I was thinking the same as you at first and it doesn't work.)
function repeatedly_execute_always()
{
if (player.Moving) {
switch (player.Loop) {
case 0: //Down
case 3: //Up
player.AnimationSpeed = 1;
player.SetWalkSpeed(2, 1);
break;
case 1: //Left
case 2: //Right
player.AnimationSpeed = 4;
player.SetWalkSpeed(4, 2);
}
}
}
Quote from: Kara Jo Kalinowski on Tue 11/02/2025 06:39:17Code: ags function repeatedly_execute_always() { if (player.Moving) { switch (player.Loop) { case 0: //Down case 3: //Up player.AnimationSpeed = 1; player.SetWalkSpeed(2, 2); break; case 1: //Left case 2: //Right player.AnimationSpeed = 4; player.SetWalkSpeed(4, 4); } } }
Quote from: Danvzare on Mon 10/02/2025 17:15:48A quick and dirty solution would be to set movementLinkedToAnimation to false, therefore unlinking your walking animation from the speed the character walks at.
Quote from: FortressCaulfield on Mon 10/02/2025 20:03:28Even putting the loops aside doesn't the char.animationspeed setting affect ALL of a char's animation?
Quote from: FortressCaulfield on Mon 10/02/2025 11:38:59what I was really hoping for was being able to change the y align
Quote from: AGA on Wed 29/01/2025 19:09:23And @Privateer Puddin' and @Snarky also seem to be flexible?
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 4.082 seconds with 20 queries.