Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → A quick lightning flash...
A quick lightning flash...
2002-02-19, 10:48 PM #1
I was just thinking about a raining level, and wondered how hard it would be to create a 'flash' of lightning, blinding the player for less than a second, for say....30 sectors. I'm not asking anyone to write it out if they don't want to, I just want some direction.

------------------
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

-Tazz
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

Tazz
2002-02-20, 5:52 AM #2
Slim piece of cake.

Code:
#02/2002 GBK
Symbols
Message Startup
Message User0
Thing Player  Local
Sector Flash0
Sector Flash1
Sector Flash2
Sector Flash3
Sector Flash4
Sector Flash5
Sector Flash6
Sector Flash7
Sector Flash8
Sector Flash9
Sector Flash10
Sector Flash11
Sector Flash12
Sector Flash13
Sector Flash14
Sector Flash15
Sector Flash16
Sector Flash17
Sector Flash18
Sector Flash19
Sector Flash20
Sector Flash21
Sector Flash22
Sector Flash23
Sector Flash24
Sector Flash25
Sector Flash26
Sector Flash27
Sector Flash28
Sector Flash29
Int I=0  Local
End
Code
Startup:  Player = JKgetlocalplayer(); Stop;
User0:
For(I=0;I<30;I=I+1) {
If(Getthingsector(Player) = Flash0) {
Adddynamicadd(Player, 255, 255, 255); } }
Stop;
End



Please note, this cog will not work on its own. Another cog will have to pass User0 to it to trigger the conditional/flash.

I dare someone to question my use of an array here...

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2002-02-20, 1:23 PM #3
why sectors when you could also check the players distance?...hmm...walls could block the sight...then use HasLOS, too.
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-02-20, 11:23 PM #4
zagibu, sounds like you have a good idea. That would actually work a lot better, because I'm using a level where the rain is outside, and you can go in and out. So if you're looking out a window, I want it to work. Sounds like a HasLOS fix is in order. I could just place however many ghosts I need to allow the function! I will need to look at some targeting cogs to figure out the best way to go about it.

------------------
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

-Tazz
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

Tazz
2002-02-21, 1:33 AM #5
Hehe, the url for this post is http://forums.massassi.net/html/Forum4/HTML/003000.html

3000!
2002-02-21, 7:34 AM #6
Yeah, you might also want to look at the tracking rockets cog from Enhancement Pack...or ask Hideki, he'll tell you.
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)

↑ Up to the top!