Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (dr_panther, AndrewAMD, TedMar), 1,371 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 4 1 2 3 4
Re: Why wont this work? [Re: Joozey] #270990
06/10/09 18:54
06/10/09 18:54
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
wait, would i create it using a paint program? and what code would i use?


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: Why wont this work? [Re: gamingfan101] #270991
06/10/09 18:55
06/10/09 18:55
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
I edited my post.


Click and join the 3dgs irc community!
Room: #3dgs
Re: Why wont this work? [Re: Joozey] #270994
06/10/09 19:09
06/10/09 19:09
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
Well, i used the code, but it still doesnt work. Here's the full code im using.


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

BMAP* firebackground = "awesome-fire-dragon-ablaze.jpg"; // dragon fire background with button on it

PANEL* first_pan = // my first panel
{
pos_x = -40;
pos_y = 0;
layer = 1;
bmap = firebackground;
button(300, 0, "stopclicked.jpg", "stopnormal.jpg", "stopnormal.jpg", quit_program, NULL, NULL);
flags = OVERLAY | VISIBLE;
}
BMAP* pngRobot = "LDDScreenShot1.png"; // robot in foreground

PANEL* second_panel =
{
pos_x = -270;
pos_y = -100;
layer = 2;
bmap = pngRobot;
flags = OVERLAY | VISIBLE;
}

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

function main()
{
video_mode = 7;
screen_color.red = 100;
}

function mouse()
{
mouse mode = 1;
while (1);
{
vec_set(mouse_pos, mouse_cursor);
wait(1);
}
}


function quit_program()
{
while (key_any) {wait (1);}
sys_exit(NULL);
}


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: Why wont this work? [Re: gamingfan101] #271000
06/10/09 19:31
06/10/09 19:31
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
try changine
sys_exit(NULL);
to be
sys_exit("");

If that doesnt help, put a beep(); into "quit_program"
to see if the button is even registering the click.
Can you see button image change from "stopclicked.jpg" to "stopnormal.jpg"
when the mouse hovers over it?


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Why wont this work? [Re: EvilSOB] #271003
06/10/09 19:47
06/10/09 19:47
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
no, i cant see any change, i dont know what im doing wrong. the button shows up, but i cant click it or anything.


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: Why wont this work? [Re: gamingfan101] #271004
06/10/09 19:57
06/10/09 19:57
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Try commenting out the definition of "second_panel" as a test.

Also what version of 3DGS are you using?
If you are using A7.63 or higher, you should be using the
SHOW flag on the panels, not VISIBLE as it was changed to SHOW in A7.63

[EDIT] Hehehe, good point Joozey. I didnt notice that the mouse never
gets turned on cause the mouse action is never actually called...

Last edited by EvilSOB; 06/10/09 20:02.

"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Why wont this work? [Re: EvilSOB] #271005
06/10/09 19:58
06/10/09 19:58
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
How about calling the mouse function first wink


Click and join the 3dgs irc community!
Room: #3dgs
Re: Why wont this work? [Re: Joozey] #271007
06/10/09 20:04
06/10/09 20:04
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
the mouse function has been called hasnt it?


function mouse()
{
mouse mode = 1;
while (1);
{
vec_set(mouse_pos, mouse_cursor);
wait(1);
}
}


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: Why wont this work? [Re: gamingfan101] #271009
06/10/09 20:08
06/10/09 20:08
Joined: Apr 2009
Posts: 298
Southern Oceans
KiwiBoy Offline
Member
KiwiBoy  Offline
Member

Joined: Apr 2009
Posts: 298
Southern Oceans
Try function mouse_startup(; so that it starts before the script or set inside of main to call up before the script needs it, then the mouse will be 'on' and you can click!


Use the 'manual' Luke, the manual is your friend. 'Self reminder' smile

My WebPage
Re: Why wont this work? [Re: KiwiBoy] #271011
06/10/09 20:19
06/10/09 20:19
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
Well, now the engine wont start the script. Heres the full code.


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


BMAP* firebackground = "awesome-fire-dragon-ablaze.jpg"; // dragon fire background with button on it

PANEL* first_pan = // my first panel
{
pos_x = -40;
pos_y = 0;
layer = 1;
bmap = firebackground;
button(300, 0, "stopclicked.jpg", "stopnormal.jpg", "stopnormal.jpg", quit_program, NULL, NULL);
flags = OVERLAY | VISIBLE;
}
BMAP* pngRobot = "LDDScreenShot1.png"; // robot in foreground

PANEL* second_panel =
{
pos_x = -270;
pos_y = -100;
layer = 2;
bmap = pngRobot;
flags = OVERLAY | VISIBLE;
}

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

function main()
{
video_mode = 7;
screen_color.red = 100;
}

function mouse_startup()
{
mouse_mode = 1;
while (1);
{
vec_set(mouse_pos, mouse_cursor);
wait(1);
}
}


function quit_program()
{
while (key_any) {wait (1);}
sys_exit("");
}


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Page 2 of 4 1 2 3 4

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | 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