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
1 registered members (TipmyPip), 18,606 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
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