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
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (howardR, 7th_zorro), 893 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
Layer Entities - click #421330
04/15/13 17:05
04/15/13 17:05
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Offline OP
Member
jenGs  Offline OP
Member
J

Joined: Jul 2010
Posts: 283
Germany
hmrg, I am using gamestudio since A4 and never used this screen entity things.
Now I need them and can't get them to react to the mouse.

I am creating this entities with
ENTITY *ent = ent_createlayer("file", 0, 1)
then I assigned an event
ent.emask |= ENABLE_TOUCH
and of course the I set the
ent.event = myEvent;
function.

No matter how big the mouse_range var is, the things will not react to the mouse.
Can they react? If yes, how do I do that?

Greeting,
Patrick

Re: Layer Entities - click [Re: jenGs] #421335
04/15/13 18:12
04/15/13 18:12
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
through functions and actions

I still use wdl, but since you come from wdl you should have no problem converting this code:

function click_event(){

if (event_type == event_click){beep();}// and further code proceeds

}

action click_act{

my.enable_click = on;
my.event = click_event;

while(1){wait(1);}

}

Hope this helps


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: Layer Entities - click [Re: DLively] #421336
04/15/13 18:21
04/15/13 18:21
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Offline OP
Member
jenGs  Offline OP
Member
J

Joined: Jul 2010
Posts: 283
Germany
The problem is, that I allready do that. Only in Lite-C.
the function ent_createlayer only returns the entity, you can't
assign an action directly.
I create the screen entities procedural, so I can't prdefine them.
I come more and more to the conclusion, that it is not possible, to let them react to the mouse.

Re: Layer Entities - click [Re: jenGs] #421338
04/15/13 18:44
04/15/13 18:44
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
VIEW entities do not receive mouse events. See the table in the manual about entities: http://www.conitec.net/beta/aentities-intro.htm


Always learn from history, to be sure you make the same mistakes again...
Re: Layer Entities - click [Re: Uhrwerk] #421347
04/15/13 20:50
04/15/13 20:50
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Offline OP
Member
jenGs  Offline OP
Member
J

Joined: Jul 2010
Posts: 283
Germany
Ah ok, thank you laugh


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