thanks man... i was hoping to use functions in particular because i am making a fairly large rpg. But, the gosubs seem to be an easier way to get all the valuable info out of it i need. I have gotten a menu to appear although the button functions seem to not work in game play, and it seems like in order for the menu image to appear, you must use key press the up button twice as apposed to once.... which is a major pain... but, i'll figure it out more eventually.
If anyone can help with collision... Which is a killer being new, I HAVE read all the stuff in the massive collision resource, and sparky's crashes my program...
i'm using an .x based world, and .x based character... falling though the ground isn't that fun... lol...
here's my little move character snipit...
Function Move_Character()
set object collision on 9999
set object collision on 1
x1#=object position x (9999)
y1#=object position y (9999)
z1#=object position z (9999)
ax#=object angle x (9999)
ay#=object angle y (9999)
az#=object angle z (9999)
mx#=mousemovex()
my#=mousemovey()
if mx#<0 then yrotate object 9999,ay#-2
if mx#>0 then yrotate object 9999,ay#+2
REM "W"
If keystate(17)=1 then move object 9999,-0.3
H#=Object Collision (9999,1)
if H#>1 then move object 9999,+0.3
if H#=0
endif
REM "S"
if keystate(31)=1 then move object 9999,0.3
H#=Object Collision (9999,1)
if H#>1 then move object 9999,-0.3
if H#=0
endif
REM "A"
if keystate(32)=1 then move object left 9999,+0.2
H#=Object Collision (9999,1)
if H#>1 then move object left 9999,-0.2
if H#=0
endif
REM "D"
if keystate(30)=1 then move object right 9999,+0.2
H#=Object Collision (9999,1)
if H#>1 then move object right 9999,-0.2
if H#=0
endif
position object 9999,x1#,y1#-0.89,z1#
H#=Object Collision (9999,1)
if H#>1 then position object 9999,x1#,y1#+0.9,z1#
if H#=0
endif
endfunction
PS... I know there is probably 100 things you could rip me apart for this code.
I did try TDK's collision... and like all of them... which all worked fine when just run with thier snipits, but.... i'm using .x characters now... anyways... here goes nothing
www.soundclick.com/octoberscry ---> My Doom Metal Band