The Daily Click ::. Forums ::. Klik Coding Help ::. Automatic Press A SPECIFIC KEY ?
 

Post Reply  Post Oekaki 
 

Posted By Message

kayoto



Registered
  29/08/2007
Points
  16
21st September, 2007 at 07:33:00 -

Hi guys,

I want to make someting in my game that the software will automaticly do something like PRESS "H" button or "ENTER" or "SPACEBAR" key from the keyboard.
not type it... just like A real person will click it, is it possible in MMF2 ?

can somebody post a code for this please ?

Thanks ahead !

 
www.krazykartoons.com
Because we're Krazy about Kartoons!

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
21st September, 2007 at 07:57:04 -

Coincedence has it that I made such a tool some months ago. Lemme upload it for ya.

EDIT: looks like I lost it. Anyway, I don't know if the Control X object was ported to MMF2, but it could simulate keypressed, and they'd work outside of the application.

Image Edited by the Author.

 
Old member (~2004-2007).

kayoto



Registered
  29/08/2007
Points
  16
21st September, 2007 at 08:28:21 -

It sound cool even outside the app ? that sound even cooler !
Bummer you can't find it

if it's not hard to code can you please make me an example so I can see how it works please ?

Thanks ahead !

 
www.krazykartoons.com
Because we're Krazy about Kartoons!

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
21st September, 2007 at 09:07:20 -

I just remade the application. Now uploading!

EDIT: here you go! It'll repeat the key you gave up in the edit box until you press "STOP"! MMF1.5 source included.
http://www.tengusoft.net/davince/files/key-repeater.zip

Image Edited by the Author.

 
Old member (~2004-2007).

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
21st September, 2007 at 10:47:43 -

Color me n00b, but what sort of things couuld this be used for, game-wise?

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
21st September, 2007 at 11:20:16 -

Typing stuff in at runtime?

 
.

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
21st September, 2007 at 12:43:14 -

So could you also use something like this for a cutscene too?

Ex. have the guy come out and jump over things, swing the sword around, move another direction.. I mean, you'd probably have a lot of timers and flags too, or at least I would

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

kayoto



Registered
  29/08/2007
Points
  16
22nd September, 2007 at 09:48:43 -

HI !
THANK YOU SO MUCH for code it !

I can't run the .cca file inside my MMF2.
" This application requires the following extensions: ctrlx.mfx "
hmm.. where can I grab it please

BTW - This is almost exactly what I wanted to code but I wanted it to let me choose like: "every RANDOM X seconds" so it won't repeat so fast, but still your code is awesome I can't wait to see you how you made it inside MMF.

THANKS !

Image Edited by the Author.

 
www.krazykartoons.com
Because we're Krazy about Kartoons!

kayoto



Registered
  29/08/2007
Points
  16
22nd September, 2007 at 10:09:55 -

Hi thanks for the fast reply !

Another related question.
Is there a way to code this:

choose specific Area mouse in the screen, and make the mouse AUTOMATIC click left, right or middle mouse button EVERY X seconds ? (like the "Key-Reapeater" OUT OF THE MMF app ?)

If you know an example file, PLEASE let me grab it, or if you can make one (if it's easy for you of course)

I'm really apreciate your help guys, you are so cool and best way to learn those stuff is watching how you code it in the event editor, so I can understand it and develop the code too.

Thank you so much for your kind help

 
www.krazykartoons.com
Because we're Krazy about Kartoons!

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
22nd September, 2007 at 10:19:16 -

Thanks Phizzy, I haven't been doing it that way yet but it's good to have options! I mostly have a few events on a separate frame and cloned characters (Rovert, etc.) that I can mess around with and make them do stuff using counters. The cutscenes aren't very complex at all. In fact next to text changes not a lot really goes on.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
24th September, 2007 at 13:04:27 -


Originally Posted by kayoto
Hi thanks for the fast reply !

Another related question.
Is there a way to code this:

choose specific Area mouse in the screen, and make the mouse AUTOMATIC click left, right or middle mouse button EVERY X seconds ? (like the "Key-Reapeater" OUT OF THE MMF app ?)

If you know an example file, PLEASE let me grab it, or if you can make one (if it's easy for you of course)

I'm really apreciate your help guys, you are so cool and best way to learn those stuff is watching how you code it in the event editor, so I can understand it and develop the code too.

Thank you so much for your kind help



Check out the Control X object's events. You'll notice that it will allow you to emulate key presses. One downside is that you can't move the mouse to a specific location with this object.

 
Old member (~2004-2007).
   

Post Reply



 



Advertisement

Worth A Click