|
|
Re: NEWBIE QUESTION
[Re: HeelX]
#138134
06/26/07 05:22
06/26/07 05:22
|
Joined: Mar 2006
Posts: 6
developerno1
OP
Newbie
|
OP
Newbie
Joined: Mar 2006
Posts: 6
|
ya , that was the prob. i couldnt find where to enter that , i did it under the variable declaration but the error was "parameter unknown entity* inkeyword {}" please help .. im copying the whole code please point out the mistake Code:
//////////////////////////////////////////////////////////////////////////// // The PATH keyword gives directories where template files can be found. path "D:\\Program Files\\GStudio6\\template_6"; // Path to A6 templates directory path "D:\\Program Files\\GStudio6\\template_6\\code"; // Path to A6 template code subdirectory path "D:\\Program Files\\GStudio6\\template_6\\images"; // Path to A6 template image subdirectory path "D:\\Program Files\\GStudio6\\template_6\\sounds"; // Path to A6 template sound subdirectory path "D:\\Program Files\\GStudio6\\template_6\\models"; // Path to A6 template model subdirectory
///////////////////////////////////////////////////////////////// // Filename of the starting level. string level_str = <FIGHT.WMB>; // give file names in angular brackets
//////////////////////////////////////////////////////////////////////////// // Included files include <gid01.wdl>; // global ids include <display00.wdl>; // basic display settings include <movement.wdl>; // libraries of WDL functions include <messages.wdl>; include <menu.wdl>; // menu must be included BEFORE doors and weapons include <particle.wdl>; // remove when you need no particles
var right_health = 100; var left_health = 100; bmap left_health_map = "left_health.pcx"; bmap right_health_map = "right_health.pcx"; entity* ={left} entity* ={right}
ifdef lores; var video_mode = 4; // 320x240 ifelse; var video_mode = 6; // 640x480 endif; var video_depth = 16; // D3D, 16 bit resolution var fps_max = 50; // 50 fps max
panel left_health_pan { pos_x = 20; pos_y = 30; layer = 1; hbar = 0,0,200,left_health_map,2,left_health; flags = d3d,overlay,refresh; }
panel right_health_pan { pos_y = 30; layer = 1; hbar = 0,0,200,right_health_map,2,right_health; flags = d3d,overlay,refresh; }
///////////////////////////////////////////////////////////////// // Desc: The main() function is started at game start function main() { // set some common flags and variables // freeze all entity functions freeze_mode = 1; // no level has been loaded yet... gid01_level_state = gid01_level_not_loaded;
// entry: Warning Level (0,1, or 2) // entry_help: Sets sensitivity to warnings (0 = none, 1 = some, 2 = all). warn_level = 2; // announce bad texture sizes and bad wdl code var video_screen = 1;
// entry: Starting Mouse Mode (0, 1, or 2) mouse_mode = 0;
// wait 3 frames (for triple buffering) until it is flipped to the foreground wait(3);
// now load the level level_load(level_str);
wait(2); // let level load // level should be loaded at this point... gid01_level_state = gid01_level_loaded;
//+++ load starting values
// un-freeze the game freeze_mode = 0; right_health_pan.pos_x = screen_size.x - (bmap_width(right_health_map) + 20); right_health_pan.visible = on; left_health_pan.visible = on; }
action player_right {
right=my; my.skin=skin_right my.pan = 180; if (my.shadow == off) { drop_shadow(); } while ((right == null)) {wait (1);}
} action player_left {
left=my; my.skin=skin_left my.pan = 0; if (my.shadow == off) { drop_shadow(); } while ((left == null)) {wait (1);} }
// Desc: this is the function used to restart the game. function main_restart_game() { // wait 3 frames (for triple buffering) until it is flipped to the foreground wait(3);
// now load the level level_load(level_str); // freeze the game freeze_mode = 1;
wait(2); // 1-level loads, 2-entities load
//+++ load starting values
// un-freeze the game freeze_mode = 0; }
// Desc: this is the function used to quit the game. function main_quit() { //+++ // save global skills & strings exit; }
/* no exit window at all.. WINDOW WINEND { TITLE "Finished"; SIZE 540,320; MODE STANDARD; BG_COLOR RGB(0,0,0); TEXT_STDOUT "",RGB(255,40,40),10,20,520,270;
SET FONT "",RGB(0,255,255); TEXT "Any key to exit",10,270; }*/
///////////////////////////////////////////////////////////////// //INCLUDE <debug.wdl>;
|
|
|
Re: NEWBIE QUESTION
[Re: developerno1]
#138136
06/26/07 09:30
06/26/07 09:30
|
Joined: Mar 2006
Posts: 2,758 Antwerp,Belgium
frazzle
Expert
|
Expert
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
|
First I wanna say I never liked working with the templates but on the otherhand they are really helpful to beginner 3DGS game developers. At a first glance in your code, I see you've still declared your entities at a wrong way. Try: Code:
entity* left; entity* right;
Instead of: Code:
entity* ={left} entity* ={right}
To make sure this code is bug free, post it in the template section, there are more users there how can help you out better then me because I've never used the templates. Btw, if you wanna learn to write your own code, just try out the AU resources and the AUM magazine, there are lots of useful item there http://au.conitec.net/http://www.conitec.net/english/gstudio/aum.htmEDIT: Yeah, tompo is a quick fellow  Cheers Frazzle
Last edited by frazzle; 06/26/07 09:32.
Antec® Case Intel® X58 Chipset Intel® i7 975 Quad Core 8 GB RAM DDR3 SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB NVIDIA® GeForce GTX 295 Memory 1795GB
|
|
|
|