Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (TedMar, AndrewAMD, fairtrader), 578 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
morrowing question #137929
06/24/07 22:18
06/24/07 22:18
Joined: Nov 2005
Posts: 1,007
jigalypuff Offline OP
Serious User
jigalypuff  Offline OP
Serious User

Joined: Nov 2005
Posts: 1,007
i thought to use the mana recharge code for a phaser recharge, however for some reason it starts off fully charged and does not build up slowly, could you please advise me on this george?
Code:

starter init_player()
{
while (player == null) {wait (1);}
///player.strength = 74;
///player.experience = 0;
player.mana = 0;
while (1)
{
player.mana += 0.5 * time;
player.mana = min(259, player.mana);
wait (1);
}
}


your code there.
Code:

panel phaser_pan
{
bmap = phaserpan_tga;
pos_x = 680;
pos_y = 580;
button 20, 30, but2_tga, but3_tga, but2_tga, fnct_phaser1, null, null;
window = 24,59,259,9,charge_tga,0,player.mana;
button 20, 90, but2_tga, but3_tga, but2_tga, fnct_phaser2, null, null;
window = 24,119,259,9,charge_tga,0,null;
button 70, 140, but2_tga, but3_tga, but2_tga, null, null, null;
flags = overlay, refresh, visible;
}


the panel, at the moment it is not tied to the phaser code, i wanted to get it rechargeing first before i tried that.
thanks for any help.


Why does everyone like dolphins? Never trust a species which smiles all the time!
Re: morrowing question [Re: jigalypuff] #137930
06/25/07 05:00
06/25/07 05:00
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
try to change this code to:
Code:

starter init_player()
{
player.mana = 0;
while (1)
{
if(player == null) || (player.mana >= 259)
{wait (1);}
else
{
player.mana += 0.5 * time_step; //play with this value
}
wait (1);
}
}



But the problem may be with window. Check this charge_tga
If color is on the left side of this tga and black on the right half, then if player.mana = 0, it means that this tga is appear from 0 pixel (you will see full bar)

Last edited by tompo; 06/25/07 05:05.

Never say never.
Re: morrowing question [Re: jigalypuff] #137931
06/25/07 05:32
06/25/07 05:32
Joined: Aug 2003
Posts: 2,008
Bucharest, Romania
George Offline

Expert
George  Offline

Expert

Joined: Aug 2003
Posts: 2,008
Bucharest, Romania
Looks like a problem with the window bitmap / definition to me. To test that, start the game, and then type player.mana = 0 (try several numerical values here) at the console.

Re: morrowing question [Re: George] #137932
06/25/07 10:50
06/25/07 10:50
Joined: Nov 2005
Posts: 1,007
jigalypuff Offline OP
Serious User
jigalypuff  Offline OP
Serious User

Joined: Nov 2005
Posts: 1,007
well lets try the gui stuff, perhaps it is wrong the two images below are the panel and the charge bar, tompo you said some of it should be black, in morrowing it was a single color i think?


may the problem lie with the panel being black?


Why does everyone like dolphins? Never trust a species which smiles all the time!
Re: morrowing question [Re: jigalypuff] #137933
06/25/07 11:00
06/25/07 11:00
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
if your tga with bar is in one color you can use panel.scale_x to makes the same effect as with window
about windows look at my post reply Here

Last edited by tompo; 06/25/07 11:01.
Re: morrowing question [Re: tompo] #137934
06/25/07 13:41
06/25/07 13:41
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Only by the way:
starter function_name()
is old syntax.

In the latest A6 versions it is:
function FunctionName_startup()

And yeah from what I can see from that charge-bar image:
the set-up is wrong, read tompo's post he linked too it covers the whole window thing.

Re: morrowing question [Re: Xarthor] #137935
06/25/07 14:28
06/25/07 14:28
Joined: Nov 2005
Posts: 1,007
jigalypuff Offline OP
Serious User
jigalypuff  Offline OP
Serious User

Joined: Nov 2005
Posts: 1,007
well i tried makeing half the charge tga black below is the result

however it still does not move? what am i missing here? should the panel were the window is be not black?
i`ll try the post in the link as well thanks


Why does everyone like dolphins? Never trust a species which smiles all the time!
Re: morrowing question [Re: jigalypuff] #137936
06/25/07 14:41
06/25/07 14:41
Joined: Nov 2005
Posts: 1,007
jigalypuff Offline OP
Serious User
jigalypuff  Offline OP
Serious User

Joined: Nov 2005
Posts: 1,007
i think i have sort of solved this, i made another panel for the window and now i see the charge tga chargeing up lol, but it starts from the middle, how would i solve that?


Why does everyone like dolphins? Never trust a species which smiles all the time!
Re: morrowing question [Re: jigalypuff] #137937
06/25/07 14:47
06/25/07 14:47
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
In your code window is 259x9 so the charger-bar tga should be about 520x10.
The panel (bar/window) should be black (or with alpha channel) to be overlay or put a bar over the panel with proper layer.


Never say never.
Re: morrowing question [Re: tompo] #137938
06/25/07 19:57
06/25/07 19:57
Joined: Nov 2005
Posts: 1,007
jigalypuff Offline OP
Serious User
jigalypuff  Offline OP
Serious User

Joined: Nov 2005
Posts: 1,007
thanks tompo that works great man.


Why does everyone like dolphins? Never trust a species which smiles all the time!

Moderated by  George 

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