5 registered members (AndrewAMD, alibaba, Konsti, 2 invisible),
1,418
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Load level
#76538
06/03/06 17:49
06/03/06 17:49
|
Joined: Jun 2004
Posts: 73 Switzerland, Basel
Des_Tiny
OP
Junior Member
|
OP
Junior Member
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]
#76540
06/03/06 18:17
06/03/06 18:17
|
Joined: Apr 2003
Posts: 1,044 Deutschland
Iron Chancellor
Senior Developer
|
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
Des_Tiny
OP
Junior Member
|
OP
Junior Member
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]
#76544
06/03/06 21:55
06/03/06 21:55
|
Joined: Jun 2004
Posts: 73 Switzerland, Basel
Des_Tiny
OP
Junior Member
|
OP
Junior Member
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
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|