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
0 registered members (), 631 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: sprites [Re: GameScore] #271965
06/15/09 20:20
06/15/09 20:20
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline
User
the_mehmaster  Offline
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
You can use panels the size of the screen

Re: sprites [Re: the_mehmaster] #271973
06/15/09 20:44
06/15/09 20:44
Joined: Apr 2008
Posts: 245
GameScore Offline OP
Member
GameScore  Offline OP
Member

Joined: Apr 2008
Posts: 245
and how can i animate them?
make 10 panels and turn tem visible/invisible?

Re: sprites [Re: GameScore] #271975
06/15/09 21:02
06/15/09 21:02
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline
User
the_mehmaster  Offline
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
Quote:
make 10 panels and turn them visible/invisible?

sort of.

I would have 10 panels with increasing blood around the edges, and enable more with less health ie:
Code:
if(health<100)bloodpan1.flags = VISIBLE | OVERLAY;
   else bloodpan3.flags = NULL;
if(health<90)bloodpan2.flags = VISIBLE | OVERLAY;
   else bloodpan3.flags = NULL;
if(health<80)bloodpan3.flags = VISIBLE | OVERLAY;
   else bloodpan3.flags = NULL;
//etc..


Re: sprites [Re: the_mehmaster] #271982
06/15/09 22:05
06/15/09 22:05
Joined: Apr 2008
Posts: 245
GameScore Offline OP
Member
GameScore  Offline OP
Member

Joined: Apr 2008
Posts: 245
seems good smile

but are your panels animated?

if i understand your code, it means
if my health<100 show panel 1
else show nothing
if my health<90 show panel 2

i would have a animation on my screen when my player got some damage
like an electric shock or some like this

Re: sprites [Re: GameScore] #271983
06/15/09 22:42
06/15/09 22:42
Joined: Oct 2006
Posts: 175
G
Gumby22don Offline
Member
Gumby22don  Offline
Member
G

Joined: Oct 2006
Posts: 175
just make:

set panel1.VISIBLE;
wait 1;
set panel1.INVIS;
set panel2.VISIBLE;
wait 1;
set panel2.INVIS;
set panel3.VISIBLE;
...

sorry for the pseudocode, but it should be easy to read. This function should be heaps better than sprits, and matched to the screen exactly as you want.

Don
have a great day

Re: sprites [Re: Gumby22don] #271986
06/15/09 22:58
06/15/09 22:58
Joined: Apr 2008
Posts: 245
GameScore Offline OP
Member
GameScore  Offline OP
Member

Joined: Apr 2008
Posts: 245
great tnx wink

Re: sprites [Re: GameScore] #272197
06/16/09 21:28
06/16/09 21:28
Joined: Apr 2008
Posts: 245
GameScore Offline OP
Member
GameScore  Offline OP
Member

Joined: Apr 2008
Posts: 245
i was trying for hours but i dont find a solution

i define my panel like this

PANEL* visor_grain_1=
{
pos_x = 0;
pos_y = 0;
layer = 3;
bmap = visor_grain_1.pcx;
//flags=VISIBLE;
}

and the function to test i define like this

function visor_grain_startup();
{
while(1)
{

set (visor_grain_1,VISIBLE);
wait(1);
set (visor_grain_1,INVISIBLE);
set (visor_grain_2,VISIBLE);
wait(1);
set (visor_grain_2,INVISIBLE);
set (visor_grain_3,VISIBLE);
wait(1);
}

}

but it doesnt work, no way
tha panels dont get visible if i write
set (visor_grain_3,VISIBLE);

and if i set the pan in my panel define on visible
it wont get invisible
set (visor_grain_2,INVISIBLE);

did someone have a working code example, or a solution for me pls
before i go crazy

Last edited by GameScore; 06/16/09 21:30.
Re: sprites [Re: GameScore] #272219
06/16/09 22:43
06/16/09 22:43
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

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

Are your panels all on the same level?
Is panel 3 behind panel 1 or 2?

Is panel 1 invisible when panel 2 is visible?

Just a few questions that might help!

Ottawa smile

Re: sprites [Re: Ottawa] #272221
06/16/09 22:50
06/16/09 22:50
Joined: Apr 2008
Posts: 245
GameScore Offline OP
Member
GameScore  Offline OP
Member

Joined: Apr 2008
Posts: 245
all panels are on the same level, but its not the point
couz i cant turn them to invisible

if i define a panel
like this

PANEL* visor_grain_1=
{
pos_x = 0;
pos_y = 0;
layer = 3;
bmap = visor_grain_1.pcx;
flags=VISIBLE;
}

it it visible, but i cant turn them invisible in a function
and this is i dont undertsand
i know i should use different layers but i just was try with one panel to turn in on an off
and this is what doesnt work
i have no idea why

Last edited by GameScore; 06/16/09 23:03.
Re: sprites [Re: GameScore] #272229
06/17/09 00:14
06/17/09 00:14
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

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

The only flag in the panel should be OVERLAY.

you can change all your flags in any function if you know
the name of the PANEL* mypanel_1

Look up, in the manual, the instructions ....set, reset, toggle....
ex : set (mypanel_1, SHOW); // makes it visible

All panels can be on the same level if you use these instructions.

Pick up in free resources my document on "Flags at a glance" wink


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Page 2 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