3 registered members (Ayumi, Akow, AndrewAMD),
1,505
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Funfair Simulation
#259828
04/07/09 22:59
04/07/09 22:59
|
Joined: Apr 2009
Posts: 113 Netherlands
Dreher
OP
Warez Victim
|
OP
Warez Victim
Joined: Apr 2009
Posts: 113
Netherlands
|
Hello, I'm new here, and also new to scripting! Alrightio! - I've been modelling 'Fun Fair Attracties' for a few months now (Within SketchUp), and I want to script them within 3D Game Studio (A7). Ok, so, it seems nothing *too* advanced probably, but thats all I want to do, so no RPG's or shooters or anything complicated! Here is a link to a YouTube clip I recorded within SketchUp: http://www.youtube.com/watch?v=gnRm9DJZVEUWhat I want to do is, let my model do the same thing it does within SketchUp with SketchyPhysics! (Seen in the clip), and then make it a application. Is it easy to script these kind of things, or is it still pretty much complicated? Thanks in advance!
A7 7.77
|
|
|
Re: Funfair Simulation
[Re: Nicotin]
#259837
04/07/09 23:20
04/07/09 23:20
|
Joined: Jul 2005
Posts: 192 Orange County
silencer
Member
|
Member
Joined: Jul 2005
Posts: 192
Orange County
|
I like the idea, and I don't think it would be extremely difficult to do.
AMD 64 x2 4400+
2048mb DDR3200
NVidia 6800GS 256mb
Soundblaster Audigy 2
A7 Commercial 7.07
|
|
|
Re: Funfair Simulation
[Re: Nicotin]
#259838
04/07/09 23:21
04/07/09 23:21
|
Joined: Apr 2009
Posts: 113 Netherlands
Dreher
OP
Warez Victim
|
OP
Warez Victim
Joined: Apr 2009
Posts: 113
Netherlands
|
I think it is relativly easy. For a beginner pretty hard thought, because you have to use vector calculations. I see, well I'm totally new but I don't want to give up before I even tried, and I want to get this done anyway
Last edited by Dreher; 04/07/09 23:27.
A7 7.77
|
|
|
Re: Funfair Simulation
[Re: Dreher]
#259843
04/07/09 23:46
04/07/09 23:46
|
Joined: Jul 2008
Posts: 170 Germany, near Mainz
Nicotin
Member
|
Member
Joined: Jul 2008
Posts: 170
Germany, near Mainz
|
Okay, some tips (I can't give you more right now because I'd have to look a long time myself ) Look for "c_rotate" in the manual for the rotating platform and the single cars. Then look for vec_rotate to rotate the cars around the center of the platform. Sorry, my englisch isn't that good. I hope you can unserstand me thought. I'll take a look after it now thought
|
|
|
Re: Funfair Simulation
[Re: Nicotin]
#259847
04/08/09 00:00
04/08/09 00:00
|
Joined: Apr 2009
Posts: 113 Netherlands
Dreher
OP
Warez Victim
|
OP
Warez Victim
Joined: Apr 2009
Posts: 113
Netherlands
|
Okay, some tips (I can't give you more right now because I'd have to look a long time myself ) Look for "c_rotate" in the manual for the rotating platform and the single cars. Then look for vec_rotate to rotate the cars around the center of the platform. Sorry, my englisch isn't that good. I hope you can unserstand me thought. I'll take a look after it now thought I'm from holland so a bit of german isn't too bad either, but I do understand you in any way! Thanks alot for helping me getting started, as this is all i want to do, and once I get to know it properly, I'm happy! I will look into the manuals, looking for 'c_rotate' and 'vec_rotate' and see what I can do with it, then test it out whenever I'm far enough to do so. Atleast I've gotta start with a simpel model, nothing complicated yet. Thanks again and we'll see how things go!
A7 7.77
|
|
|
Re: Funfair Simulation
[Re: Dreher]
#259848
04/08/09 00:07
04/08/09 00:07
|
Joined: Jul 2008
Posts: 170 Germany, near Mainz
Nicotin
Member
|
Member
Joined: Jul 2008
Posts: 170
Germany, near Mainz
|
Ok, I made it to get a simple one working. If you want it here is the code: You can work with it I hope it helps you at least a little bit It was much easyer then I thought xD
action platform_action()
{
var platform_rotation_speed = 0.1;//Rotation Speed of the platform
var car_rotation_speed = 0.5;//rotation speed of the car
ENTITY* car1;//Pointer to all the cars
ENTITY* car2;
ENTITY* car3;
ENTITY* car4;
//Create the cars at 4 edges of the platform
car1 = ent_create("car.mdl",vector(my.x + 50,0,0),NULL);//Place the car 50 quands over 0
car2 = ent_create("car.mdl",vector(my.x - 50,0,0),NULL);//Place the car 50 quands under 0
car3 = ent_create("car.mdl",vector(0,my.y + 50,0),NULL);//Place the car 50 quands right from 0
car4 = ent_create("car.mdl",vector(0,my.y - 50,0),NULL);//Place the car 50 quands left from 0
while(1)
{
my.pan += platform_rotation_speed*time_step;//Rotate platform
car1.pan += car_rotation_speed*time_step;//rotate cars around themselfes
car2.pan += car_rotation_speed*time_step;
car3.pan += car_rotation_speed*time_step;
car4.pan += car_rotation_speed*time_step;
vec_rotate (car1.x,vector(platform_rotation_speed,0,0));//rotate the cars around the vector(0,0,0)
vec_rotate (car2.x,vector(platform_rotation_speed,0,0));
vec_rotate (car3.x,vector(platform_rotation_speed,0,0));
vec_rotate (car4.x,vector(platform_rotation_speed,0,0));
wait(1);
}
}
function main()
{
level_load(NULL);
wait(3);
camera.z = 200;
camera.x = -200;//Move camera
camera.tilt = -45;
ent_create("platform.mdl",vector(0,0,0),platform_action);//create Platform
}
EDIT: I didn't used c_rotate because it isn't necessary here. Just rotated with my.pan EDIT2: I forgot the time_step
Last edited by Nicotin; 04/08/09 00:21.
|
|
|
Re: Funfair Simulation
[Re: Nicotin]
#259850
04/08/09 00:18
04/08/09 00:18
|
Joined: Apr 2009
Posts: 113 Netherlands
Dreher
OP
Warez Victim
|
OP
Warez Victim
Joined: Apr 2009
Posts: 113
Netherlands
|
I'll check it out right away after I configured it ^^
A7 7.77
|
|
|
Re: Funfair Simulation
[Re: Pappenheimer]
#259855
04/08/09 00:38
04/08/09 00:38
|
Joined: Apr 2009
Posts: 113 Netherlands
Dreher
OP
Warez Victim
|
OP
Warez Victim
Joined: Apr 2009
Posts: 113
Netherlands
|
Hmm, I got the model already, but i'm totally UNKNOWN within script editor and model editor LOL
Model is imported from sketchup as a .3DS file, and thats it.
And I can't seem to find a way to use the code you gave me (within the Model Editor, to test it out) ><
A7 7.77
|
|
|
|