Jump to content

User Input...?


Recommended Posts

So I am just going to come out and say it, I am looking to make a game. Who isnt?

Before you start spamming me with flames, hear me out.

I have decided to make an RPG game. What I am, or was, going to make is... How shall I explain this... Well Basically a text rpg game. I would have a box come up with text in it and you would make a decision based on the text.

Now for the question:

Is it possible to make it so the player can control a bitmap image or jpeg or something? Before I get to far into the making of the game I wanted to know if it was possible to "trick" the script making it into a game. So basically what I want it to do is let the user move a picture around with the arrow keys. If it isnt possible then I will just go with my old idea. If it is really complex dont waste your time, just say its really complex. But then agian, who decides what is really complex?

Link to comment
Share on other sites

HI,

yes it is possible. You can move the pic or your can cut off the pic by pieces.

It is not that hard.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Hi,

no problem. If you get in trouble just post your script, describe what happens and what should happen as short and clear as possible and there'll be a solution. :D

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

#include <GUIConstants.au3>

HotKeySet("{Down}", DownArrow)
Func DownArrow($icon)
    $icon = GUICtrlCreateIcon("C:\Program Files\AutoIt3\Examples\GUI\Icon.gif", "icon", 5, -1)
EndFunc

GUICreate("Test", 190, 100)
GUISetState (@SW_SHOW)
$icon = GUICtrlCreateIcon("C:\Program Files\AutoIt3\Examples\GUI\Icon.gif", "icon", -1, -1)

While 1
    $msg = GUIGetMsg()
        Select
            $msg = $icon
    EndSelect
WEnd

Thats my attempt at making the pic move. It doesnt work so dont bother trying it. That was the first time ive used functions so I wasnt quite sure what to do. I included the While loop so that the script wouldnt just exit out. I cant seem to figure out how to make the pic move.

BTW everyone should have "icon.gif" if you installed autoit to the default directory.

Edited by danishmo
Link to comment
Share on other sites

I Think it's possible,

just a thought

#include <GUIConstants.au3>


 
MsgBox(0,"", "Blast Off!")



;example1 ---------------------------
GUICreate(" My GUI Icons")
Dim $1=1, $2=1

For $1 = 400 to 1 Step -10
$n1=GUICtrlCreateIcon (@windowsdir & "\cursors\horse.ani",-1, $1,$2,32,32)
;$n1=GUICtrlCreateIcon (@windowsdir & "\cursors\horse.ani",-1, 20,120,32,32)
next
GUISetState ()

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

i like txt games

Link to comment
Share on other sites

hey try to work on this:

#include <GUIConstants.au3>


 
MsgBox(0,"", "Blast Off!")



;example1 ---------------------------
GUICreate(" My GUI Icons")
Dim $1=1, $2=1

HotKeySet("{down}", "horsedown")
;For $1 = 400 to 1 Step -10

;$n1=GUICtrlCreateIcon (@windowsdir & "\cursors\horse.ani",-1, 20,120,32,32)
;next
GUISetState ()

; Run the GUI until the dialog is closed
While 1
    $n1=GUICtrlCreateIcon (@windowsdir & "\cursors\horse.ani",-1, $1,$2,32,32)
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Wend

    Func horsedown()
    ; ... can do stuff here
    HotKeySet("{Down}")
    $2= +50
    msgbox(48,"value", $2)
    HotKeySet("{Down}", "horsedown")
EndFunc

PRESS DOWN

Link to comment
Share on other sites

Hmm... Interesting... Well thanks for the help! Now I know its possible! But for now im going to make it Text based, maybe the sequel will have graphics.

Your welcome,

here some more

#include <GUIConstants.au3>


 
MsgBox(0,"", "Blast Off!")



;example1 ---------------------------
GUICreate(" My GUI Icons")
Dim $1=1, $2=1

HotKeySet("{down}", "horsedown")
HotKeySet("{right}", "horseright")
HotKeySet("{up}", "horseup")
HotKeySet("{left}", "horseleft")
;For $1 = 400 to 1 Step -10

;$n1=GUICtrlCreateIcon (@windowsdir & "\cursors\horse.ani",-1, 20,120,32,32)
;next
GUISetState ()

; Run the GUI until the dialog is closed
While 1
    $n1=GUICtrlCreateIcon (@windowsdir & "\cursors\horse.ani",-1, $1,$2,32,32)
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Wend

    Func horsedown()
    ; ... can do stuff here
    HotKeySet("{Down}")
    $2= $2+50
    ;msgbox(48,"value", $2)
    HotKeySet("{Down}", "horsedown")
EndFunc


Func horseright()
    ; ... can do stuff here
    HotKeySet("{down}")
    $1= $1+50
    ;msgbox(48,"value", $2)
    HotKeySet("{down}", "horsedown")
EndFunc

Func horseup()
    ; ... can do stuff here
    HotKeySet("{down}")
    $2= $2-50
    ;msgbox(48,"value", $2)
    HotKeySet("{down}", "horsedown")
EndFunc

Func horseleft()
    ; ... can do stuff here
    HotKeySet("{down}")
    $1= $1-50
    ;msgbox(48,"value", $2)
    HotKeySet("{down}", "horsedown")
EndFunc

you only need to find a way to reset the GUI, goodluck on your game. Let me know when it's finished!

Link to comment
Share on other sites

Oke that's it, The horse now and then disappears but hey it's not going to be my game is it

#include <GUIConstants.au3>


 
MsgBox(0,"", "Blast Off!")



;example1 ---------------------------
GUICreate(" My GUI Icons")
Dim $1=1, $2=1

HotKeySet("{down}", "horsedown")
HotKeySet("{right}", "horseright")
HotKeySet("{up}", "horseup")
HotKeySet("{left}", "horseleft")
;For $1 = 400 to 1 Step -10

;$n1=GUICtrlCreateIcon (@windowsdir & "\cursors\horse.ani",-1, 20,120,32,32)
;next
GUISetState ()

; Run the GUI until the dialog is closed
While 1
    $n1=GUICtrlCreateIcon (@windowsdir & "\cursors\horse.ani",-1, $1,$2,32,32)
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Wend

    Func horsedown()
    ; ... can do stuff here
    ;HotKeySet("{Down}")
    $2= $2+50
    GUIDelete()
    GUICreate(" My GUI Icons")
    GUISetState ()
    ;msgbox(48,"value", $2)
    ;HotKeySet("{Down}", "horsedown")
EndFunc


Func horseright()
    ; ... can do stuff here
    ;HotKeySet("{down}")
    $1= $1+50
    GUIDelete()
    GUICreate(" My GUI Icons")
    GUISetState ()
    ;msgbox(48,"value", $2)
    ;HotKeySet("{down}", "horsedown")
EndFunc

Func horseup()
    ; ... can do stuff here
    ;HotKeySet("{down}")
    $2= $2-50
    GUIDelete()
    GUICreate(" My GUI Icons")
    GUISetState ()
    ;msgbox(48,"value", $2)
    ;HotKeySet("{down}", "horsedown")
EndFunc

Func horseleft()
    ; ... can do stuff here
    ;HotKeySet("{down}")
    $1= $1-50
    GUIDelete()
    GUICreate(" My GUI Icons")
    GUISetState ()
    ;msgbox(48,"value", $2)
    ;HotKeySet("{down}", "horsedown")
EndFunc

good luck

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...