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.

Author
Message
Nameless
20
Years of Service
User Offline
Joined: 11th Apr 2004
Location: U.S.A.
Posted: 9th Aug 2004 09:54
I have come across a problem that I can not find a solution to while programing my game. In my game you are walking around and to collect an item you have to collide with it. When you collect an item I want certan text to pop up but i don not want it to be on the screen it is currently on. So I made another loop that clears the screen and prints what i want it to (in the right taxt size ,font,and color). Next I used the IF THEN commands to detect for collision and if collision then to gosub to my other loop(where the text is stored). Once you press the spacebar it then reurns. Or should I say it SHOULD return. But as soon as it returns DBPro detects object collision (again) between the same two object that never moved it once again takes me back to the loop that i wanted to return from. If anyone has any solutions to my problem please post. Thanks .
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 9th Aug 2004 10:51
The most obvious reasons I can think of is that the object is actually still in a state of collision - and therefore you need to include a 'move player back a bit' command in your if-then loop before it goes to the text screen.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 9th Aug 2004 10:51 Edited at: 9th Aug 2004 10:52
Just make a flag saying that you have already collided with the object like

Then it will reset itself when you are not colliding with it anymore. Just remove the else portion if you do not want it to reset itself. Hope this is what you are trying to say.

Login to post a reply

Server time is: 2024-11-27 04:41:17
Your offset time is: 2024-11-27 04:41:17