Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / still having problems with the platforms

Author
Message
fussy123
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location:
Posted: 19th Oct 2002 09:31
alright this is what i have so far:

two long boxes object 1 and object 2,top and bottom
and two tall boxes 3 and 4 left and right side

alright to get a platform to move say up and down between box 1 and 2 and still have the player object be able to hop on it and ride it up and down that is what im trying for
so i have set it up using conditions:

call the moving box 5 and the player object 10


if object collision(5,0)>0
colresults=object collision(5,0)
if colresults=1 then condition=1
else
if colresults=2 then condition=0
else
if colresults=6 then condition=condition
else
condition=1-condition
endif
endif
endif
endif

if condition=1 then position object 5,object position x(5),object position y(5)+2,object position z(5)
if condition=0 then position object 5,object position x(5),object position y(5)-2 ,object position z(5)
now using this routine i am able to get it to work , that is until the player object is riding on a platform and the player object hits the top ,, that is say .. object 1, well it still works for the moving platform , but the player object just goes thru the top of the object 1,, i know whis is hard to explain but i was wondering if anyone can give me some pointers here
Milamber
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location: Australia
Posted: 19th Oct 2002 15:27
I'd suggest using intersect object to find out where the box is below the player, and only allowing gravity to pull them that far, but this command doesn't seem to be working right now. Aside from that, just try moving the player down all the time, then when you detect a collision, move them back up however far you moved them that frame.

System Specs: AMD Athlon 1700+ XP, GA-7VRX motherboard, 128MB DDR RAM, GeForce2 MX400 64MB VRAM

Login to post a reply

Server time is: 2024-04-19 21:57:47
Your offset time is: 2024-04-19 21:57:47