Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,382 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
ent_create #307576
01/30/10 09:34
01/30/10 09:34
Joined: Nov 2009
Posts: 96
philippines
joh Offline OP
Junior Member
joh  Offline OP
Junior Member

Joined: Nov 2009
Posts: 96
philippines
is there limit for using ent_create?

here's my main but the last object that i load using ent_create says can't open file but when i swap it to the
court.mdl position and put it on comment it works. but when it comment it out the court.mdl which is now at the end after i swap them says can't open file again.

anyone knows how to solve this?


function main(){
//Load the level
level_load(level);
wait(1);
active_building = 1; //Admin building loaded

//Show Main Menu on startup
display_main_menu();
activate_caption_checker();

//Make background blue
vec_set(screen_color,vector(255,255,255));

//Set mouse mode
mouse_mode = 4;

//Set the sky color
sky_color.red = 150;
sky_color.green = 150;
sky_color.blue = 200;

//Create the player and have him run "player_control" function
//Player = ent_create("models//player.mdl", vector(-2490,-2630,70), player_control);

//Set camera at birds eye level

camera.x = 10362;
camera.y = -5322;
camera.z = 50000;

camera.tilt = -90;
camera.pan = 0;
camera.roll = 0;

camera.clip_far = 100000;


//Create Buildings


//Create VPA Building
Building = ent_create("vpa.mdl", vector(25,25,0), NULL);
Building.passable = off;
Building.polygon = on;
Building.push = 100;

//Create VPA Extension Building
Building = ent_create("vpa_extension.mdl", vector(-6200,-800,0), NULL);
Building.passable = off;
Building.polygon = on;
Building.push = 100;

//Create Brickyard
Building = ent_create("brickyard.mdl", vector(6000, -9500,-100), NULL);
Building.passable = off;
Building.polygon = on;
Building.push = 100;

//Create Engineering Building
Building = ent_create("engineering.mdl", vector(13000,-4500,0), NULL);
Building.passable = off;
Building.polygon = on;
Building.push = 100;

//Create Centrum Building
Building = ent_create("centrum.mdl", vector(2500,-9000,0), NULL);
Building.passable = off;
Building.polygon = on;
Building.push = 100;

//Create LCA2 Building
Building = ent_create("lca2.mdl", vector(-4000,-9000,0), NULL);
Building.passable = off;
Building.polygon = on;
Building.push = 100;

//Create fame Building
Building = ent_create("fame.mdl", vector(20000,-12000,0), NULL);
Building.passable = off;
Building.polygon = on;
Building.push = 100;


//create court
Building = ent_create("court.mdl", vector(-300,-1800,10),NULL);
Building.polygon = on;
Building.push = 100;

//road
Building = ent_create("road.mdl", vector(0,0,10),NULL);
Building.polygon = on;
Building.push = 100;


//Main Loop
while(1){
update_date();
sleep(1);
}
}

Re: ent_create [Re: joh] #307598
01/30/10 12:46
01/30/10 12:46
Joined: Feb 2005
Posts: 3,687
Hessen, Germany
T
Tempelbauer Offline
Expert
Tempelbauer  Offline
Expert
T

Joined: Feb 2005
Posts: 3,687
Hessen, Germany
i would check if the file is corrupt. try to open it in med and save it again

Re: ent_create [Re: Tempelbauer] #307600
01/30/10 12:59
01/30/10 12:59
Joined: Nov 2009
Posts: 96
philippines
joh Offline OP
Junior Member
joh  Offline OP
Junior Member

Joined: Nov 2009
Posts: 96
philippines
i did but still the same error

Re: ent_create [Re: joh] #307608
01/30/10 13:41
01/30/10 13:41
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I believe the problem is that ALL these entities are being jammed into
the "Building" pointer too fast.

To test this, put a "wait(1);" between each building type.

I think what is currently happening is that "court.mdl" is large,
and is still being loaded when the next ent_create gets processed.
Because court.mdl is still being loaded, then "road.mdl" CANT get loaded,
because the Building pointer is still "busy". Hence the error.

But why are you putting all the entities into the single Building pointer anyway?
The Building pointer will only store the last one you ent_create, and all the
other entities will still exist, but you will have no way of accessing them.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: ent_create [Re: EvilSOB] #307611
01/30/10 13:56
01/30/10 13:56
Joined: Nov 2009
Posts: 96
philippines
joh Offline OP
Junior Member
joh  Offline OP
Junior Member

