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
3 registered members (NewbieZorro, TipmyPip, 1 invisible), 19,045 guests, and 8 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
Page 1 of 2 1 2
help please #129555
05/12/07 19:27
05/12/07 19:27
Joined: Mar 2007
Posts: 22
GameMaker60 Offline OP
Newbie
GameMaker60  Offline OP
Newbie

Joined: Mar 2007
Posts: 22
Hi everyone. I have a problem. I wrote my own script and made a new wdl. The script I used for the wdl was "empty script". I typed my script in as the games main script. When I run the A6 game engine THE SCREEN IS BLACK!!!!! Why would this happen.

I DID make sure to load the level set the video mode and all that in the script. Any help is appreciated.

Re: help please [Re: GameMaker60] #129556
05/12/07 19:28
05/12/07 19:28
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Post your code you put in the script. It is either this, OR, you should press [zero] to be able to move your camera around your level


xXxGuitar511
- Programmer
Re: help please [Re: GameMaker60] #129557
05/12/07 19:28
05/12/07 19:28
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline
Serious User
Claus_N  Offline
Serious User

Joined: May 2004
Posts: 1,510
Denmark
Please post your code, and we might be able to tell you what's wrong

But it really sounds like you need loading your level.

Re: help please [Re: Claus_N] #129558
05/12/07 19:29
05/12/07 19:29
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
press [zero] to move your camera using the mouse and cursor keys...


xXxGuitar511
- Programmer
Re: help please [Re: xXxGuitar511] #129559
05/12/07 20:13
05/12/07 20:13
Joined: Mar 2007
Posts: 22
GameMaker60 Offline OP
Newbie
GameMaker60  Offline OP
Newbie

Joined: Mar 2007
Posts: 22
hold on a bit and I will have it up. By the way xXxGuitar511 do you just kinda save everyone's butt when they need it? I think you have showed up in every post I have made so far. lol

Re: help please [Re: GameMaker60] #129560
05/12/07 20:25
05/12/07 20:25
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
I try... lol.


xXxGuitar511
- Programmer
Re: help please [Re: GameMaker60] #129561
05/12/07 20:28
05/12/07 20:28
Joined: Mar 2007
Posts: 22
GameMaker60 Offline OP
Newbie
GameMaker60  Offline OP
Newbie

Joined: Mar 2007
Posts: 22
The point of this was to see how a bone could be used to move a turret. This is the exact script being used right now.

Code:
// test.wdl
var video_mode = 7; // 800x600 pixels
var video_depth = 32; // 32 bit mode
//
var bone_angle[3]; // a vector that will hold the pan, tilt and roll angles
//
string test_wmb = <test.wmb>;
//
function bone_move()
//
function main()
{
level_load (test_wmb);
mouse_mode = 1; // now show the mouse
camera.x = 0;
camera.y = 250;
camera.z = -70;
camera.pan = 0;
camera.tilt = 0; // all of these set the camera to look at the turret
// to see how it moves.
}

action bone_move
{
while(1)
{
ent_bonereset(my, "Bone1");
if (key_l == on)
{
bone_angle.pan -= 3;
}
if (key_j == on)
{
bone_angle.pan += 3;
}
if (key_k == on)
{
bone_angle.tilt -= 3;
}
if (key_i == on)
{
bone_angle.tilt += 3;
}
ent_bonerotate(my,"bone1", bone_angle); // rotate the bone named "Bone1"
wait (1);
}
}



A frankly this is the first code I have ever made in C, so please don't hammer me.

Re: help please [Re: GameMaker60] #129562
05/12/07 21:47
05/12/07 21:47
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline
Serious User
Claus_N  Offline
Serious User

Joined: May 2004
Posts: 1,510
Denmark
You should put a wait(3) after the level_load command, to wait for the level to be loaded - though I doubt it would solve the problem...

And why do write "function bone_move()" just before main? If you want to create a function, you need the { and }, and if you want to create a prototype, you need the semicolon ;
And your action is called the same, so you actually should get an error!?

About the mouse... You need to be able to move it, right? Then you need some code - have a look here:
http://www.nighthawk.dk/v5/index.asp?PageID=ShowArticle&ID=19

Quote:

A frankly this is the first code I have ever made in C, so please don't hammer me.



Well, if it the first code you have made, it looks very good - keep it up, and you'll be a great programmer

Re: help please [Re: Claus_N] #129563
05/12/07 23:58
05/12/07 23:58
Joined: Mar 2007
Posts: 22
GameMaker60 Offline OP
Newbie
GameMaker60  Offline OP
Newbie

Joined: Mar 2007
Posts: 22
That wasn't it. I thought it was, but the screen is still black. But thank you for your help. There were a couple other things that I realized after I saw your post.

What is a prototype? It wasn't in the Gamestudio manual.

Re: help please [Re: GameMaker60] #129564
05/13/07 00:14
05/13/07 00:14
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline
Serious User
Claus_N  Offline
Serious User

Joined: May 2004
Posts: 1,510
Denmark
Well, I am sorry that I can't see anything else that could be wrong... :/

Here is an example of a function prototype:
Code:
function func_a();	// Prototype of func_a

function func_b()
{
func_a();
}

function func_a()
{
beep;
}


func_b uses func_a, but as func_a is defined after func_b, func_b does not know that it exists, and that would give you an error. So, you make the prototype, which just tells func_b (or any other function) that a function with the name func_a will be defined later, and then func_b won't give you an error.

Look in the manual under C-Script -> Syntax -> Functions

Page 1 of 2 1 2

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