@n00bstar, that looks awesome, looks a lot cleaner than what I was doing, would never have thought of it, but like I said, I literally just started last week, so not sure how exactly to implement it. Any possibility to pick your brain a bit more. For instance, inside your loop. what dictates the page/scene your on? I can see how to set up the characters in the select portion but I'm not seeing how to connect them. For further explanation, I'm trying to launch into a Ship scene where i can then select a crew member to go to their crew manager, save, then go back to the ship to select a different crew member. Not so much a game really but more of a utility for a table top game. So far I've been able to get the scenes to switch properly, get the status pips to turn on and off and the return to ship button works but... when I try to set a character image, it sets perfectly but breaks all the button functions. Would that be the issue with the GoSubs you were talking about?
code for the captain scene
cap:
#include "cap.scene"
cap_setup()
do
///////// go back ////////
if GetPointerPressed()=1
spritehit=getspritehit( GetPointerX(), GetPointerY())
if spritehit= cap_ship /// sprite for button ////
return
//////// select image /////////
elseif spritehit = cap_image /// sprite for button ///
Mainloop()
endif
endif
////////// button on/off /////////
for i =0 to Cap_pip.length /// array (not working properly as far as I can tell but changes visibility for all sprites on screen) ///
if GetPointerPressed ( ) = 1
i = getspritehit( GetPointerX(), GetPointerY())
if state = 1
SetSpriteVisible (i , 1 )
state = 0
else
SetSpriteVisible (i , 0 )
state = 1
endif
endif
next i
ship_cleanup()
cap_sync()
sync()
loop
function MainLoop()
image=SelectImage()
if image=0
else
sprite = CreateSprite( image )
SetSpritesize( sprite, 1373,1053 )
setspriteposition(sprite,32,32)
SetSpriteDepth(sprite,5000)
endif
do
Sync()
loop
endfunction
function SelectImage()
if ShowChooseImageScreen()=1
while IsChoosingImage()=1
sync()
endwhile
image = GetChosenImage()
endif
endfunction image
loop
The code is basically just taken from the hands on book and the App Game Kit commands page with some modifications to fit my need.
I promise I am learning. Ill get this sooner or later.