how do i rotate things?

Game Editor comments and discussion.

Postby Sgt. Sparky » Tue Nov 07, 2006 1:23 am

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
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Hedfone » Tue Nov 07, 2006 1:27 am

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.
User avatar
Hedfone
 
Posts: 174
Joined: Mon Jul 31, 2006 9:47 pm
Score: 2 Give a positive score

Postby makslane » Tue Nov 07, 2006 1:41 am

Just download and install the trial again
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Hedfone » Tue Nov 07, 2006 1:57 am

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:
Last edited by Hedfone on Tue Nov 07, 2006 2:07 am, edited 2 times in total.
User avatar
Hedfone
 
Posts: 174
Joined: Mon Jul 31, 2006 9:47 pm
Score: 2 Give a positive score

Postby makslane » Tue Nov 07, 2006 1:59 am

Not now
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Hedfone » Tue Nov 07, 2006 2:09 am

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
User avatar
Hedfone
 
Posts: 174
Joined: Mon Jul 31, 2006 9:47 pm
Score: 2 Give a positive score

Postby Sgt. Sparky » Wed Nov 08, 2006 3:35 pm

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
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Sgt. Sparky » Wed Nov 08, 2006 7:36 pm

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?
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Hedfone » Wed Nov 08, 2006 8:18 pm

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.
Last edited by Hedfone on Wed Nov 08, 2006 10:28 pm, edited 1 time in total.
User avatar
Hedfone
 
Posts: 174
Joined: Mon Jul 31, 2006 9:47 pm
Score: 2 Give a positive score

Postby Sgt. Sparky » Wed Nov 08, 2006 8:20 pm

wahahaha!!! :cry: :( :x :evil: this is the first day in 3 days that i have had to do this :evil: :x :( :cry:
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby makslane » Wed Nov 08, 2006 9:08 pm

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
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Sgt. Sparky » Wed Nov 08, 2006 9:40 pm

would that work in an astroids style game?
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby DilloDude » Wed Nov 08, 2006 10:00 pm

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.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby Sgt. Sparky » Wed Nov 08, 2006 11:00 pm

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
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Sgt. Sparky » Thu Nov 09, 2006 11:15 pm

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)
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

PreviousNext

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest