User Tag List

Results 1 to 4 of 4

Thread: When user presses a key store in INI

  1. #1
    No Products Registered

    Join Date
    Oct 2006
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    When user presses a key store in INI

    I'm trying to find a way to store key mappings in an INI file so that they can be easily changed in the program. I need probably around 20-30 different keys to be available (otherwise I'd use the joystick which I seem to be able to assign).

    I can't quite find a way to do it though - the only keyboard input option I've found is 'when user presses [assigned key] THEN', but you have to assign the key when you make the condition - theres no way to set the key press using 'retrieve data from an object'. So far I've had a to map each key to a counter which records the last key pressed, and then check that value using 'when user presses any key' and convert it back. A long way round really.

    I'm probably missing something obvious - this is after all something needed for a lot of games isn't it- the option for the player to map keys to taste.


    so to clarify, I need
    1) When user presses key = [value from INI] THEN...


    and also the ability to record these in game so I need it in reverse too-


    1)User clicks on [Assign Key] THEN switch on flag 1
    2)Flag 1 is on
    + User presses any key THEN Set INI value to [key pressed]


    Hope that rambling makes some kind of sense! Thanks for all your help.

  2. #2
    No Products Registered

    Join Date
    Aug 2006
    Location
    Westcountry, UK
    Posts
    862
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: When user presses a key store in INI

    this "was" possible with the Virtual Key Object but until this is converted then you'll have to use conditions for every key pressed

    e.g. (global string A = virtual key pressed )
    [color:blue]
    If "A" pressed
    + INI Item "A" <> ""

    Set Global String to INI Item "A"[/color]

    Your INI file would have something like

    [keys]
    spacebar=jump
    ctrl=action
    left=walkleft
    right=walkright

  3. #3
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: When user presses a key store in INI

    The only alternative I can think of is by using the WinMessPro Object, but that isn't amazingly developer-friendly.
    .:::.Joshtek.:::.

  4. #4
    No Products Registered

    Join Date
    Oct 2006
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: When user presses a key store in INI

    Thanks guys, I'll wait for the moment


Similar Threads

  1. Detect key presses out of focus?
    By ChrisBurrows in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 14th April 2012, 05:29 AM
  2. Issues with multiple key presses
    By Atherton in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 12th June 2010, 10:49 PM
  3. preventing key presses
    By willow in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 9th March 2010, 09:57 AM
  4. Presses same button twice for two action
    By Ran_TH in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 10th August 2009, 12:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •