Page 2 of 3

PostPosted: Tue Nov 07, 2006 1:23 am
by Sgt. Sparky
bah! i am so mad at them, the cheapest is $24 but when i got it it was $14.95 man i want the new version with gpx2 or whatever update

PostPosted: Tue Nov 07, 2006 1:27 am
by Hedfone
lol, I remember when It was only 14$. wanna hear a great story? three days after I bought GE professional (the first time :P ) my desktop cleaning wizard (or some other useless gadget) suspected it as malicious and deleted it.
can you POSSIBLY imagine how happy I was??? :shock: :? :x :evil:

but, ya, as soon as I have enough I'll buy it.

PostPosted: Tue Nov 07, 2006 1:41 am
by makslane
Just download and install the trial again

PostPosted: Tue Nov 07, 2006 1:57 am
by Hedfone
oh........





I thought that you were limited to one trial per person :oops:

my bad! :mrgreen:

EDIT: gimme 3 minutes Sgt.Sparky and you'll have your code :wink:

PostPosted: Tue Nov 07, 2006 1:59 am
by makslane
Not now

PostPosted: Tue Nov 07, 2006 2:09 am
by Hedfone
ALRIGHT!
FINALLY! HERE I IS!

on key down[RIGHT] change animation direction: backward
on key down[LEFT] change animation direction: forward

on keyup[RIGHT & LEFT] change animation direction: stopped

There ya go! good luck! :D

PostPosted: Wed Nov 08, 2006 3:35 pm
by Sgt. Sparky
THANK YOU!!! that was so simple i feel stupid... but thank u so much! but also, could u get me the script for the bullet fallowing that ship like: Image where the ship rotates right and the target does the same, or where the bullet can shoot at the many different angles. like in a normal astroids game. to where instead of shooting up down left an right, it can shoot at all angles like 45o an stuff, i hope u know what i mean

PostPosted: Wed Nov 08, 2006 7:36 pm
by Sgt. Sparky
sorry to double post but: how do i use the "directional_velocity" code? to make my actow when i press up to go forwards even if its facing left? um... could you help me?

PostPosted: Wed Nov 08, 2006 8:18 pm
by Hedfone
I'm actually working on a school project that I should have been working on a few days ago :? . I'll reply l8r on or tomorrow.

PostPosted: Wed Nov 08, 2006 8:20 pm
by Sgt. Sparky
wahahaha!!! :cry: :( :x :evil: this is the first day in 3 days that i have had to do this :evil: :x :( :cry:

PostPosted: Wed Nov 08, 2006 9:08 pm
by makslane
Sgt. Sparky wrote:sorry to double post but: how do i use the "directional_velocity" code? to make my actow when i press up to go forwards even if its facing left? um... could you help me?


Try this:

Code: Select all
directional_velocity = 5;
angle = 90; //up

PostPosted: Wed Nov 08, 2006 9:40 pm
by Sgt. Sparky
would that work in an astroids style game?

PostPosted: Wed Nov 08, 2006 10:00 pm
by DilloDude
Try this: first, you need the xdist and ydist functions:
Code: Select all

double xdist(int deg, double dist)
{
    return  dist * cos(degtorad(deg));
}


double ydist(int deg, double dist)
{
    return -dist * sin(degtorad(deg));
}

add this to Global Code.
Have your keys aiming you as before.
On draw actor, to slow you down a little, (which is not entirely realistic, if you are in space, so you might want to leave it out):
Code: Select all
xvelocity *= .99;
yvelocity *= .99;

Adjust the .99 to change the speed.

Now, to make you move when you press up, repeat:
Code: Select all
int dir = animpos * 10;
xvelocity += xdist(dir, .1);
yvelocity += ydist(dir, .1);

Adjust the ten above to the number of degrees for each frame of the animation. Adjust the .1 to change the acceleration.

Now, a brake, when you press down, repeat, it slows you to a stop:
Code: Select all
xvelocity *= .95;
yvelocity *= .95;

Adjust the .95 to change the deceleration.

This dhould work (does for me), just an idea I though up. The other way is to use some sort of gravity function to change your velocity and angle.

PostPosted: Wed Nov 08, 2006 11:00 pm
by Sgt. Sparky
wow, thank you :D . I am not that well versed in C programimg :( . i will post a game pic on the "game pictures" topic i made :D

PostPosted: Thu Nov 09, 2006 11:15 pm
by Sgt. Sparky
sorry to double post again. but i did all the scrpit u said, and. it did not work. the fly will rotate but will not move... it is prob cus i have the $14 version.(older one)