Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
Archive › Old Forum Threads › Help › Scripting Help › Deciseconds? 1<<12??
2 posts, 2 people · 998 views Thread Rating: ★★★★★
closedDeciseconds? 1<<12??
Started by Tank on 01-02-2009, 06:28 PM
Tank
started this thread
Posts: 581
Threads: 59
Joined: Jan 2007
01-02-2009, 06:28 PM #1

I saw that Dr. G had some interest in effects and I figured I wanted to take a look at it as well.rnrnHad a question about this though. I see 1<<12 is a special deci seconds notation, but some searches on Google provided me nothing notation.rnI assume deci being ten its a tenth of a second, but I still don't understand how to read 1<<12. Also if I am right, is there a limit I can set it to or should I just work with a timer? (a times set_task?)rnrnAnd whats the difference between holdtime and duration, to me that sounds both as the time the effect lasts?rnrn

rng_Color[capper] = {0,0,255}rn message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("ScreenFade"),{0,0,0},capper)rnwrite_short(1<<12) //<- Durationrnwrite_short(1<<12) //<- Hold timernwrite_short(1<<12)rnwrite_byte(g_Color[capper][0])rnwrite_byte(g_Color[capper][1]) rnwrite_byte(g_Color[capper][2])rnwrite_byte(150)rnmessage_end()
H h0_noMan
posted here
Posts: 80
Threads: 11
Joined: Dec 2007
01-02-2009, 07:21 PM #2

rnrnExemple :rnrn1 in Binary : 00000000000001rn1<<1 in binary : 00000000000010rn1<<2 in binary : 00000000000100rn1<<3 in binary : 00000000001000rn1<<4 in binary : 00000000010000rn1<<5 in binary : 00000000100000rn1<<6 in binary : 00000001000000rn1<<7 in binary : 00000010000000rn1<<8 in binary : 00000100000000rn1<<9 in binary : 00001000000000rnrnFrom Wikipedia : http://en.wikipedia.org/wiki/Arithmetic_shift

Archive › Old Forum Threads › Help › Scripting Help › Deciseconds? 1<<12??
DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC