Gamestudio Links
Zorro Links
Newest Posts
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
[MED] Import from FBX (2010) missing!!!
by rayp. 11/03/26 14:33
What are you working on?
by rayp. 11/02/26 13:57
No connection to MT4
by JeyKey II. 10/29/26 09:34
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (vince, VoroneTZ, LoT, Quad), 15,798 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
dabolong, MaliceTheMaker, Haitao_Ren, JimSimons, julienp
19249 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
unmeant set flag #331986
07/07/10 01:54
07/07/10 01:54
Joined: Apr 2009
Posts: 138
Germany
T
Toryno Offline OP
Member
Toryno  Offline OP
Member
T

Joined: Apr 2009
Posts: 138
Germany
Hi,

why does the following code set the invisible flag of the me entitiy?
Code:
action node() {
	set(me,ENABLE_SCAN);
}




Thanks for reading, thinking, answering wink
Re: unmeant set flag [Re: Toryno] #332001
07/07/10 07:41
07/07/10 07:41
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
my.emask |= ENABLE_SCAN; // that is the right syntax, is also in the manual.

INVISIBLE and ENABLE_SCAN set one bit of a long (32bit integer). In this case it is the 8. bit. This long have a name as every var, flags is one name and emask the other. There is also a flag2.

With set(my,ENABLE_SCAN) you set the 8. bit from the "flags" and not from "eflags", and that is the INVISIBLE one. Have a look at the define from set():
#define set(obj,flag) obj.flags |= (flag)


Last edited by Widi; 07/07/10 07:42.
Re: unmeant set flag [Re: Widi] #332017
07/07/10 09:40
07/07/10 09:40
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
All because the "set(...)" function only changes the flags in
the 'my.flags' property, and ENABLE_SCAN belongs in the 'my.emask' property.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: unmeant set flag [Re: EvilSOB] #332249
07/08/10 11:38
07/08/10 11:38
Joined: Apr 2009
Posts: 138
Germany
T
Toryno Offline OP
Member
Toryno  Offline OP
Member
T

Joined: Apr 2009
Posts: 138
Germany
Ah thank you.
Someone should correct the line in the manual where stands:

my.ENABLE_DETECT = ON;

Because of this line I thought it's the flag var wink


Thanks for reading, thinking, answering wink
Re: unmeant set flag [Re: Toryno] #332309
07/08/10 17:21
07/08/10 17:21
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
my.ENABLE_DETECT = ON;
that is the old language c-script, all red marked lines in the manual is c-script,
my.emask |= ENABLE_DETECT;
all green marked is lite-c


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