Gamestudio Links
Zorro Links
Newest Posts
Removing outliers from files
by AndrewAMD. 12/02/26 15:26
SGT_FW
by Aku_Aku. 11/30/26 08:19
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (Grant), 6,791 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
question from ode ! #218741
07/30/08 09:28
07/30/08 09:28
Joined: Jan 2007
Posts: 3
A
arashdj71 Offline OP
Guest
arashdj71  Offline OP
Guest
A

Joined: Jan 2007
Posts: 3
hi i'm arash
i'm from turkey and can't speaking engilesh well.
i have a script:

var video_mode=7;
var video_depth=32;
var video_screen =1;
var video_gamma=10;
var earthgravity[3] = 0,0, -386;
var earthgravity1[3]=0,0,0;
ENTITY* mycrate;
///////////////////////////////////////////
action ball{
my.ENABLE_IMPACT = ON;
phent_settype(my,Ph_Rigid,PH_SPHERE);
phent_setmass(my,100,PH_SPHERE);
ph_setgravity(earthgravity);
sleep(1);
}
///////////////////////////////////////////
action plane{
my.ENABLE_IMPACT = ON;
my.invisible=on;
mycrate=me;
phent_settype( myCrate,PH_RIGID,PH_BOX);
phent_setmass(my,0,PH_box);
}
///////////////////////////////////////////
font arial_font = "Arial", 1, 18; // true type, Arial, bold, size = 18
PANEL aircraft_pan
{
pos_x =4;
pos_y =4;
digits=0,0,2,arial_font, 1,sys_hours);
digits=20,0,2,arial_font, 1,sys_minutes);
digits=40,0,2,arial_font, 1,sys_seconds);
digits=750,0,5,arial_font,1,time_physics;
flags =VISIBLE;
}
//////////////////////////////////////

function main()
{
level_load("ball_level.wmb");
wait(1);
/////CAMERA/////
fps_max=50;
while (1)
{
mouse_pos.x = pointer.x;
mouse_pos.y = pointer.y;
camera.pan -= mouse_force.x;
camera.tilt += mouse_force.y;
wait(1);
}
}
/////////////////////////////////////

but this is don't working!
my boxies in this picture can;t move and stoped in air!
thank you!

Re: question from ode ! [Re: arashdj71] #218778
07/30/08 15:05
07/30/08 15:05
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
ph_setgravity(earthgravity)
- is a global instruction. It only needs to be called once

action plane{}
- 3DGS ODE physics respond to non-physics entities as well, so this is not necessary.

ph_setautodisable()
- Another global function. Your entities are automatically disabled when the game begins, because ODE assumes their in a "safe place". This helps the game load without needing to do collision checks for every entity.

phent_addvelcentral(my, vector(0,0,1));
- Put this at the end of your Ball() function. It will add a very small velocity to your object, so that physics are enabled at start.


xXxGuitar511
- Programmer

Moderated by  HeelX, Spirit 

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