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
1 registered members (AndrewAMD), 16,038 guests, and 5 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
panel wont show #167450
11/14/07 21:52
11/14/07 21:52
Joined: Nov 2007
Posts: 14
F
FiskFisk33 Offline OP
Newbie
FiskFisk33  Offline OP
Newbie
F

Joined: Nov 2007
Posts: 14
ok, im a begginer in this (got it 2 days ago) nd ive encountered a problem, My panel wont show
i feel like ive tried everything, but i obviously havent.

no need to say that my other code is a bit, off, or whatever u would call it. i took one of the wizards and bound the camera to it so i could make the camera move the looking direction for example

////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>

////////////////////////////////////////////////////////////////////

ENTITY* wizard;
BMAP* crosshair = "crosshair.pcx";
BMAP* hej = "grej.pcx";
var move_speed = 15;
var mouse_sens = 20;
var cam_pan = 0;
var a = 0;
var b = 0;
var c = 0;

////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////
function reset_pos()
{
wizard.x = 0;
wizard.y = 0;
}

PANEL first_pan = // my first panel
{
bmap = hej;
flags = VISIBLE;
layer = 1;
}

function main()
{
video_mode = 8; // 800x600 pixels
video_depth = 32;
video_screen = 1;
level_load ("work11.wmb");
wait(2);
ph_setgravity (vector(0, 0, -386));
mouse_mode = 1;
mouse_map = crosshair;
mouse_pos.x = 512;
mouse_pos.y = 384;
wait(1);
reset_pos();
while(1)
{
camera.pan -= (mouse_force.x * mouse_sens * time_step);
camera.tilt += (mouse_force.y * mouse_sens * time_step);
wizard.pan = camera.pan;
if(key_w)
{
c_move(wizard, vector(move_speed * time_step,0,0), nullvector, GLIDE);
}
if(key_s)
{
c_move(wizard, vector(-move_speed * time_step,0,0), nullvector, GLIDE);
}
if(key_a)
{
c_move(wizard, vector(0,move_speed * time_step,0), nullvector, GLIDE);
}
if(key_d)
{
c_move(wizard, vector(0,-move_speed * time_step,0), nullvector, GLIDE);
}
//if(key_space)
//{
// c_move(wizard, nullvector, vector(0,0,10), GLIDE);
//}
if(key_esc)
{
sys_exit(NULL);
}
camera.x = wizard.x;
camera.y = wizard.y;
camera.z = wizard.z + 30;
wait(1);
}
}

action wizard_with_pointer()
{
wizard = my;
my.ambient = 100;
}

action wizard_simple()
{
my.ambient = 100;
}

Re: panel wont show [Re: FiskFisk33] #167451
11/14/07 22:04
11/14/07 22:04
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
First of all: Put your code in
Code:
code tags


next time more readable.

Secondly: You haven't put an asterix behind the PANEL, like PANEL* first_pan={...}. Also are you sure that the picture "grej.pcx" really exist inside the main folder (where all your files are located)?

And thirdly: The while loop, use it inside the wizard action, not inside the main. It's more clean and properly used. Aside that, it's one big c_move orgy! I think the pc will explode when you press all buttons at the same time . Use c_move one time after all the if-statements, and fill a vector pointer inside the if's, then call the vector with that c_move.

Last edited by Joozey; 11/14/07 22:05.

Click and join the 3dgs irc community!
Room: #3dgs
Re: panel wont show [Re: Joozey] #167452
11/14/07 22:29
11/14/07 22:29
Joined: Nov 2007
Posts: 14
F
FiskFisk33 Offline OP
Newbie
FiskFisk33  Offline OP
Newbie
F

Joined: Nov 2007
Posts: 14
Thanx for the tips

Haha, missed the asterisk xD


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