|
2 registered members (TipmyPip, izorro),
556
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
and now a button won`t work(solved thanks again)
#137865
06/24/07 16:26
06/24/07 16:26
|
Joined: Nov 2005
Posts: 1,007
jigalypuff
OP
Serious User
|
OP
Serious User
Joined: Nov 2005
Posts: 1,007
|
i got the mouse map working (had to add a bigger wait) but for some weird reason this button refuses to work, what am i missing here? this function works ok on mouse_right which i used for testing the weapon but i want to use a button to fire it, Code:
panel phaser_pan { bmap = phaserpan_tga; pos_x = 680; pos_y = 580; button 20, 30, but2_tga, but3_tga, but2_tga, null, null, fnct_phaser; window = 20,56,268,14,charge_tga,0,null; button 20, 90, but2_tga, but3_tga, but2_tga, null, null, null; window = 20,116,268,14,charge_tga,0,null; flags = overlay, refresh, visible; }
the windows are were a recharge code will go, the fnct_phaser should fire what the button is clicked but it won`t. any ideas guys?
Last edited by jigalypuff; 06/24/07 19:09.
Why does everyone like dolphins?
Never trust a species which smiles all the time!
|
|
|
Re: and now a button won`t work
[Re: demiGod]
#137867
06/24/07 18:02
06/24/07 18:02
|
Joined: Nov 2005
Posts: 1,007
jigalypuff
OP
Serious User
|
OP
Serious User
Joined: Nov 2005
Posts: 1,007
|
i swapped that around but still not working, any other thoughts?
Why does everyone like dolphins?
Never trust a species which smiles all the time!
|
|
|
Re: and now a button won`t work
[Re: demiGod]
#137869
06/24/07 18:34
06/24/07 18:34
|
Joined: Nov 2005
Posts: 1,007
jigalypuff
OP
Serious User
|
OP
Serious User
Joined: Nov 2005
Posts: 1,007
|
still no joy on that, here is the panel code as it now stands Code:
panel phaser_pan { bmap = phaserpan_tga; layer = 10; pos_x = 680; pos_y = 580; button 20, 30, but2_tga, but3_tga, but2_tga, fnct_phaser, null, null; window = 24,59,259,9,charge_tga,0,player.mana; button 20, 90, but2_tga, but3_tga, but2_tga, null, null, null; window = 24,119,259,9,charge_tga,0,null; flags = overlay, refresh, visible; }
it is strange, i`ve never had this problem before with a button
Why does everyone like dolphins?
Never trust a species which smiles all the time!
|
|
|
Re: and now a button won`t work
[Re: demiGod]
#137871
06/24/07 18:49
06/24/07 18:49
|
Joined: Nov 2005
Posts: 1,007
jigalypuff
OP
Serious User
|
OP
Serious User
Joined: Nov 2005
Posts: 1,007
|
ya it would`nt work untill i out a wait(5) in there then it seems to, i mean the mouse map is there and moves around, here`s the main Code:
function main { mouse_map = hempire_pcx; mouse_mode = 1; mouse_range = 1000; level_load ("new_beginings.wmb"); wait(1); ent_create (galor_mdl, vector(-1000, 0, 0), c_ship); ent_create (excelsior_mdl, vector(1000,0,0), f_ship); ent_create (excelsior_mdl, vector(1000,100,0), f_ship); ent_create (stars_mdl, nullvector, stars); ent_create (jungle_mdl, vector(1500, 5000, 0), planets); ent_create (clouds_mdl, vector(1500, 5000, 0), clouds); ent_create (swamp_mdl, vector(15000, 5000, 0), planets); ent_create (clouds_mdl, vector(15000, 5000, 0), clouds); ent_create (f_starbase_mdl, vector(1500, 3000, 0), starbase); ///wait(1); while (1) { mouse_pos.x = pointer.x; mouse_pos.y = pointer.y; wait (5); } }
Why does everyone like dolphins?
Never trust a species which smiles all the time!
|
|
|
Re: and now a button won`t work
[Re: jigalypuff]
#137872
06/24/07 18:51
06/24/07 18:51
|
Joined: Nov 2005
Posts: 1,007
jigalypuff
OP
Serious User
|
OP
Serious User
Joined: Nov 2005
Posts: 1,007
|
here`s something very weird, i assigned a function to another button and the cursor works, just not that button.
Why does everyone like dolphins?
Never trust a species which smiles all the time!
|
|
|
Re: and now a button won`t work
[Re: jigalypuff]
#137873
06/24/07 19:10
06/24/07 19:10
|
Joined: Nov 2005
Posts: 1,007
jigalypuff
OP
Serious User
|
OP
Serious User
Joined: Nov 2005
Posts: 1,007
|
fixed it i had to comment out this line ///if(player != 0 && mouse_right ==1) cheers for helping me out.
Why does everyone like dolphins?
Never trust a species which smiles all the time!
|
|
|
|