Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,251 guests, and 4 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
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 | 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