Assigning Keyboard Module's function (or AscII) to a Joypad (AGS Controller)

Started by Olleh19, Thu 29/10/2020 17:20:07

Previous topic - Next topic

Olleh19

I have been hiting my head against the wall for a couple of hours now.
I have just finally got the AGS controller working.
I cannot get it to assign the movement buttons or the action button (Z) from my keyboard. I'm using the Keyboard Module 102.
I've only managed to do it by triggering the direct animations onto the pad itself, which is a totally dumb way of doing it, and limiting ofc. :-[
I'm thinking perhaps i need to import the scripts into the global script and then do something..I just don't know what syntax i'm looking for, at all.
The manual unfortunaly does not have a section on the basic usages of the AGS controller  :~(

Edit: I'm using isKeyPressed not On_Key_Press, maybe that's the issue?!
I mean looking at the scripts it does look like the ASCII or the eLeftArrow has been replaced with the modules own nicknames. ???
Still that don't explain why i get no action with simulate eKeyZ.  (roll). Just like always i'm misinterpreting AGS features. Hence the user description AGS n00b.

Code: ags


GlobalScript.asc

if (gamepad.GetAxis(0) < -20) 



Game.SimulateKeyPress(KeyboardMovement_KeyLeft);  //or eKeyLeftArrow, or (for action button attempts) eKeyZ or 90...Out of ideas. 











Dualnames

Can you post the definition of this KeyboardMovement_KeyLeft ? From the module's script or header, not sure where it is defined.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Crimson Wizard

Also please always tell where exactly (what script module / function) do you have this code you posted.



EDIT: Ah. By the way, I made an experiment with the KeyboardMovement module that comes with Sierra-template, and found one scenario that could be a problem.

There are two key modes with it: Key Tapping mode and Key Pressed mode. Key Tapping mode means that pressing same key second time will make character stop moving. Because gamepad may send axis signals repeatedly, this may be received as multiple key presses in a row, and character will begin walking and stop walking immediately.

Olleh19

QuoteCan you post the definition of this KeyboardMovement_KeyLeft ? From the module's script or header, not sure where it is defined.

That was just an example, that didn't work. It's not defined anywhere else then in the keyboard module 102's script. Since i've imported that script. That's all i've done.

I don't know if this is what you look for when you say defined, but here is how i've "defined" the Z button. Is it wrong?
I've also tried to add this code into the global script/header, but no success. I'm doing something wrong, clearly.

As for definition for the leftarrow otherwise all i can say is that yeah it's the keyboard modules script working. I'm not assigning anything different to them.

All i do is "check for loops" if player is turned there, that happens, etc.

That code is coming from a custom script called Actions, that i'm working on.  i have NOTHING in Actions.Ash tho.



Actions.asc


Code: ags


//Actions.asc 

   if (IsKeyPressed(eKeyZ))                  //PUNCH BUTTON HERE COMES THE MESS; Här börjar RÖRAN :DDDDDDDDD! 
  
   
{
    
    
    
    
    

    if (cAxl.Loop==2 || cAxl.Loop==3 || cAxl.Loop==4 || cAxl.Loop==5) //RIGHT PUNCH HIT, All loops are RIGHT/positioned player v_Axl_WalkAction 

{
    


      cAxl.Animate (10, 0, eOnce, eNoBlock); 

      cAxl.SetIdleView(5, 0);                                                       

      cAxl.Baseline=0;
}
  

     else if (cAxl.IdleView==5)   //RIGHT-PUNCH - Empty in the Air Punch, No Target Hit.
{
   


     cAxl.UnlockView();
     cAxl.Animate (10, 0, eOnce, eNoBlock); 
     cAxl.SetIdleView(5, 0);                                                             

     cAxl.Baseline=0;
}
 
     else if (cAxl.IdleView==4)   //LEFT-PUNCH - Empty in the Air Punch, No Target Hit.
{
    


    cAxl.UnlockView();
    cAxl.Animate (11, 0, eOnce, eNoBlock); 
    cAxl.SetIdleView(4, 0);                                                             

    cAxl.Baseline=0;
}

Olleh19

Edit: Crimson, i'm using Pressing mode btw!

Is this perhaps what you mean?


Code: ags
// Main script for module 'KeyboardMovement'

//****************************************************************************************************
// DEFINITIONS
//****************************************************************************************************

#define DISTANCE 10000// distance player walks in Tapping mode before he stops

enum KeyboardMovement_Directions {
	eKeyboardMovement_Stop, 
	eKeyboardMovement_DownLeft, 
	eKeyboardMovement_Down, 
	eKeyboardMovement_DownRight, 
	eKeyboardMovement_Left, 
	eKeyboardMovement_Right, 
	eKeyboardMovement_UpLeft, 
	eKeyboardMovement_Up, 
	eKeyboardMovement_UpRight 
  //eKeyboardMovement_Punch, 
};

//****************************************************************************************************
// VARIABLES
//****************************************************************************************************

// keycodes as variables for future key customization functions (static variables?):
int KeyboardMovement_KeyDown = 380; // down arrow
int KeyboardMovement_KeyLeft = 375; // left arrow
int KeyboardMovement_KeyRight = 377; // right arrow
int KeyboardMovement_KeyUp = 372; // up arrow
int KeyboardMovement_KeyDownRight = 381; // PgDn (numpad)
int KeyboardMovement_KeyUpRight = 373; // PgUp (numpad)
int KeyboardMovement_KeyDownLeft = 379; // End (numpad)
int KeyboardMovement_KeyUpLeft = 371; // Home (numpad)
int KeyboardMovement_KeyStop = 376; // 5 (numpad)


KeyboardMovement_Modes KeyboardMovement_Mode = eKeyboardMovement_None; // stores current keyboard control mode (disabled by default)

KeyboardMovement_Directions KeyboardMovement_CurrentDirection = eKeyboardMovement_Stop; // stores current walking direction of player character

//****************************************************************************************************
// USER FUNCTIONS
//****************************************************************************************************

//====================================================================================================

static function KeyboardMovement::SetMode(KeyboardMovement_Modes mode) {
	KeyboardMovement_Mode = mode;
}

//====================================================================================================

// key customization functions here

//====================================================================================================

//****************************************************************************************************
// EVENT HANDLER FUNCTIONS
//****************************************************************************************************

Controller*gamepad;
//====================================================================================================
    int _dx, _dy;
    int left_frames, right_frames, up_frames, down_frames;
     
    function repeatedly_execute() {
     
            //--------------------------------------------------
            // Pressing mode
            //--------------------------------------------------
     
            if ((IsGamePaused() == true) || (KeyboardMovement_Mode != eKeyboardMovement_Pressing) || (IsInterfaceEnabled() == false) || (player.on == false)) return 0;
              // if game is paused, module or mode disabled, interface disabled or player character hidden, quit function
        
      bool left, up, right, down;
        
      if (IsKeyPressed(KeyboardMovement_KeyUpLeft)) { up = true; left = true; }
      if (IsKeyPressed(KeyboardMovement_KeyUp)) up = true;    
      if (IsKeyPressed(KeyboardMovement_KeyUpRight)) { up = true; right = true; }
      if (IsKeyPressed(KeyboardMovement_KeyRight)) right = true;    
      if (IsKeyPressed(KeyboardMovement_KeyDownRight)) { down = true; right = true; }
      if (IsKeyPressed(KeyboardMovement_KeyDown)) down = true;    
      if (IsKeyPressed(KeyboardMovement_KeyDownLeft)) { down = true; left = true; }
      if (IsKeyPressed(KeyboardMovement_KeyLeft)) left = true;
      
      if (IsKeyPressed(KeyboardMovement_KeyStop)) { up = false; left = false; down = false; right = false; }
      
      if (left) left_frames++; else left_frames = 0;
      if (right) right_frames++; else right_frames = 0;
      if (left && right) {
        left = left_frames < right_frames;
        right = !left;
      }
      if (up) up_frames++; else up_frames = 0;
      if (down) down_frames++; else down_frames = 0;
      if (up && down) {
        up = up_frames < down_frames;
        down = !up;
      }
      
      int dx = right * DISTANCE - left * DISTANCE;
      int dy = down * DISTANCE - up * DISTANCE;
      
      if (dx != _dx || dy != _dy) player.WalkStraight(player.x + dx, player.y + dy, eNoBlock); // walk player character to the new coordinates
      
      _dx = dx; _dy = dy;
    }
//====================================================================================================

function on_key_press(int keycode) {

	//--------------------------------------------------
	// Tapping mode
	//--------------------------------------------------

	if ((IsGamePaused() == true) || (KeyboardMovement_Mode != eKeyboardMovement_Tapping) || (IsInterfaceEnabled() == false) || (player.on == false)) return 0;
	  // if game is paused, module or mode disabled, interface disabled or player character hidden, quit function

	KeyboardMovement_Directions newdirection; // declare variable storing new direction

	// get new direction:
	if (keycode == KeyboardMovement_KeyDownRight) newdirection = eKeyboardMovement_DownRight; // if down-right key pressed, set new direction to Down-Right
	else if (keycode == KeyboardMovement_KeyUpRight) newdirection = eKeyboardMovement_UpRight;
	else if (keycode == KeyboardMovement_KeyDownLeft) newdirection = eKeyboardMovement_DownLeft;
	else if (keycode == KeyboardMovement_KeyUpLeft) newdirection = eKeyboardMovement_UpLeft;
	else if (keycode == KeyboardMovement_KeyDown) newdirection = eKeyboardMovement_Down;
	else if (keycode == KeyboardMovement_KeyLeft) newdirection = eKeyboardMovement_Left;
	else if (keycode == KeyboardMovement_KeyRight) newdirection = eKeyboardMovement_Right;
	else if (keycode == KeyboardMovement_KeyUp) newdirection = eKeyboardMovement_Up;
	else if (keycode == KeyboardMovement_KeyStop) newdirection = eKeyboardMovement_Stop; // if stop key pressed, set to stop player character

	if (newdirection != KeyboardMovement_CurrentDirection) { // if new direction is different from current direction

		if (newdirection == eKeyboardMovement_Stop) player.StopMoving(); // if new direction is the Stop command, stop movement of player character
		else { // if new direction is NOT the Stop command

			int dx, dy; // declare variables storing new walk coordinates
			if (newdirection == eKeyboardMovement_DownRight) {
				dx = DISTANCE;
				dy = DISTANCE;
			}
			else if (newdirection == eKeyboardMovement_UpRight) {
				dx = DISTANCE;
				dy = -DISTANCE;
			}
			else if (newdirection == eKeyboardMovement_DownLeft) {
				dx = -DISTANCE;
				dy = DISTANCE;
			}
			else if (newdirection == eKeyboardMovement_UpLeft) {
				dx = -DISTANCE;
				dy = -DISTANCE;
			}
			else if (newdirection == eKeyboardMovement_Down) {
				dx = 0;
				dy = DISTANCE;
			}
			else if (newdirection == eKeyboardMovement_Left) {
				dx = -DISTANCE;
				dy = 0;
			}
			else if (newdirection == eKeyboardMovement_Right) {
				dx = DISTANCE;
				dy = 0;
			}
			else if (newdirection == eKeyboardMovement_Up) {
				dx = 0;
				dy = -DISTANCE;
			}

			player.WalkStraight(player.x + dx, player.y + dy, eNoBlock); // walk player character to the new coordinates
		}
		KeyboardMovement_CurrentDirection = newdirection; // update current direction to new direction

	}
	else { // if new direction is same as current direction
		player.StopMoving(); // stop player character
		KeyboardMovement_CurrentDirection = eKeyboardMovement_Stop; // update current direction
	}

}

//====================================================================================================

function on_event(EventType event, int data) {

	if (event == eEventLeaveRoom) KeyboardMovement_CurrentDirection = eKeyboardMovement_Stop;

}

//====================================================================================================

Crimson Wizard

Please tell what template do you use for your game. For instance, Sierra template comes with its own KeyboardMovement module, so first thing is to double check that it don't conflict with the one you imported.

Olleh19

Quote from: Crimson Wizard on Thu 29/10/2020 18:01:19
Please tell what template do you use for your game. For instance, Sierra template comes with its own KeyboardMovement module, so first thing is to double check that it don't conflict with the one you imported.

Omg, i don't even know!  :-[ I deleted most of the scripts. Is there anyway i can see anywhere what it is?
I do believe this actually is the sierra  template tho, but most of the times i've used the Thumbleweed template.


Scripts i'm using. PPcollision & Keyboard Movement 102. From my eyes nothing is conflicting..I've already tried different keyboard scripts together before, and it was no issue.
So i lean towards what you've said in the previous post..


Code: ags



Globalscript.asc

Controller*gamepad;
function game_start()
{  



  gamepad = Controller.Open(0);

cAxl.SetIdleView(2, -30);
cEnemy1.SetIdleView(3, -30); 

 Mouse.ControlEnabled=false;
 Mouse.Visible=false;
 
KeyboardMovement.SetMode(eKeyboardMovement_Pressing);


  
   // set KeyboardMovement movement mode
  

}


// put anything you want to happen every game cycle in here

//JOYSTICK PLUGIN CONTROLLER BUTTONS


//11 = Start Button
//8 - Select Button
//7 - Trigger Right 1
//6 - Trigger Left 1
//5 - Trigger Right 2
//4 - Trigger Left 2

//3 - Square/Fyrkant
//2 - Cross/Kryss
//1 - Circle
//0 - Triangle/Trekant



function repeatedly_execute() 
{              



if (gamepad.GetAxis(0) < -20) 



Game.SimulateKeyPress(90);





if (gamepad.GetAxis(0) > 20)
{
 
cAxl.x++;

}

else if (gamepad.IsButtonDownOnce(3)) //RIGHT Hit

{
    


      cAxl.Animate (10, 0, eOnce, eNoBlock); 

      cAxl.SetIdleView(5, 0);                                                       

      cAxl.Baseline=0;                               
 

cAxl.Animate(10, 0, eOnce, eNoBlock);

}




 Enemy1_HealthBar(); //Checkar Enemy1's hälsa.

cEnemy1.FollowCharacter(cAxl);

if (Enemy_Type1_Death_Count==3)  //Set this to however many enemies of the TYPE1 you want to show up..


{
  cEnemy1.Clickable=true;
  cEnemy1.SetIdleView(3, 0);
  cEnemy1.LockViewFrame(3, 0, 0);
  cEnemy1.UnlockView(eKeepMoving);
  cEnemy1.SetIdleView(3, 0);
  cEnemy1.Transparency=0;
   Signal_Got_Hit=0;
  cEnemy1.ChangeRoom(2);
  gSignal_Healthbar.Visible=false;
 
Is_Enemy1_In_Storage=false;
Go_Next_Round();

}

  if (Is_Enemy1_In_Storage==true && Enemy_Type1_Death_Count==2)

{
                                                                      //Display ("DEATHCOUNT - 2 (TIME FOR LEFT SIDE ACTION");
Enemy_Type1_Respawn_LEFT();
Is_Enemy1_In_Storage=false;

}
else if (Is_Enemy1_In_Storage==false)

{

}

else if (Is_Enemy1_In_Storage==true && Enemy_Type1_Death_Count==1)

{
                                                                    //  Display ("DEATHCOUNT - 1 (TIME FOR RIGHT SIDE ACTION");
Enemy_Type1_Respawn_RIGHT();
Is_Enemy1_In_Storage=false;

}
   
  


Player_Actions();


  




}
 


function repeatedly_execute_always() 
     
{
  
}
        


// put here all enemy animations, hit's death animations, etc in here.
function late_repeatedly_execute_always() 
{
Trashcan_Beater();
Signal_Hit_Ground();


 Enemy1_HealthBar(); //Checkar Enemy1's hälsa.

cEnemy1.FollowCharacter(cAxl);

if (Enemy_Type1_Death_Count==3)  //Set this to however many enemies of the TYPE1 you want to show up..


{
  cEnemy1.Clickable=true;
  cEnemy1.SetIdleView(3, 0);
  cEnemy1.LockViewFrame(3, 0, 0);
  cEnemy1.UnlockView(eKeepMoving);
  cEnemy1.SetIdleView(3, 0);
  cEnemy1.Transparency=0;
   Signal_Got_Hit=0;
  cEnemy1.ChangeRoom(2);
  gSignal_Healthbar.Visible=false;
 
Is_Enemy1_In_Storage=false;
Go_Next_Round();

}

  if (Is_Enemy1_In_Storage==true && Enemy_Type1_Death_Count==2)

{
                                                                      //Display ("DEATHCOUNT - 2 (TIME FOR LEFT SIDE ACTION");
Enemy_Type1_Respawn_LEFT();
Is_Enemy1_In_Storage=false;

}
else if (Is_Enemy1_In_Storage==false)

{

}

else if (Is_Enemy1_In_Storage==true && Enemy_Type1_Death_Count==1)

{
                                                                    //  Display ("DEATHCOUNT - 1 (TIME FOR RIGHT SIDE ACTION");
Enemy_Type1_Respawn_RIGHT();
Is_Enemy1_In_Storage=false;

}
   
  
Signal_Hit_Ground();


}



// c

function dialog_request(int param) {
}




 
function on_key_press(eKeyCode keycode) 
{
  if (IsGamePaused()) keycode = 0; // game paused, so don't react to keypresses
  
  if (keycode == eKeyCtrlQ) QuitGame(1); // Ctrl-Q
  if (keycode == eKeyF9) RestartGame(); // F9
  if (keycode == eKeyF12) SaveScreenShot("scrnshot.pcx");  // F12
  if (keycode == eKeyCtrlS) Debug(0,0); // Ctrl-S, give all inventory
  if (keycode == eKeyCtrlV) Debug(1,0); // Ctrl-V, version
  if (keycode == eKeyCtrlA) Debug(2,0); // Ctrl-A, show walkable areas
  if (keycode == eKeyCtrlX) Debug(3,0); // Ctrl-X, teleport to room
  //if (keycode == eKeyZ) Player_Actions();


}
function gPlayer_Healthbar_OnClick(GUI *theGui, MouseButton button)
{

}

function b_Player_Health_OnClick(GUIControl *control, MouseButton button)
{

}


Crimson Wizard

Quote from: Olleh19 on Thu 29/10/2020 18:04:25
Omg, i don't even know!  :-[ I deleted most of the scripts. Is there anyway i see anywhere what it is?
I do believe this actually is the sierra  template tho, but most of the times i've used the Thumbleweed template.

Well, if you deleted most scripts, that may not be a problem anymore.

Olleh19

Quote from: Crimson Wizard on Thu 29/10/2020 18:08:03
Quote from: Olleh19 on Thu 29/10/2020 18:04:25
Omg, i don't even know!  :-[ I deleted most of the scripts. Is there anyway i see anywhere what it is?
I do believe this actually is the sierra  template tho, but most of the times i've used the Thumbleweed template.

Well, if you deleted most scripts, that may not be a problem anymore.

I'm confused. Am i totally off in the syntax, or should the things i wrote out "work" in theory? ???

morganw

102 is the old keyboard movement script, but perhaps that is still inside the Tumbleweed template.
Quote from: Crimson Wizard on Thu 29/10/2020 17:46:11Key Tapping mode means that pressing same key second time will make character stop moving. Because gamepad may send axis signals repeatedly, this may be received as multiple key presses in a row, and character will begin walking and stop walking immediately.
One of the changes in the replacement version was to fix the stuttering caused by this, although I only tested against the keyboard repeat rate.

Crimson Wizard

I made an experiment with Pressing mode, and SimulateKeyPress does not cause character to move at all. I don't yet know why, maybe SimulateKeyPress is not suitable for this for some reason, as in, IsKeyPressed does not detect this simulation (although, I wondered if it should).

I'd have to investigate how engine works more closely to find this out. But for you, I would suggest to don't use "SimulateKeyPress" in this case, but add controller checks directly inside movement module.

For example, where it sais:
Code: ags

if (IsKeyPressed(KeyboardMovement_KeyLeft)) left = true;


Replace with:
Code: ags

if (IsKeyPressed(KeyboardMovement_KeyLeft) || gamepad.GetAxis(0) < -20) left = true;

Olleh19

Quote from: morganw on Thu 29/10/2020 18:12:05
102 is the old keyboard movement script, but perhaps that is still inside the Tumbleweed template.
Quote from: Crimson Wizard on Thu 29/10/2020 17:46:11Key Tapping mode means that pressing same key second time will make character stop moving. Because gamepad may send axis signals repeatedly, this may be received as multiple key presses in a row, and character will begin walking and stop walking immediately.
One of the changes in the replacement version was to fix the stuttering caused by this, although I only tested against the keyboard repeat rate.

IF, i've used the thumblweed template. Those scripts are DELETED inside this project. If that makes things worse, or better. I dont know!

Olleh19

Thanks for the code Crimson. However i get a nullpoint referenced with it. I don't know what i'm doing wrong.
I replaced it  like you've said.

Edit: What should be called in the rep exec then?
Probably why i get null point...

Edit again: Wait, so what you are saying is I HAVE TO replace ALL isKeyPressed with On_key_pressed is that what you are saying??

I actually should have done this a couple of days ago, i've just been lazy. I "scripted it wrong" to start with, until i realised the "best way" is to use On_Key_press for the type of game i'm doing right now.

Crimson Wizard

Quote from: Olleh19 on Thu 29/10/2020 18:21:48
Edit again: Wait, so what you are saying is I HAVE TO replace ALL isKeyPressed with On_key_pressed is that what you are saying??

What... this is absolutely not what I was saying. Also, you can't just replace IsKeyPressed with on_key_pressed, they are things so different that are not replaceable...

I was suggesting to ADD "gamepad.GetAxis" condition to each "IsKeyPressed(KeyboardMovement_xxx)" condition inside the keyboard movement module.

But, first of all, I dont know what "gamepad" is, but hoped you know since you are using it elsewhere. Can you explain then, what is this "gamepad" variable, and how do you declare or get it?

EDIT: oh, nevermind, I found it in your script, you define this in GlobalScript.asc.
Ok, I need to think how to let keyboard module use this variable...

Olleh19

Quote from: Crimson Wizard on Thu 29/10/2020 18:27:22
Quote from: Olleh19 on Thu 29/10/2020 18:21:48
Edit again: Wait, so what you are saying is I HAVE TO replace ALL isKeyPressed with On_key_pressed is that what you are saying??

What... this is absolutely not what I was saying. Also, you can't just replace IsKeyPressed with on_key_pressed, they are things so different that are not replaceable...

I was suggesting to ADD "gamepad.GetAxis" condition to each "IsKeyPressed(KeyboardMovement_xxx)" condition inside the keyboard movement module.

But, first of all, I dont know what "gamepad" is, but hoped you know since you are using it elsewhere. Can you explain then, what is this "gamepad" variable, and how do you declare or get it?

EDIT: oh, nevermind, I found it in your script, you define this in GlobalScript.asc.
Ok, I need to think how to let keyboard module use this variable...

Oh, sorry i confused you with someone else. Sorry! I was told earlier to use On_Key_press for the action button instead. My bad!
Thank you very much for trying to help out in a tough situation(!)

Crimson Wizard

Ohh, I've read the KeyboardMovement script you posted, and there is already "Controller*gamepad;" line added there. But gamepad is not initialized anywhere inside that module, this is why you are getting null pointer errors.

So, what you need to do is to find that line in the module (KeyboardMovement102.asc), and add following code right below it:
Code: ags

function game_start()
{
  gamepad = Controller.Open(0);
}


I hope that will work, but dont know if this is correct to call Controller.Open(0) two times (because you also have same thing in GlobalScript). But let's try that first, and see if it works.



Quote from: Olleh19 on Thu 29/10/2020 18:35:26
I was told earlier to use On_Key_press for the action button instead.

This is situation-dependent. IsKeyPressed is used when you have to check for keys being held continiously, while on_key_press function is used to detect occasional key presses.

Olleh19

I'm sorry. I should have "cleaned up" ofc all my "attempts" that's why you have Gamepad all over the place, and "open".
I'll try your suggestions now, i'll edit once done.


Edit: Ok, i mean what should i call now in repeatedly execute??

Code: ags

if (gamepad.GetAxis(0) < 20)
{
 
Display (""); 

}   


HAHA, ofc i get nothing, i didnt type anyrthing! (laugh)

Crimson Wizard

Quote from: Olleh19 on Thu 29/10/2020 18:41:42
Edit: Ok, i mean what should i call now in repeatedly execute??

Code: ags

if (gamepad.GetAxis(0) < 20)
{
 
Display (""); 

}   



I don't get anything happening with Display, it ended working now, it seems.


Umm, so you are testing whether controller works by placing Display? First of all, I then suggest to put some actual text there, because Display with empty string will probably not be displayed at all. Something like "Display("TEST")".

Please tell, if using controller makes this message appear?

Olleh19

Yes, it does it was a mistake, i'm laughing out loud!

But i wonder what to call in the function KeyboardMovement_KeyLeft(); etc

Edit: yes, im testing it because before when i got null points previously those showed up no matter what action was in the button. So i usually try display or player.say...Bad way to test things? :-[

Crimson Wizard

Ok, so, have you tried adding the code I suggested above, into the keyboardmovement module?

I'm not sure at which point you are currently.

SMF spam blocked by CleanTalk