|
2 registered members (juanex, AndrewAMD),
988
guests, and 8
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
A8 - Can't move entitys
#332869
07/12/10 15:22
07/12/10 15:22
|
Joined: Jul 2009
Posts: 1,198 Berlin, Germany
Liamissimo
OP
Serious User
|
OP
Serious User
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
|
Hey I just downloaded the A8 and transformed my script so that it works now. But if I want to move my character now, nothing happens. This is from a menu and it works fine
action weiter_act()
{
pXent_settype(me,PH_RIGID,PH_BOX);
while(me)
{
if(mouse_ent == me)
{
if(mouse_left)
{
laden = 1;
}
my.ambient = 100;
pXent_addvelcentral(me,vector(0,random(100)-50, random(100)-50));
}
else
{
my.ambient = 50;
}
wait(1);
}
}
But inGame I cannot move
if(key_a || Xbox_Joystick_Raw_X <= -150)
{
pXent_addvelcentral(ball,vector(0,7500,0));
}
if(key_d || Xbox_Joystick_Raw_X >= 150)
{
pXent_addvelcentral(ball,vector(0,-7500,0));
}
if(key_w || Xbox_Joystick_Raw_Y <= -150)
{
pXent_addvelcentral(ball,vector(0,0,7500));
}
if(key_s || Xbox_Joystick_Raw_Y >= 150)
{
pXent_addvelcentral(ball,vector(0,0,-7500));
}
If I add a beep I hear that it has to work, but the ball dont move.
"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen." -JCL, 2011
|
|
|
Re: A8 - Can't move entitys
[Re: Tobias]
#332884
07/12/10 17:44
07/12/10 17:44
|
Joined: Jul 2009
Posts: 1,198 Berlin, Germany
Liamissimo
OP
Serious User
|
OP
Serious User
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
|
Thanks, but no. I am using a ball that simply flies around in my level. I already deleted everything but it isn't working. This is my ball script
action ball_act()
{
ss = 0;
ball = me;
set(my,SHADOW);
my.material = mat_metal;
pXent_settype(me,PH_RIGID,PH_SPHERE);
pXent_setfriction(me,50);
pXent_setmass(me,1);
pXent_setdamping(me,60,60);
life_pan.flags |= (SHOW);
reseter();
spielstart();
while(1)
{
while(control == 1)
{
energy_pan.angle = energy - 100;
life_pan.angle = (life - 100)*-1;
if(energy < 100){energy += 0.5*time_step;
}
if(life < 100){life += 0.125*time_step;
}
if(ss == 1)
{
ss = 0;
level_load("start_eng.wmb");
wait(1);
life = 100;
spielstart();
weiterspielen();
life_pan.flags &= (~SHOW);
energy_pan.flags &= (~SHOW);
while(1)
{
if(start2_los == 1)
{
start2_los = 0;
level_load("start2.wmb");
}
wait(1);
}
}
if(life <= 0)
{
media_play("death_ball.wmv",NULL,100);
ss = 1;
}
Xbox_Joystick_X = joy_force.x ;
Xbox_Joystick_Y = joy_force.y ;
Xbox_Joystick_Raw_X = joy_raw.x ;
Xbox_Joystick_Raw_Y = joy_raw.y ;
Xbox_Joystick_Rot_X = joy_rot.y ; // X = Y ?? It Works. Go Figure.
Xbox_Joystick_Rot_Y = joy_rot.x ;
Xbox_Button_A = joy_1 ;
Xbox_Button_B = joy_2 ;
Xbox_Button_X = joy_3 ;
Xbox_Button_Y = joy_4 ;
Xbox_Button_Front_L = joy_5 ;
Xbox_Button_Front_R = joy_6 ;
Xbox_Button_Back = joy_7 ;
Xbox_Button_Start = joy_8 ;
Xbox_Joy_Push_L = joy_9 ;
Xbox_Joy_Push_R = joy_10 ;
if(key_a || Xbox_Joystick_Raw_X <= -150)
{
pXent_addvelcentral(ball,vector(0,7500,0));
}
if(key_d || Xbox_Joystick_Raw_X >= 150)
{
pXent_addvelcentral(ball,vector(0,-7500,0));
}
if(key_w || Xbox_Joystick_Raw_Y <= -150)
{
pXent_addvelcentral(ball,vector(0,0,7500));
}
if(key_s || Xbox_Joystick_Raw_Y >= 150)
{
pXent_addvelcentral(ball,vector(0,0,-7500));
}
wait(1);
}
}
just ignore those other commands, not necessary
Last edited by TheLiam; 07/12/10 17:47.
"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen." -JCL, 2011
|
|
|
Re: A8 - Can't move entitys
[Re: Tobias]
#332885
07/12/10 17:48
07/12/10 17:48
|
Joined: May 2009
Posts: 5,365 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,365
Caucasus
|
I have error: I did exactly like in the tutorial above... After this message appears, the level is loaded, but there is no level blocks, so model just flies down...
Last edited by 3run; 07/12/10 17:53. Reason: forgot something...
|
|
|
Re: A8 - Can't move entitys
[Re: 3run]
#332886
07/12/10 17:51
07/12/10 17:51
|
Joined: Jul 2009
Posts: 1,198 Berlin, Germany
Liamissimo
OP
Serious User
|
OP
Serious User
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
|
Yeah, you have to selevt the whole level, than go to <Blocks> and select concave  Then it is converted to a mesh
"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen." -JCL, 2011
|
|
|
Re: A8 - Can't move entitys
[Re: 3run]
#332888
07/12/10 18:09
07/12/10 18:09
|
Joined: Jul 2009
Posts: 1,198 Berlin, Germany
Liamissimo
OP
Serious User
|
OP
Serious User
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
|
Looked at it. Where are the problems?  Nice ball btw
"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen." -JCL, 2011
|
|
|
Re: A8 - Can't move entitys
[Re: 3run]
#332910
07/12/10 20:06
07/12/10 20:06
|
Joined: Jul 2009
Posts: 1,198 Berlin, Germany
Liamissimo
OP
Serious User
|
OP
Serious User
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
|
Sorry, no idea what this is, having enough trouble with my project  Anybody tried it and has the same bug/error?
"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen." -JCL, 2011
|
|
|
Re: A8 - Can't move entitys
[Re: Liamissimo]
#332924
07/12/10 23:13
07/12/10 23:13
|
Joined: Jul 2009
Posts: 1,198 Berlin, Germany
Liamissimo
OP
Serious User
|
OP
Serious User
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
|
I just don't get it. This is the example code of earthball8.c
function Kick()
{
VECTOR vKick;
vKick.x = 150; vKick.y = 0; vKick.z = 75;
vec_rotate(vKick,camera.pan);
pXent_addforcecentral(eBlob,vKick);
}
function main()
{
video_mode = 7;
video_aspect = 4./3.; // 4:3 monitor for 800x600
shadow_stencil = 3;
d3d_antialias = 4;
sound_vol = 100;
physX_open();
level_load("small.hmp");
eBlob = ent_create("blob.mdl",vector(0,0,100),NULL);
pXent_settype(eBlob,PH_RIGID,PH_CAPSULE);
pXent_setelasticity(eBlob,80);
pXent_setdamping(eBlob,20,5);
}
It is created, you can add pxent_addvelcentral on it, it works perfect. Now this is my code:
action ball_act()
{
ball = me;
set(my,SHADOW);
my.material = mat_metal;
pXent_settype(me,PH_RIGID,PH_SPHERE);
pXent_setfriction(me,50);
pXent_setmass(me,1);
pXent_setdamping(me,60,60);
while(1)
{
while(control == 1)
{
Xbox_Joystick_Raw_X = joy_raw.x ;
Xbox_Joystick_Raw_Y = joy_raw.y ;
if(key_a || Xbox_Joystick_Raw_X <= -150)
{
pXent_addvelcentral(ball,vector(0,75000,0));
}
if(key_d || Xbox_Joystick_Raw_X >= 150)
{
pXent_addvelcentral(ball,vector(0,-75000,0));
}
if(key_w || Xbox_Joystick_Raw_Y <= -150)
{
pXent_addtorqueglobal(ball,vector(0,0,75000));
}
if(key_s || Xbox_Joystick_Raw_Y >= 150)
{
pXent_addvelcentral(ball,vector(0,0,-75000));
}
wait(1);
}
wait(1);
}
}
function main()
{
physX_open();
mouse_mode = 4;
fps_max = 60;
d3d_antialias = 1;
video_set(1024,768,0,0);
video_window(NULL,NULL,16+64+128,"Gravix - PreVersion");
media_play("infectedgames_startup.wmv",NULL,100);
wait(-8);
video_pan.flags &= (~SHOW);
level_load("start_eng.wmb");
wait(1);
}
And it just do not move. getting crazy^^
"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen." -JCL, 2011
|
|
|
|