Page 1 of 1
Direction, nframes, animpos

Posted:
Thu Aug 24, 2017 12:55 pm
by ckn087
Hey guys! Working on a game and I am stuck with making my rooftop gun barrel rotate from left all the way to straight up in the air. I have made 5 animations starting with it pointed left, 45 degrees, and straight up with a couple more in between. My queston is, I was told to use the direction function, nframes, and animpos. I can't figure out what I'm doing as I am a beginner lol. If I can't do that I'd love to at least know how to make machine gun tracers or something shoot in the direction of my cursor. Thanks!!
Re: Direction, nframes, animpos

Posted:
Thu Aug 24, 2017 9:02 pm
by Kcee
The moon defender is a great tutorial for all your problems. Read the part where the cannon and cannon shot were coded.
Re: Direction, nframes, animpos

Posted:
Thu Aug 24, 2017 9:04 pm
by Kcee
If I have enough time, I might create a tutorial for you.
Re: Direction, nframes, animpos

Posted:
Thu Aug 24, 2017 9:52 pm
by ckn087
Thank you Kcee. I read the tutorial you sent me a link to about using the direction function, nframes, animpos, and xscreen and i just couldn't figure it out lol. Im just trying to figure out how many frames i need in the animation to go from 270 degrees to 0. I have 5 so far. don't really have the best drawing app to rotate objects. I am using ms paint.
Re: Direction, nframes, animpos

Posted:
Fri Aug 25, 2017 8:06 am
by Kcee
Download Rotsprite, it will help you with rotating your objects.
Re: Direction, nframes, animpos

Posted:
Fri Aug 25, 2017 2:18 pm
by ckn087
Awesome thanks man. My other paint programs blur my images when rotating and rotsprite says it doesn't do that so that's exactly what I have been looking for. I had a little luck with the bullets following my mouse cursor but still can't rotate gun just yet. I was also thinking about making a crosshair actor to replace my arrow cursor. Is that possible? I appreciate all your help!
Re: Direction, nframes, animpos

Posted:
Fri Aug 25, 2017 8:23 pm
by Kcee
You can disable the mouse cursor and make your crosshair actor follow the mouse, it will seem like the crosshair is the mouse itself. This topic will explain better
http://game-editor.com/forum/viewtopic.php?p=80915#p80915
Re: Direction, nframes, animpos

Posted:
Fri Aug 25, 2017 8:32 pm
by Kcee
Got some crosshair ideas for you


- Goodluck on your game!
Re: Direction, nframes, animpos

Posted:
Fri Aug 25, 2017 8:50 pm
by ckn087
Perfect thanks!
Re: Direction, nframes, animpos

Posted:
Sat Aug 26, 2017 5:41 am
by Kcee
Anytime.
Re: Direction, nframes, animpos

Posted:
Fri Sep 01, 2017 1:23 pm
by ckn087
Still having problems with my cannon rotating with mouse. Is it ok to have my animations as multiple files? I tried to use the code in the moon defender tutorial but it isn't working right. My gun is on top of a building facing west (270) I don't want it to point farther down and it's suppose to stop when pointed straight up (0 degrees) but it only seems to move when my mouse is on the opposite side (east) like it's set up backwards. Sorry I'm not good with the mouse angles, direction, nframes, xscreen etc. I can share ged file if it would help but I'm not sure how to share a ged file so please let me know. Thanks!
Re: Direction, nframes, animpos

Posted:
Tue Sep 05, 2017 8:17 pm
by Kcee
I'm really sorry but i might not be able to help you with this one. You will need professional help, i'm just a rookie.
Re: Direction, nframes, animpos

Posted:
Tue Sep 05, 2017 8:17 pm
by Kcee
I'm really sorry but i might not be able to help you with this one. You will need professional help, i'm just a rookie.
Re: Direction, nframes, animpos

Posted:
Tue Sep 05, 2017 10:15 pm
by ckn087
Hey you have been a lot of help already I appreciate it
Re: Direction, nframes, animpos

Posted:
Wed Sep 20, 2017 1:38 am
by Kcee
Thanks, I will try to do something.