I downloaded this cog from the
cog library for use in my great
wall of china level. It is supposed
to blind a player that looks at a
ghost to emulate the sun. It works
except for when a 3do should
be blocking your veiw of the sun
and it still blinds you.
Is there an easy way to counter
this using cog?
cog library for use in my great
wall of china level. It is supposed
to blind a player that looks at a
ghost to emulate the sun. It works
except for when a 3do should
be blocking your veiw of the sun
and it still blinds you.
Code:
# sun.cog # # Blind the player as he looks at the sun. # # [GuNbOy + SM] # # # directions: place a thing named "ghost" anywhere in your level that you would like the effect to take place; # make a new template with the easy template creator in jed called +timed_ghost and give it the following properties: # orient=(0/0/0) type=ghost move=path timer=0.01 # # test level and enjoy! #================================================================================ # symbols message startup message pulse thing sun thing player local thing ghostthing local template gtemp=+timed_ghost local vector sunlook local vector lvec local flex dot local int handle=-1 local end #================================================================================# code #--------------------------------------------------------------------- startup: player=GetLocalPlayerThing(); SetPulse(0.01);Return; #--------------------------------------------------------------------- pulse: FreeColorEffect(handle); if(!IsThingVisible(sun)) Return; ghostthing=FireProjectile(player, gtemp, -1, -1, '0 0 0', '0 0 0', 0, 0, 0, 0); lvec=GetThingLVec(ghostthing); sunlook=VectorNorm(VectorSub(GetThingPos(sun), GetThingPos(player))); dot=VectorDot(sunlook, lvec); handle=NewColorEffect(0, 0, 0, 0, 0, 0, 255*dot, 255*dot, 240*dot, dot/2); AddDynamicTint(player, dot/2, dot/2, dot/2); Return; #--------------------------------------------------------------------- end
Is there an easy way to counter
this using cog?
If curiosity killed the cat then perhaps Curious George killed the cat.
But Cat's do have nine lives so who knows?
But Cat's do have nine lives so who knows?