Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 17,758 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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