puzzled over this and worket on it all night still dose nothing
I'm useing the examples from;
http://www.thegamecreators.com/news/2012/07/pardon-me-i-just-berped/
this is the only one I can find...
PLEASE!!! someone hear has to understand the Berp better than me...
*EDIT
I'm posting the main.agc of my game to go with the Code Snippet's above... maybe I've missed something???
//
rem AGK Application
rem AGK Build 107
//
// Project# 003
// version 1.0
// Last Revised 01-16-13
#include subroutines.agc
#include functions.agc
rem Landscape App
SetVirtualResolution (640 , 480 )
rem background
backdrop = CreateSprite ( LoadImage ( "M_background1.png" ) )
rem load music and sounds
LoadMusic ( 1, "Sum 41.mp3" )
SetMusicFileVolume (1, 75 )
LoadSound (1, "groar1.wav" )
rem Set Sprite variables X&Y
X#=23.00
Y#=311.89
rem sprite variable for position_sprite subroutine
// sets sprite to be used by sprite ID
sprA=1
rem used for making sprite jump
dirJ=2 // sprite direction variable "tells direction 1-left or 2-right"
jumS#=23.00 // start X axis of jump
jumE#=23.00 // end x axis of jump
jumB#=311.89 // end y axis of jump
rem Set up the Timing parameters
myTime# = Timer()
startTime# = myTime#
rem create sprite
CreateSprite ( 1, 0 ) // create a sprite with ID that has no image
SetSpriteOffset(1, getspritewidth(1)/2 , getspriteheight(1)/2 ) // sets sprites X&Y to center
SetSpritePosition ( 1, x#, y# )
rem add individual images into an animation list for Sprite 1
AddSpriteAnimationFrame ( 1, LoadImage ( "Godzilla_rws2b.png" ) )
AddSpriteAnimationFrame ( 1, LoadImage ( "Godzilla_rws3b.png" ) )
AddSpriteAnimationFrame ( 1, LoadImage ( "Godzilla_rws4b.png" ) )
AddSpriteAnimationFrame ( 1, LoadImage ( "Godzilla_rws5b.png" ) )
AddSpriteAnimationFrame ( 1, LoadImage ( "Godzilla_rws6b.png" ) )
AddSpriteAnimationFrame ( 1, LoadImage ( "Godzilla_rws1b.png" ) )
rem play the animated sprite
SetSpriteScale (1, 2, 2) // doubles the sprite size
PlaySprite ( 1, 10, 0, 1, 6 )
rem play and loop the music
PlayMusic ( 1, 1 )
rem Main Program Loop
do
//gosub position_sprite // position_sprite subroutine and show sprites X&Y
rem get inputs
Dirx# = GetJoystickX() // gets X axis input from joystick
Diry# = GetJoystickY() // gets Y axis input from joystick
se1# = GetButtonState(1) // gets button 1 input from jotstick
rem play sound if button A was pressed
if getbuttonstate(1)=1
playsound(1,100,0)
endif
rem walking Right
if Dirx# > 0.5
dirJ=2
setspriteflip(1, 0, 0) // resets sprite flip to start if necessary
if getSpriteCurrentFrame(1) >= 6
PlaySprite ( 1, 10, 0, 1, 6 )
SetSpriteActive(1,1)
endif
x# = x# + 1.0
setspriteposition(1,x#,y#) // update sprite position
endif
rem walking Left
if Dirx# < -0.5
dirJ=1
setspriteflip(1, 1, 0) //flip the sprite to make it seem like its facing the other way
if getSpriteCurrentFrame(1) >= 6
PlaySprite ( 1, 10, 0, 1, 6 )
SetSpriteActive(1,1)
endif
x# = x# - 1.0
setspriteposition(1,x#,y#) // update sprite position
endif
rem JUMP
if Diry# > 0.5
//if dirJ > 1
jumS# = x#
jumE# = x# + 25.0
gosub sprite_jumpR
endif
//endif
Sync()
loop