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
3 registered members (AndrewAMD, TipmyPip, OptimusPrime), 15,229 guests, and 7 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
Page 2 of 2 1 2
Re: Trouble opening levels [Re: Widi] #319655
04/16/10 13:06
04/16/10 13:06
Joined: Mar 2010
Posts: 56
Hertfordshire, England
Panda_Dude Offline OP
Junior Member
Panda_Dude  Offline OP
Junior Member

Joined: Mar 2010
Posts: 56
Hertfordshire, England
ah ok, that makes sense. Thanks.
---------
However, after trying that, the plane doesn't even appear. I'm sure I got the coordinates right. I got them off of the bar at the bottom of WED.

Last edited by Panda_Dude; 04/16/10 13:32.
Re: Trouble opening levels [Re: Panda_Dude] #319690
04/16/10 19:48
04/16/10 19:48
Joined: Mar 2010
Posts: 56
Hertfordshire, England
Panda_Dude Offline OP
Junior Member
Panda_Dude  Offline OP
Junior Member

Joined: Mar 2010
Posts: 56
Hertfordshire, England
sorry for my impatience, but i have 3 days till i go back to school and after that I won't have much spare time to work on things. Is my problem above because of the code? This is the whole code
Code:
#include <acknex.h>
#include <default.c>

ENTITY* plane;

function main ()
{
	level_load ("work08.wmb");
	wait (2);
}

function move_plane ()
{
	plane = me;
	my.ambient = 100;
	while (1)
	{
		if (key_a)		
		my.pan += 3*time_step;			
		if (key_d)
		my.pan -= 3*time_step;			
		if (key_w)
		c_move (me,vector(0,15*time_step,0),    nullvector, GLIDE);
		wait (1);
	}
}
plane = ent_create("mig.mdl",vector(0,4,66), move_plane);



Re: Trouble opening levels [Re: Panda_Dude] #319692
04/16/10 20:12
04/16/10 20:12
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
plane = ent_create("mig.mdl",vector(0,4,66), move_plane);

That have to be in a function !!!!! Set it after the wait(2) from the function main().

Code:
#include <acknex.h>
#include <default.c>

ENTITY* plane;

function move_plane ()
{
//	plane = me;   // set already at ent_create...
	my.ambient = 100;
	while (1)
	{
		if (key_a)		
		my.pan += 3*time_step;			
		if (key_d)
		my.pan -= 3*time_step;			
		if (key_w)
		c_move (me,vector(0,15*time_step,0),    nullvector, GLIDE);
		wait (1);
	}
}

function main ()
{
	level_load ("work08.wmb");
	wait (2);
	plane = ent_create("mig.mdl",vector(0,4,66), move_plane);
}





Last edited by Widi; 04/16/10 20:13.
Re: Trouble opening levels [Re: Widi] #319722
04/17/10 07:19
04/17/10 07:19
Joined: Mar 2010
Posts: 56
Hertfordshire, England
Panda_Dude Offline OP
Junior Member
Panda_Dude  Offline OP
Junior Member

Joined: Mar 2010
Posts: 56
Hertfordshire, England
ok. Thats is stupidly simple. thanks.

Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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