Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, dr_panther), 1,282 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Load level #76538
06/03/06 17:49
06/03/06 17:49
Joined: Jun 2004
Posts: 73
Switzerland, Basel
D
Des_Tiny Offline OP
Junior Member
Des_Tiny  Offline OP
Junior Member
D

Joined: Jun 2004
Posts: 73
Switzerland, Basel
Hi,

I would like to load some entities into my level with a script. I created a new WDL file and I included it, where the othere "include"s are. Then I wanted to call my level load function at the end of the main function, but when I run the game I get an error:


My function looks like this:
Code:
 
function loadlevel()
{
ent_create("feld1.wmb", vector(0,-1024,-128));
ent_create("feld1.wmb", vector(0,1024,-128));
ent_create("wand1.wmb", vector(-992,0,64));
ent_create("wand1.wmb", vector(992,0,64));
}



If I comment out the "loadlevel();" line in the main function it works. Whats wrong?


_______________________________________________ GameStudio 6 Extra Edition Processor: 2.80 Ghz RAM: 2046MB Graficcard: Radeon X600 256MB DOWNLOAD PONG FIGHT
Re: Load level [Re: Des_Tiny] #76539
06/03/06 18:14
06/03/06 18:14
Joined: Jun 2004
Posts: 73
Switzerland, Basel
D
Des_Tiny Offline OP
Junior Member
Des_Tiny  Offline OP
Junior Member
D

Joined: Jun 2004
Posts: 73
Switzerland, Basel
Oh, I forgot to declare an action.


_______________________________________________ GameStudio 6 Extra Edition Processor: 2.80 Ghz RAM: 2046MB Graficcard: Radeon X600 256MB DOWNLOAD PONG FIGHT
Re: Load level [Re: Des_Tiny] #76540
06/03/06 18:17
06/03/06 18:17
Joined: Apr 2003
Posts: 1,044
Deutschland
Iron Chancellor Offline
Senior Developer
Iron Chancellor  Offline
Senior Developer

Joined: Apr 2003
Posts: 1,044
Deutschland
You have to assign an action or a function to the entities you create. If they don't need one, try:

ent_create("feld1.wmb", vector(0,-1024,-128), null);
ent_create("feld1.wmb", vector(0,1024,-128), null);
ent_create("wand1.wmb", vector(-992,0,64), null);
ent_create("wand1.wmb", vector(992,0,64), null);

Re: Load level [Re: Des_Tiny] #76541
06/03/06 19:21
06/03/06 19:21
Joined: Jun 2004
Posts: 73
Switzerland, Basel
D
Des_Tiny Offline OP
Junior Member
Des_Tiny  Offline OP
Junior Member
D

Joined: Jun 2004
Posts: 73
Switzerland, Basel
Thank you.

An other question: Why do I get the error message "Missing/wrong parameter comma unexpected" for this code:
Code:
 
result = c_move(my, nullvector, nullvector, IGNORE_YOU);


I know, it doesn't make sence to take the nullvector twice, but it doesn't work with other vectors, too.


_______________________________________________ GameStudio 6 Extra Edition Processor: 2.80 Ghz RAM: 2046MB Graficcard: Radeon X600 256MB DOWNLOAD PONG FIGHT
Re: Load level [Re: Des_Tiny] #76542
06/03/06 20:02
06/03/06 20:02
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
I guess you're using the Sybex A6 extra version?
If you do so: Sorry c_* commands (such as c_move, c_trace ..) are not working in the Sybex A6 extra as far as I know.

Re: Load level [Re: Xarthor] #76543
06/03/06 20:15
06/03/06 20:15
Joined: Jun 2004
Posts: 73
Switzerland, Basel
D
Des_Tiny Offline OP
Junior Member
Des_Tiny  Offline OP
Junior Member
D

Joined: Jun 2004
Posts: 73
Switzerland, Basel
Yes I do so.
Ok then, I will use ent_move


_______________________________________________ GameStudio 6 Extra Edition Processor: 2.80 Ghz RAM: 2046MB Graficcard: Radeon X600 256MB DOWNLOAD PONG FIGHT
Re: Load level [Re: Des_Tiny] #76544
06/03/06 21:55
06/03/06 21:55
Joined: Jun 2004
Posts: 73
Switzerland, Basel
D
Des_Tiny Offline OP
Junior Member
Des_Tiny  Offline OP
Junior Member
D

Joined: Jun 2004
Posts: 73
Switzerland, Basel
I am using ent_move now, but the collision doesn't work:



The entity I am stearing only stops, when the middle of it is at the wall.
I read something in the documentation of GS about Bounding Boxes. Now I wan't to set the boxes bigger, but it still don't work.
My code:

Code:
 var t_speed_x;
var t_speed_y;
define speed_x, skill1;
define speed_y, skill2;

entity* schlaegel_s;
action a_schlaegel_s
{
schlaegel_s = my;
my.speed_x = 3;
my.speed_y = 3;
while(1)
{
my.max_x = 256;
my.max_y = 32;
my.max_z = 64;
my.min_x = -256;
my.min_y = -32;
my.min_z = -64;
t_speed_x = key_cur * my.speed_x - key_cul * my.speed_x;
t_speed_y = key_cuu * my.speed_y - key_cud * my.speed_y;
move_mode = IGNORE_YOU;
ent_move(vector(t_speed_x, t_speed_y,0),nullvector,0));
wait(1);
}
}




_______________________________________________ GameStudio 6 Extra Edition Processor: 2.80 Ghz RAM: 2046MB Graficcard: Radeon X600 256MB DOWNLOAD PONG FIGHT

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