Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (degenerate_762), 1,098 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
"pan_create" - big problem #136309
06/13/07 18:42
06/13/07 18:42
Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...
dennis Offline OP
Member
dennis  Offline OP
Member

Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...
Hi!

I have got a problem with "pan_create".

The function "setting()" is not executed when I click on the button.

code:
"
#include <acknex.h>
#include <default.c>

BMAP* IM_BUTTON_B1_ON ="BUTTon_B1_ON.PNG";
BMAP* IM_BUTTON_B1_OFF ="BUTTon_B1_OFF.PNG";
BMAP* IM_BUTTON_B1_OVER ="BUTTon_B1_OVER.PNG";

BMAP* IM_MAUSZEIGER ="Mauszeiger.bmp";

PANEL* Temp_Pan;

function setting()
{

sys_exit("");

}

function main()
{
level_load("");
mouse_mode = 3;
mouse_map = IM_MAUSZEIGER;
Temp_Pan = pan_create("Button = 0,0,IM_BUTTON_B1_ON,IM_BUTTON_B1_OFF,IM_BUTTON_B1_OVER,setting,Null,Null; flags = visible;",100);
while(1)
{
mouse_pos.x = mouse_cursor.x;
mouse_pos.y = mouse_cursor.y;
wait(1);
}
}
"

I hope somebody has a solution....

Re: "pan_create" - big problem [Re: dennis] #136310
06/14/07 09:48
06/14/07 09:48
Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...
dennis Offline OP
Member
dennis  Offline OP
Member

Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...
Well...nobody has an idea......not good....:(

I have added a second panel in the script that is not created by "pan_create".
code:
"
PANEL* Temp2_Pan =
{
pos_x = 100;
layer = 50;
bmap = IM_BUTTON_B1_ON; Button = 0,0,IM_BUTTON_B1_ON,IM_BUTTON_B1_OFF,IM_BUTTON_B1_OVER,setting,null,null; flags = visible;

}
"

Now both panels are working!!!

Re: "pan_create" - big problem [Re: dennis] #136311
09/10/07 15:55
09/10/07 15:55
Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...
dennis Offline OP
Member
dennis  Offline OP
Member

Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...

I am still wondering why it doesn't work......

Can you try this on your pc?

Re: "pan_create" - big problem [Re: dennis] #136312
09/10/07 23:15
09/10/07 23:15
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline
User
MrCode  Offline
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
I don't think PNG is supported by 3DGS.


Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Re: "pan_create" - big problem [Re: MrCode] #136313
09/10/07 23:29
09/10/07 23:29
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Have you tried
sys_exit("");

sys_exit ("bye");

Ottawa

Re: "pan_create" - big problem [Re: dennis] #136314
09/10/07 23:54
09/10/07 23:54
Joined: Oct 2002
Posts: 361
Germany Cologne
hack-panther Offline
Senior Member
hack-panther  Offline
Senior Member

Joined: Oct 2002
Posts: 361
Germany Cologne
Ich habe bei meinem Script das selbe Problem...

Die Funktionen eines Buttons per "pan_Create" werden erst ausführbar
wenn ein vordefiniertes Panel mit den selben Buttonfunktionen existiert.

Ich habe diesen Fehler(?) auch schon angesprochen,
aber nie wirklich eine Antwort erhalten.

Nun habe ich einfach ein unsichtbares "Dummy-Panel" mit den
Buttonfunktionen gemacht, damit die Funktionen ausführbar sind.

Sorry dass ich nicht auf Englisch schreibe, bin zu Müde dafür...

Re: "pan_create" - big problem [Re: hack-panther] #136315
09/11/07 00:57
09/11/07 00:57
Joined: Aug 2005
Posts: 390
Florida
O
oldschoolj Offline
Senior Member
oldschoolj  Offline
Senior Member
O

Joined: Aug 2005
Posts: 390
Florida
Here is a pan_create that I use for button countdown timers on abilities, I hope it helps you.

Code:
function button_ctr04()
{
button_counter_panel04 = pan_create ("scale_x = .8; scale_y = .8; bmap = buttoncounterpanel.tga; pos_x = 455; pos_y = 665; window (1,1,43,50, buttoncntr.tga,timerbutton04,0); flags |= VISIBLE;", 2);
while (charge_bolt_countdown == 1)
{
reset (button_counter_panel04, VISIBLE);
timerbutton04 += 43;
set(button_counter_panel04, VISIBLE);
wait (-.227272);
}
pan_remove (button_counter_panel04);
timerbutton04 = 0;
}




you can find me with my face in the keyboard, unshaven, listening to some nameless techno tragedy, and hashing through code over a cold cup a stale joe. __________________________________ yours truly
Re: "pan_create" - big problem [Re: oldschoolj] #136316
09/11/07 00:59
09/11/07 00:59
Joined: Aug 2005
Posts: 390
Florida
O
oldschoolj Offline
Senior Member
oldschoolj  Offline
Senior Member
O

Joined: Aug 2005
Posts: 390
Florida
OH, I see one problem now in your pan_create statement. At the end....
Code:
 flags = VISIBLE; // change to flags |= VISIBLE;



I hope that helped


you can find me with my face in the keyboard, unshaven, listening to some nameless techno tragedy, and hashing through code over a cold cup a stale joe. __________________________________ yours truly
Re: "pan_create" - big problem [Re: oldschoolj] #136317
09/11/07 06:03
09/11/07 06:03
Joined: Sep 2004
Posts: 130
Italy
Alessandro Offline
Member
Alessandro  Offline
Member

Joined: Sep 2004
Posts: 130
Italy
Sorry one question:

but you can use the instruction:

level_load("");

So it means I can create an empty level and create it at runtime?
I red in the manual you need to load at least something (wmb, etc...).

Re: "pan_create" - big problem [Re: Alessandro] #136318
09/11/07 06:30
09/11/07 06:30
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
Yes level_load("") opens an empty level. I dont think that you can read in the manual that you need to load something.

Oldschoolj, |= is wrong. |= is for setting flags and keeping already set flags, and = is for setting flags and resetting all other flags, this is what you need in a definition.

Dennis, I don't know why your panel doesnt work but I see a possible problem with your panel, it has no background image and no size. I think a panel needs either a background image or a size. But Im not sure about this so try it.

Page 1 of 3 1 2 3

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