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
2 registered members (AndrewAMD, TipmyPip), 12,672 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
Click Through an entity #391421
01/11/12 22:19
01/11/12 22:19
Joined: Dec 2009
Posts: 256
USA , NY
msmith2468 Offline OP
Member
msmith2468  Offline OP
Member

Joined: Dec 2009
Posts: 256
USA , NY
I have an entity on top of another entity. I wanted to click the entity behind the first. because the first is for visual effects.

So i searched the manual and came across (UNTOUCHABLE) which seems to be exactly what i need. I can not seem to get it to work though.

The way i have it set up the entity on top is for effect, to do this i have its parent entity create it every frame and its own function sets it parameters and removes it after one frame. In guessing that my problem is caused perhaps because it dose not exist long enough.

I set it up this way because when the parent entity is changed the child entity must disappear and without referencing the child to the parent this seemed like the best way to achieve the effect and it worked well.

here is the code

Code:
action Show_crack()
{
	set (my, LIGHT | TRANSLUCENT | UNTOUCHABLE);
	my.scale_z = .55;
	my.z = -(2.5 / 2);
	my.skin = 13;
	wait(1);
	ent_remove(me);
}

action Create_Identity()
{
	set (my, LIGHT | POLYGON);
	my.emask |= ( ENABLE_CLICK);
	my.skin = 7;
	my.my_id = 213;
	my.event = click_event;
        while(1)
        {
               if (my.my_id == 213)
	       {
		       my.scale_z = .5;
		       my.z = -(2.5 / 2);
		       my.skin = 8;
		       ent_create("cube1.mdl", my.x, Show_crack);
	        }
        wait(1);
        }
}




Mikes Wicked Games

www.mikeswickedgames.com
Re: Click Through an entity [Re: msmith2468] #391422
01/11/12 22:32
01/11/12 22:32
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Set is a macro for eflags, UNTOUCHABLE is eflag2, so you have to set it manually without macro or define a set2 macro for eflags2:

my.flags2 |= UNTOUCHABLE;


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Click Through an entity [Re: Superku] #391424
01/11/12 22:52
01/11/12 22:52
Joined: Dec 2009
Posts: 256
USA , NY
msmith2468 Offline OP
Member
msmith2468  Offline OP
Member

Joined: Dec 2009
Posts: 256
USA , NY
Thanks a lot works great!


Mikes Wicked Games

www.mikeswickedgames.com

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