Gamestudio Links
Zorro Links
Newest Posts
Removing outliers from files
by AndrewAMD. 12/02/26 15:26
SGT_FW
by Aku_Aku. 11/30/26 08:19
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 10,661 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 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