Joined: Nov 2009
Posts: 96
philippines
here's what i have now but still the same error. but since road is at the end the error now is in road and not in court

function main(){
//Load the level
level_load(level);
wait(1);
active_building = 1; //Admin building loaded

//Show Main Menu on startup
display_main_menu();
activate_caption_checker();

//Make background blue
vec_set(screen_color,vector(255,255,255));

//Set mouse mode
mouse_mode = 4;

//Set the sky color
sky_color.red = 150;
sky_color.green = 150;
sky_color.blue = 200;

//Create the player and have him run "player_control" function
Player = ent_create("models//player.mdl", vector(-2490,-2630,70), player_control);

//Set camera at birds eye level
/*
camera.x = 10362;
camera.y = -5322;
camera.z = 50000;

camera.tilt = -90;
camera.pan = 0;
camera.roll = 0;

camera.clip_far = 100000;
*/

//Create Buildings

//Create VPA Building
Building = ent_create("vpa.mdl", vector(20,20,0), NULL);
Building.passable = off;
Building.polygon = on;
Building.push = 100;
wait(1);
//Create admin Building
Building = ent_create("admin.mdl", vector(-6200,-2000,0), NULL);
Building.passable = off;
Building.polygon = on;
Building.push = 100;
wait(1);
//Create Brickyard
Building = ent_create("brickyard.mdl", vector(5500,-6850,0), NULL);
Building.passable = off;
Building.polygon = on;
Building.push = 100;
wait(1);
//Create Engineering Building
Building = ent_create("engineering.mdl", vector(15000,300,0), NULL);
Building.passable = off;
Building.polygon = on;
Building.push = 100;
wait(1);
//Create Centrum Building
Building = ent_create("centrum.mdl", vector(2000,-10600,0), NULL);
Building.passable = off;
Building.polygon = on;
Building.push = 100;
wait(1);
//Create LCA2 Building
Building = ent_create("lca2.mdl", vector(-4000,-9000,0), NULL);
Building.passable = off;
Building.polygon = on;
Building.push = 100;
wait(1);
//Create fame Building
Building = ent_create("fame.mdl", vector(20000,-15000,0), NULL);
Building.passable = off;
Building.polygon = on;
Building.push = 100;
wait(1);

Other = ent_create("court.mdl", vector(-300,-1800,10),NULL);
Other.polygon = on;
Other.push = 100;
wait(1);

Other = ent_create("road.mdl", vector(-300,-1800,10),NULL);
Other.polygon = on;
Other.push = 100;
wait(1);

//Main Loop
while(1){
update_date();
sleep(1);
}
}

Re: ent_create [Re: joh] #307612
01/30/10 13:59
01/30/10 13:59
Joined: Nov 2009
Posts: 96
philippines
joh Offline OP
Junior Member
joh  Offline OP
Junior Member

Joined: Nov 2009
Posts: 96
philippines
any more idea sir? thanks

Re: ent_create [Re: joh] #307613
01/30/10 14:06
01/30/10 14:06
Joined: Nov 2009
Posts: 96
philippines
joh Offline OP
Junior Member
joh  Offline OP
Junior Member

Joined: Nov 2009
Posts: 96
philippines
@EvilSOB it works now. thanks a lot i reopen it and then try again now it works fine thanks a lot for your help! God Bless.

Re: ent_create [Re: joh] #307615
01/30/10 14:08
01/30/10 14:08
Joined: Nov 2009
Posts: 96
philippines
joh Offline OP
Junior Member
joh  Offline OP
Junior Member

Joined: Nov 2009
Posts: 96
philippines
ohh the error is back again when i try it again frown

Re: ent_create [Re: joh] #307632
01/30/10 16:29
01/30/10 16:29
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
OK, seeing as it is intermittant, it still doesnt tell prove me wrong...
Now you can remove all those wait's you added. That was just for testing.

So for our next test try creating a new pointer called court.
And put the court.mdl into it, but dont put any other entities in it...

If that STILL doesnt fix it, put court.mdl last and see how that goes.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: ent_create [Re: EvilSOB] #307634
01/30/10 16:48
01/30/10 16:48
Joined: Nov 2009
Posts: 96
philippines
joh Offline OP
Junior Member
joh  Offline OP
Junior Member

Joined: Nov 2009
Posts: 96
philippines
still it doesn't work..

when i put the court.mdl at the last part then the error now that can't open file is the court

Page 1 of 3 1 2 3

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