Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (Akow), 1,361 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: enable_friction keyword unknown!? [Re: qwerty823] #19292
12/18/03 09:02
12/18/03 09:02
Joined: Oct 2003
Posts: 1,258
Virginia, USA
qwerty823 Offline
Senior Developer
qwerty823  Offline
Senior Developer

Joined: Oct 2003
Posts: 1,258
Virginia, USA
I just confirmed it using the SDK and a debugger. They are at the same offsets. I wonder what other cool tricks can be done this way.


Never argue with an idiot. They drag you down to their level then beat you with experience
Re: enable_friction keyword unknown!? [Re: fastlane69] #19293
12/18/03 13:42
12/18/03 13:42
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
Particles and entities are stored in a similar way in memory, those bits used for particle effects are recycled as event bits in regular entities. The |= is merely a way of setting a single bit rather than a whole bunch of them.


Re: enable_friction keyword unknown!? [Re: Marco_Grubert] #19294
12/18/03 15:01
12/18/03 15:01
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Whats the name and function of the "|=" operator? Not familiar with it.

Re: enable_friction keyword unknown!? [Re: fastlane69] #19295
12/19/03 02:50
12/19/03 02:50
Joined: Oct 2003
Posts: 1,258
Virginia, USA
qwerty823 Offline
Senior Developer
qwerty823  Offline
Senior Developer

Joined: Oct 2003
Posts: 1,258
Virginia, USA
The | (pipe symbol) is the bitwise 'OR' operator. The |= is just a shortcut like += is.

x += 2; // Same as x = x + 2;

x |= 2; // Same as x = x | 2;

As far as bitwise operators go, there are also the & (bitwise AND) and ^ (bitwise XOR), although Im not sure if C-Script supports them all.

If you want more info, let me know. Im sure I can dig up a link that explains them better.


Never argue with an idiot. They drag you down to their level then beat you with experience
Re: enable_friction keyword unknown!? [Re: qwerty823] #19296
12/19/03 16:51
12/19/03 16:51
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
LOL! Right on!
Two months ago, I started giving bitwise ops any attention. Now, I use "the pipe" all the time. That shortcut caught me by surprise

Thanks!

(PS: I use & and ^ all the time in c-script, so yes, they do work )

Page 2 of 2 1 2

Moderated by  HeelX, Spirit 

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