The Dink Network

Reply to Re: What are all the keys that can be used in scripts?

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
June 17th 2024, 02:31 AM
custom_simon.gif
SimonK
Peasant He/Him Australia
 
I have a game controller for my iPad, which I was using for Fortnite a few years back. So charged it up for a Dink Smallwood iPad test.

I tried renaming the scripts in PQ that use the keyboard - "A" for Skard attacking, "C" for Cthullos casting a sleep spell, "F" for Frog-bot mode and "H" for instant heal to buttons 6 to 10 but no response on the iPad using a Nimbus Steelseries gc-0004 controller when testing this version of the DMOD.

As far as I could figure out, even changing the options via the standard Dink Menu which is meant to let you assign the current six available options to buttons 7 thru 10, such as Map to button 8, Dink Menu to button 7, talk to button 9, and Inventory to button 10, pressing any of the buttons on the front of the console other than the left front top one, which must be button 6 for this controller as it triggered the "I don't have a map for this world" in the End World. (Buttons 1 thru 4 are "A, B, X, Y" on the top right side of the controller, button 5 is the MENU button on the top middle of the controller.

//this is run when the escape key is pressed

void main(void)
{
int &old_result;
Playsound(18, 22050, 0,0,0);
freeze(1);
help:

        choice_start();
        "Load a previously saved game"
        "Restart"
        "Quit to Windows"
        "Help"
        "Continue"
        "View/change gamepad buttons"
        choice_end();


So not sure what &buttoninfo is doing as such here, as this is where the DinkC code deals with "View/change gamepad butttons"

   if (&result == 6)
   {
   buttonstart:
        choice_start();
        "Button 1 - &buttoninfo"
        "Button 2 - &buttoninfo"
        "Button 3 - &buttoninfo"
        "Button 4 - &buttoninfo"
        "Button 5 - &buttoninfo"
        "Button 6 - &buttoninfo"
        "Button 7 - &buttoninfo"
        "Button 8 - &buttoninfo"
        "Button 9 - &buttoninfo"
        "Button 10 - &buttoninfo"
        "Nevermind"
        choice_end();

if (&result != 11)
  {
  &old_result = &result;
        choice_start();
        set_y 140
        title_start();
What should button &old_result do?
        title_end();
        "Attack"
        "Talk/look"
        "Magic"
        "Item screen"
        "Main menu"
        "View map (if you have one)"
        "Nevermind"
        choice_end();
  if (&result < 7)
   set_button(&old_result, &result);

   goto buttonstart;
  }
    
       goto help;

   }

   if (&result == 7)
   {
        choice_start();
        "&savegameinfo"
        "&savegameinfo"
        "&savegameinfo"
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "Nevermind"
        choice_end();

   save_game(&result);

   }

  unfreeze(1);
  kill_this_task();


Shame this didn't work, as the controller has three unused buttons at the front when playing Dink: front bottom left (button7 ?), front top right (button8 ?) front bottom right (button9 ?) and the right joystick maybe that's button 10?

But as I don't use the "map" in the End World of PQ and Frog-bot mode is only available in the End World, I'm going to test changing the button6.c script to be a Frog-bot mode toggle.