hi... i have been trying to make a game like the sorcery game by paul jefferies.. i was doing not too bad i guess till i got hung up trying to get the collision to work properly.. i mean by that that when the player charc makes a jump and hit and object he doesnt get hung init as my program seems to be doing ...
this is the way i have set it up so far :
userinput:
userinput:
posx#=object position x(20)
posy#=object position y(20)
posz#=object position z(20)
playergrav#=playergrav#-0.1
posy#=posy#+playergrav#
if object collision(20,0)>0
dec posx#,get object collision x()
dec posy#,get object collision y()
dec posz#,get object collision z()
playergrav#=0
endif
position object 20 ,posx#,posy#,posz#
if rightkey()=1
if sound playing(1)=1
yrotate object 20,90
if obframe>30 then obframe=0
set object frame 20, obframe
MOVE OBJECT 20,1
obframe=obframe+1
return
else
yrotate object 20,90
if obframe>30 then obframe=0
set object frame 20, obframe
MOVE OBJECT 20,1
obframe =obframe +1
play sound 1
endif
endif
if leftkey()=1
if sound playing(1)=1
yrotate object 20,270
if obframe>30 then obframe=0
set object frame 20, obframe
MOVE OBJECT 20,1
obframe=obframe+1
return
else
yrotate object 20,270
if obframe>36 then obframe=0
set object frame 20, obframe
MOVE OBJECT 20,1
play sound 1
endif
endif
if upkey()=1 and playergrav#=0
playergrav#=2
endif
return
anyway that is the basic code i am using i also have set up object collision boxes for all the platforms and ledged i used in the program using:
for block=1 to 10
sx#=object size x(block)/2
sx#=object size x(block)/2
sx#=object size x(block)/2
make object collision box block,-1*sx#,-1*sy#,-1*sz#,sx#,sy#,sz#,0
next block
the problem i have is that when the player object jumps using upkey he gets if he collides with an upper block or ledge he hangs in it .. any one have any suggestion for me here?