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.

DarkBASIC Discussion / Why is this happening? Displaying text when it is not supposed to!

Author
Message
Major Payn
21
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 17th Jan 2005 11:45
I have a set of variables set up to govern the different planets in my space game, each planet has two variables at the moment, it's atmosphere, and it's structural stability. I want to display these variables, whenever the player puts the mouseobject near the planet in question, for example, the player moves the mouse over the planet earth, well earth's variables should be displayed, this is why I came up with the following code...



as you can see, I have two planets in that code snippet that I am trying to display text for, yet the lines of text for the planet mars, appear when the mouseobject(8000) is colliding with earth! To make matters work, the text doesn't even show up when moving the mouse object onto mars, so to sum it up, both the text for earth, and mars are appearing when the mouse is near earth, this shouldn't happen, only earths variables should appear when the mouse object is colliding with earth, and only mars's variables should show when the mouse object is colliding with mars!

Guns arn't the problem, people are the problem, shoot all the people and guns arn't a problem anymore.
Major Payn
21
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 19th Jan 2005 10:49
Obviously no one likes me

Guns arn't the problem, people are the problem, shoot all the people and guns arn't a problem anymore.
MDTalley
20
Years of Service
User Offline
Joined: 13th Jan 2005
Location: Mobile, AL
Posted: 19th Jan 2005 11:56
Shouldn't you get the mouse x and y position and if it's over your planet, then display the message? I don't think you can detect a "collision" between your object and the cursor.
Major Payn
21
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 20th Jan 2005 06:03
It is not between the object and the cursor, it is between the object and the mouse object. You see, I have a cube that is positioned at the mouses position, so I could make selection and other stuff easier.

Guns arn't the problem, people are the problem, shoot all the people and guns arn't a problem anymore.

Login to post a reply

Server time is: 2025-05-24 03:16:02
Your offset time is: 2025-05-24 03:16:02