Gamestudio Links
Zorro Links
Newest Posts
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
ZorroGPT
by TipmyPip. 04/08/26 17:08
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (ApprenticeInMuc, Quad, TipmyPip), 7,096 guests, and 19 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Geir, ondrej, mredit, vestriaa, Lukudo
19206 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,211
İstanbul, Turkey
Quad Online
Senior Expert
Quad  Online
Senior Expert

Joined: Oct 2007
Posts: 5,211
İ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,211
İstanbul, Turkey
Quad Online
Senior Expert
Quad  Online
Senior Expert

Joined: Oct 2007
Posts: 5,211
İ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 | 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