Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (juanex, AndrewAMD), 988 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
A8 - Can't move entitys #332869
07/12/10 15:22
07/12/10 15:22
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

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
Code:
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
Code:
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: Liamissimo] #332882
07/12/10 17:28
07/12/10 17:28
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Tobias Offline

Moderator
Tobias  Offline

Moderator

Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Maybe the friction is too high? A ball is normally moved with addtorque, check out the tutorial, I've just seen that it's updated to A8.

http://www.conitec.net/litec/work19.htm

Also check that you defined it with PH_RIGID and PH_SPHERE.

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
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

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
Code:
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 Offline
Senior Expert
3run  Offline
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...

Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
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
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
Yeah, you have to selevt the whole level, than go to <Blocks> and select concave wink 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: Liamissimo] #332887
07/12/10 18:05
07/12/10 18:05
Joined: May 2009
Posts: 5,365
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,365
Caucasus
I can move ball around the level, but some problems with it. Here is the video:
Youtube link


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
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
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
Looked at it. Where are the problems? wink 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: Liamissimo] #332891
07/12/10 18:19
07/12/10 18:19
Joined: May 2009
Posts: 5,365
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,365
Caucasus
Ball is jerking, not turning. Only when it moves by it self, turning is smooth. (thank you, but ball isn't mine tongue only particles are mine). On the video you can see that there is a problem. That is not because of low frame rate (while recording video) and so on. You can see, that ball moves very smooth and good by it self (on the video -> 10 sec), after applying force to it, but while you are applying force, ball jerks (on the video -> 12 sec) frown

Last edited by 3run; 07/12/10 18:25.

Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
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
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
Sorry, no idea what this is, having enough trouble with my project wink

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
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
I just don't get it. This is the example code of earthball8.c
Code:
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:
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
Page 1 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | 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