2 registered members (Akow, tomaslolo),
1,536
guests, and 12
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
"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
OP
Member
|
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]
#136314
09/10/07 23:54
09/10/07 23:54
|
Joined: Oct 2002
Posts: 361 Germany Cologne
hack-panther
Senior Member
|
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
oldschoolj
Senior Member
|
Senior Member
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
oldschoolj
Senior Member
|
Senior Member
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
|
|
|
|