Hi there Just4Fun
Im trying to make a pool type game and at the moment I am working on the white ball.
One of the things you need the white ball to be able to do is move it into the desired position right, behind the white line b4 breaking. So in order to apply this I was trying to use the drag function. Thankfully with help from almost every one in this forum lol
, I have finally got it to work, I ended up using makslane way of doing it and it worked. I have the latest version of GE, and applying drag wont work untill I Add an action to it as well. thats where I was getting confused because I ended up selecting 'Follow Mouse' and thats what caused all the palava. any way thats sorted now.
Another thing that I have applied to the ball already is the power gauge, I got help for this and am using a scripts for applying the required velocity on the ball then hitting the ball by pressing the space bar.
At the moment, whats happening is that because I have this code on that ball for the velocity, when I click on the ball for the very first time to move it, the code kicks in and makes the ball drift away from the mouse, after I click and drag on the ball a few more times, it works fine.
This is the code I am using for the velocity, its in the draw actor script of the ball
directional_velocity = directional_velocity * 0.98;
on the arrow up key I have this:
if (textNumber < 60)
{
textNumber +=1;
}
and arrow down I have this:
if (textNumber > 0)
{
textNumber -= 1;
}
and on the space bar I have this:
directional_velocity = Display.textNumber;
if (directional_velocity < 0)
{
directional_velocity = 0;
}
I have tried all sorts of things to stop the drifting off the mouse on the first click. It is a strange bug to have. If you have any ideas on how to fix this bug, im all ears. If you want a link to what I have so far so you can see it for your self I can provide it, however I like learning this way, applying the code and making the mistakes is helping me learn allot in GE. thanks for your advise
AND A BIG THANK YOU TO EVERY ONE WHO HAS TRIED TO HELP ME, YOU LOT ARE GREAT