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.

Code Snippets / [LOCKED] Some stuff for noobs...

Author
Message
aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 27th Mar 2007 20:41
First off. Use arrays.

The other thing is how to make something move according to what angle it's at.

TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 27th Mar 2007 21:57
Well I will avoid being mean and pointing out the irony in your title.

Well first things first. You really have taken the word 'snippet' to heart. You have made the snippiest snippets I have ever seen. The general idea of this board is that you give a small piece of functioning code so perhaps build a demo using the snippets you have shown. Second, don't call people noobs. Its insulting. Say newbs if you are referring to newcomers. If you actually meant noobs then its a sorry type of person that would actually thank you for your snippets!

Thanks for trying to help the community but please read through some of the other posts in this board to get an idea of what your post should be like. I'm really not trying to offend or upset you and certainly don't want to put you off coding.

Gamer Making
18
Years of Service
User Offline
Joined: 20th Sep 2006
Location: sitting at the comp programming
Posted: 7th Apr 2007 05:54
what the heck !that is so simple like everyone knows about arrays! its like really important when it come s to storing things.

Bach Tran
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 7th Apr 2007 15:00


That doesn't actually use variable at all... I dont think "noobs" would actually understand it at all...

Perhaps you mean more like this:


Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 8th Apr 2007 19:38
and, if you really want an EASIER way to move something based on an angle, use these:

newxvalue(current x position, angle value, step value)
newxvalue(current y position, angle value, step value)
newxvalue(current z position, angle value, step value)

where x,y,z is your current position, angle value is the angle on the x,y,z plane, and step value is the distance you want to move the point in direction (angle) you want to go. Way less confusing than sin and cos, in my opinion.
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 8th Apr 2007 19:40
oops, I goofed, sorry

and, if you really want an EASIER way to move something based on an angle, use these:

newxvalue(current x position, angle value, step value)
newyvalue(current y position, angle value, step value)
newzvalue(current z position, angle value, step value)

where x,y,z is your current position, angle value is the angle on the x,y,z plane, and step value is the distance you want to move the point in direction (angle) you want to go. Way less confusing than sin and cos, in my opinion.
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 8th Apr 2007 20:09 Edited at: 8th Apr 2007 20:10
Nah! It isn't really confusing to use sine/cosine. For example:

That is all those commands really are. Of course if you are doing flight or something where you can move in 3D then you have to make your step value via sine/cosine too. For example:

If you don't do that then you can't move straight up and down because you will move forwards or backwards too.

[Edit]Sorry! Typo.[/Edit]

Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 8th Apr 2007 20:33 Edited at: 8th Apr 2007 20:35
edit:
hold on, I need to think about this for a second
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 8th Apr 2007 21:52
ok, I see. But if I was going to move on one axis only, I wouldn't bother with all the sin,cos stuff. I'd just inc or dec the position along that axis. But I just threw out newxvalue(), etc. in case some people find that more to their thinking. Thanks!

Login to post a reply

Server time is: 2024-11-22 18:47:35
Your offset time is: 2024-11-22 18:47:35