Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
0 registered members (), 631 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Help! #284942
08/16/09 03:14
08/16/09 03:14
Joined: Aug 2009
Posts: 1
Z
zhangyu1997 Offline OP
Guest
zhangyu1997  Offline OP
Guest
Z

Joined: Aug 2009
Posts: 1
start A7 Engine--1 second later-->Quit Engine!(Auto)
Why?
When I run "Game.wmb",it has no problem;
but when i run "Game.wdl",it...
My Script:
ENTITY* wall;

action wall_set{
wall=me;
}

action player_action{
player=me;
while(1){
result=c_trace(my,wall,use_aabb);
if(key_cuu==on){
c_move(my,vector(3,0,0),nullvector,glide);
}
if(key_cud==on){
c_move(my,vector(-3,0,0),nullvector,glide);
}
if(key_cul==on){
my.pan+=1*time;
}
if(key_cur==on){
my.pan-=1*time;
}
if(result>0){
sys_exit("Game Over!");
}
}
}

function main(){
level_load("GAME.WMB");
}

Re: Help! [Re: zhangyu1997] #284957
08/16/09 09:06
08/16/09 09:06
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline
Serious User
Claus_N  Offline
Serious User

Joined: May 2004
Posts: 1,510
Denmark
Hi, and welcome to the forum!

The game exits because of your "sys_exit" command, it simply shuts down the game whenvener you trace-ray has hit something smile

P.s. when posting your code, please use the "code-tag" to make it easier to read:
Code:
ENTITY* wall;

action wall_set
{
	wall = me;
}

action player_action
{
	player = me;
	
	while(1)
	{
		result = c_trace(my,wall,use_aabb);
		
		if(key_cuu == on)
		{
			c_move(my,vector(3,0,0),nullvector,glide);
		}
		
		if(key_cud == on)
		{
			c_move(my,vector(-3,0,0),nullvector,glide);
		}
		
		if(key_cul == on)
		{
			my.pan += 1*time;
		}
		
		if(key_cur == on)
		{
			my.pan -= 1*time;
		}
		
		if(result > 0)
		{
			sys_exit("Game Over!");
		}
	}
}

function main()
{
	level_load("GAME.WMB");
}




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