Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (degenerate_762, DonQuijote), 933 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Apply to all entities with certain action #266090
05/15/09 22:08
05/15/09 22:08
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline OP
Serious User
Blade280891  Offline OP
Serious User

Joined: Jan 2008
Posts: 1,580
How can i apply transparancy to all entites with a set action ?

It is based on a variable which changes


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"
Re: Apply to all entities with certain action [Re: Blade280891] #266092
05/15/09 22:15
05/15/09 22:15
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
one certain action or diffrent actions?


3333333333
Re: Apply to all entities with certain action [Re: Quad] #266093
05/15/09 22:15
05/15/09 22:15
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline OP
Serious User
Blade280891  Offline OP
Serious User

Joined: Jan 2008
Posts: 1,580
One certain action


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"
Re: Apply to all entities with certain action [Re: Blade280891] #266097
05/15/09 22:48
05/15/09 22:48
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey

ok then add this global var:

var transparency_var = 50;//this is the alpha variable.
var transparent_bool = 1;//this is the on/off switch, i you set it to 0,no transparency, anything else = transparent

and in the while loop of action ad these:
if(transparent_bool==0) reset(my,TRANSLUCENT);
else{
set(my,TRANSLUCENT);
my.alpha = transparency_var;
}


3333333333
Re: Apply to all entities with certain action [Re: Quad] #266156
05/16/09 10:52
05/16/09 10:52
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
or give everything a different type
so have
Code:
#define _type skill1
#define actors 1
#define bushes 2
#define water 3 
//etc...
then in the action for each have
Code:
action act_actor(){
	my._type = actors;
}
then everytime you need to change it call
Code:
function alpha_actors()
{
	you = ent_next(NULL);
	while(you){ 
		if(your._type == actors){
			set(you,TRANSLUCENT); // make entity invisible
		}
		you = ent_next(you); // get next entity
 	}
}


hope this helps
*code untested*

Re: Apply to all entities with certain action [Re: MrGuest] #266157
05/16/09 10:54
05/16/09 10:54
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
or write each of their handles into an array at the start of their action


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