Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 14,141 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Panels and variables #321156
04/27/10 11:59
04/27/10 11:59
Joined: Feb 2010
Posts: 43
in Italia
RoboWarrior Offline OP
Newbie
RoboWarrior  Offline OP
Newbie

Joined: Feb 2010
Posts: 43
in Italia
I have 2 question:
1-how-to show a panel only for 5 seconds and make a fade effect for the panel?
2-how to create variables for example var health that can have different values for each enemies?

Thank you for your time!


PC
processore Dual-Core Centrino 2 3.3 Ghz
video card NVIDIA 1GB
HDD 640 GB
RAM 8 GB
Windows 7
3D Game Studio A7 commercial edition
FACEBOOK: http://www.facebook.com/home.php?#!/profile.php?ref=profile&id=100000540297412
Re: Panels and variables [Re: RoboWarrior] #322087
05/04/10 17:51
05/04/10 17:51
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

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

1- A function with a wait (-5); ...will make it wait for 5 seconds
To fade the panel check out in the manual
words like
alpha,
TRANSPARENT
2- Each player has 100 skill values that you can use
So look for skill.


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: Panels and variables [Re: Ottawa] #322090
05/04/10 18:05
05/04/10 18:05
Joined: Sep 2009
Posts: 496
P
Progger Offline
Senior Member
Progger  Offline
Senior Member
P

Joined: Sep 2009
Posts: 496
hi first you need to make a .tga file with alphachannel.You can do it using GIMP or Photoshop
GIMP is for free and very good.
And here is the Code that do what you want
Sql Query:
////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>

////////////////////////////////////////////////////////////////////


PANEL* first_pan = // my first panel
{
	
	
	
	pos_x = 0;
	pos_y = 0;
	layer = 1;
	bmap = "example.tga";
	flags =  SHOW | OVERLAY;
}




/////////////////////////////////////////////////////////////////////

function main()
{
video_mode = 7;           
screen_color.blue = 150;
wait(-5);
while(first_pan.alpha>0)
{
first_pan.alpha-=0.05;
wait(1);
}
}


WFG Progger laugh


asking is the best Way to get help laugh laugh laugh
Re: Panels and variables [Re: Progger] #322479
05/07/10 12:41
05/07/10 12:41
Joined: Feb 2010
Posts: 43
in Italia
RoboWarrior Offline OP
Newbie
RoboWarrior  Offline OP
Newbie

Joined: Feb 2010
Posts: 43
in Italia
Thank you for the explaination, now I have no problem with panels but I don't know anything about skills and how to use them. Could someone help me?


PC
processore Dual-Core Centrino 2 3.3 Ghz
video card NVIDIA 1GB
HDD 640 GB
RAM 8 GB
Windows 7
3D Game Studio A7 commercial edition
FACEBOOK: http://www.facebook.com/home.php?#!/profile.php?ref=profile&id=100000540297412
Re: Panels and variables [Re: RoboWarrior] #322483
05/07/10 12:53
05/07/10 12:53
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

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

For skills start your reading with the following section in the manual

skill1 ... skill100

Try a few things, then come back here and post your questions. wink


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: Panels and variables [Re: RoboWarrior] #322484
05/07/10 12:58
05/07/10 12:58
Joined: Jan 2002
Posts: 300
Usa
Rich Offline
Senior Member
Rich  Offline
Senior Member

Joined: Jan 2002
Posts: 300
Usa
edit: oops user above got here before me

Each entity has 100 skill variables assigned to them that you can use for whatever you want. You can access them like this

my.skill[0] = 100 //health
my.skill[2] = 3 //lives
my.skill[99] = 50 //credits

you also have access to FLAG1 - FLAG8, and string1 - string2

-(optional)-
you can also create 'synonyms' for the skills to name them in a way that makes them easier to use

#define HEALTH skill[2] //somewhere in the beginning of your script

my.HEALTH = 100

Hope that helps

Last edited by Rich; 05/07/10 12:59.

A8 com / A7 free
Re: Panels and variables [Re: Rich] #322494
05/07/10 13:46
05/07/10 13:46
Joined: Feb 2010
Posts: 43
in Italia
RoboWarrior Offline OP
Newbie
RoboWarrior  Offline OP
Newbie

Joined: Feb 2010
Posts: 43
in Italia
Thank you! and if I want to call a skill of the player ina function what I have to do?
for example:

action player(){my.health=100;}
action npc(){my.health=200;}
function add_health(){
//now to call the health of each one like
player.health+=20;
npc.health+=20;
// but when I use the pointer entities don't work so how to call the skills of each one?


PC
processore Dual-Core Centrino 2 3.3 Ghz
video card NVIDIA 1GB
HDD 640 GB
RAM 8 GB
Windows 7
3D Game Studio A7 commercial edition
FACEBOOK: http://www.facebook.com/home.php?#!/profile.php?ref=profile&id=100000540297412
Re: Panels and variables [Re: RoboWarrior] #322495
05/07/10 14:18
05/07/10 14:18
Joined: Jan 2002
Posts: 300
Usa
Rich Offline
Senior Member
Rich  Offline
Senior Member

Joined: Jan 2002
Posts: 300
Usa
Did you define the skill as 'health'?

like this:

#define health skill[2]

you need to place this somewhere in the very beginning of your script, usually after your includes.


A8 com / A7 free
Re: Panels and variables [Re: Rich] #322496
05/07/10 14:26
05/07/10 14:26
Joined: Feb 2010
Posts: 43
in Italia
RoboWarrior Offline OP
Newbie
RoboWarrior  Offline OP
Newbie

Joined: Feb 2010
Posts: 43
in Italia
yes I did it, but if I want to call the player skill out from the action in a function or in a panel what I have to do?

Last edited by RoboWarrior; 05/07/10 14:30.

PC
processore Dual-Core Centrino 2 3.3 Ghz
video card NVIDIA 1GB
HDD 640 GB
RAM 8 GB
Windows 7
3D Game Studio A7 commercial edition
FACEBOOK: http://www.facebook.com/home.php?#!/profile.php?ref=profile&id=100000540297412
Re: Panels and variables [Re: RoboWarrior] #322505
05/07/10 15:41
05/07/10 15:41
Joined: Jan 2002
Posts: 300
Usa
Rich Offline
Senior Member
Rich  Offline
Senior Member

Joined: Jan 2002
Posts: 300
Usa
You would need to define an entity pointer, then assign that pointer to your object.

#ENTITY* Player;

then assign the pointer to the object inside it's action

Player = me;

now you can access Player.health, Player.skill[number], ect


A8 com / A7 free
Page 1 of 2 1 2

Moderated by  HeelX, rvL_eXile 

Gamestudio download | 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