Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 571 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How can I make the moon by using A6? #89059
09/07/06 15:08
09/07/06 15:08
Joined: Sep 2006
Posts: 25
H
hernan Offline OP
Newbie
hernan  Offline OP
Newbie
H

Joined: Sep 2006
Posts: 25
I am going to realize the moon that turns around the earth while the earth rotates,who can tell me how I'll do the c-script?

Re: How can I make the moon by using A6? [Re: hernan] #89060
09/07/06 19:48
09/07/06 19:48

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Hi!

Here's the code you need:
I'm not the best in astronomy so you have to adjust the angles/speed/directions you need by your selfe.

Code:

// planetarium
// ------------------------------------------
string str_mdl_moon = <moon.mdl>;
define _moondist, skill1;

function trabant{
var lv_angle;

while(you){

// rotate
lv_angle=(lv_angle-time*2)%360;

// around "you" (angles)
vec_for_angle(temp,vector(lv_angle,0,0));

// with this distance (from "you")
vec_normalize(temp,you._moondist);
vec_add(temp,you.x);
vec_set(my.x,temp.x);

// and turn to earth
vec_set(temp,you.x);
vec_sub(temp,my.x);
vec_to_angle(my.pan,temp);

wait(1);
}
}

//uses: _moondist
action planet {

// check values
if(my._moondist==0){
my._moondist=1000;
}

// create a trabant with distance
you=ent_create(str_mdl_moon,nullvector,trabant);

// rotate
while(1){
my.pan=(my.pan+time*2)%360;
wait(1);
}
}



Just assign the action planet to your earth model and be shure to hava a moon model (moon.mdl) or rename the string at the top of the script.
Adjust the property (skill1 of the planet in WED) for your purpose...

have a nice moon, mercuryus

Re: How can I make the moon by using A6? [Re: ] #89061
09/08/06 02:26
09/08/06 02:26
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
do you use the templates, or are you just unfamiliar with a6?

Re: How can I make the moon by using A6? [Re: lostclimate] #89062
09/09/06 12:36
09/09/06 12:36
Joined: Sep 2006
Posts: 25
H
hernan Offline OP
Newbie
hernan  Offline OP
Newbie
H

Joined: Sep 2006
Posts: 25
nice moon!
thanks!

Re: How can I make the moon by using A6? [Re: hernan] #89063
09/09/06 17:19
09/09/06 17:19
Joined: Sep 2006
Posts: 9
P
PeterPhinney Offline
Newbie
PeterPhinney  Offline
Newbie
P

Joined: Sep 2006
Posts: 9
He's a senior member. And can someone please tell me how to flip a model horizontally? I've been trying to figure it out for awhile now...


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1