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
4 registered members (NewbieZorro, Grant, TipmyPip, AndrewAMD), 13,346 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
Physics #229959
10/01/08 20:58
10/01/08 20:58
Joined: Jul 2008
Posts: 17
1
12thhellion Offline OP
Newbie
12thhellion  Offline OP
Newbie
1

Joined: Jul 2008
Posts: 17
i finally have a physics entity moving by control but it stops after a certain distance can anyone tell me why?

Last edited by 12thhellion; 10/01/08 20:58.
Re: Physics [Re: 12thhellion] #229961
10/01/08 21:14
10/01/08 21:14
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline
Serious User
Blade280891  Offline
Serious User

Joined: Jan 2008
Posts: 1,580
code? We are not physic , lolz


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"
Re: Physics [Re: Blade280891] #229962
10/01/08 21:28
10/01/08 21:28
Joined: Jul 2008
Posts: 17
1
12thhellion Offline OP
Newbie
12thhellion  Offline OP
Newbie
1

Joined: Jul 2008
Posts: 17

function movement{
temp.x = my.x + fcos(my.pan,1000);
temp.y = my.y + fsin(my.pan,1000);
temp.z = my.z;
if key_c == 1{phent_addforceglobal(my,temp.x,my.x);}
}





action usercontrol{
ph_setgravity (vector(0, 0, -500));
phent_settype (my, PH_RIGID, PH_BOX);
phent_setmass (my, 3, PH_BOX);
phent_setfriction (my, 10);
phent_setdamping (my, 0, 0);
phent_setelasticity (my, 50, 20);
player = my;
while(1){
cam();
movement();
wait(1);
}
}

Re: Physics [Re: 12thhellion] #229964
10/01/08 21:33
10/01/08 21:33
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline
Serious User
Blade280891  Offline
Serious User

Joined: Jan 2008
Posts: 1,580
where's the rest? as in function main Etc..
Also please use code tags laugh
Can I assume that the car is moving on its own as well without user interaction?


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"
Re: Physics [Re: Blade280891] #229965
10/01/08 21:37
10/01/08 21:37
Joined: Jul 2008
Posts: 17
1
12thhellion Offline OP
Newbie
12thhellion  Offline OP
Newbie
1

Joined: Jul 2008
Posts: 17
include "user.wdl";

function main{
video_switch(7,0,1);
level_load("Testlvl.wmb");
}

function cam{
camera.x = my.x - fcos(my.pan,200);
camera.y = my.y - fsin(my.pan,200);
camera.z = my.z + 50;
camera.pan = my.pan;
}

function movement{
temp.x = my.x + fcos(my.pan,1000);
temp.y = my.y + fsin(my.pan,1000);
temp.z = my.z;
if key_c == 1{phent_addforceglobal(my,temp.x,my.x);}
}





action usercontrol{
ph_setgravity (vector(0, 0, -500));
phent_settype (my, PH_RIGID, PH_BOX);
phent_setmass (my, 3, PH_BOX);
phent_setfriction (my, 10);
phent_setdamping (my, 0, 0);
phent_setelasticity (my, 50, 20);
player = my;
while(1){
cam();
movement();
wait(1);
}
}


No but it stops moving after ive pressed c

Re: Physics [Re: 12thhellion] #229967
10/01/08 21:41
10/01/08 21:41
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline
Serious User
Blade280891  Offline
Serious User

Joined: Jan 2008
Posts: 1,580
Ok, it will stop moving after you press it.
Also i can't see a problem, in the code but im no expert.


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"
Re: Physics [Re: Blade280891] #230042
10/02/08 13:44
10/02/08 13:44
Joined: Jul 2008
Posts: 17
1
12thhellion Offline OP
Newbie
12thhellion  Offline OP
Newbie
1

Joined: Jul 2008
Posts: 17
i finally got it working, it was a problem with the level not the script, now does anyone know how i get the car to behave like a car and not slide everywhere?

Re: Physics [Re: 12thhellion] #230078
10/02/08 17:16
10/02/08 17:16
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline
Serious User
Blade280891  Offline
Serious User

Joined: Jan 2008
Posts: 1,580
we cant write it for you, you will need to learn im afraid.


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"

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