Forum

I made a flashlight!

Discuss anything not covered by any of the other categories.

Moderator: InsideQC Admins

I made a flashlight!

Postby RenegadeC » Mon Aug 14, 2006 10:43 pm

Doesn't come with a fleshlight, sorry folks.

Anyway, scar3crow and inertia were talking in #qc about getting inert help for someone to program a flashlight for his mod/map; I'm not exactly sure as I arrived late in the conversation. I then volunteered to help and the next thing I know I've released my own version of the Inside3D Shockman's flashlight tutorial for people to play around with and give feedback/bug reports/etc .. so here you are: A flashlight with new fun fantastic awesomely flippin wicked features!

Enjoy!

Readme (Recommended): http://renegade.circa1984.com/Mods/flashlight.txt
Download: http://renegade.circa1984.com/Mods/flashlight.rar
User avatar
RenegadeC
 
Posts: 391
Joined: Fri Oct 15, 2004 10:19 pm
Location: The freezing hell; Canada

Looks nice...

Postby xaGe » Tue Aug 15, 2006 5:12 am

Image
User avatar
xaGe
 
Posts: 461
Joined: Wed Mar 01, 2006 8:29 am
Location: Upstate, New York

Postby Entar » Tue Aug 15, 2006 5:32 am

I gotta say, that's the most disgusting looking shotgun EVAR.

Nice job, RenegadeC. You might talk to FrikaC about a DP-only real time directional light he did for a mod, that looks way better than this trace stuff. Of course, you could still do the alerting the enemies and such...
User avatar
Entar
 
Posts: 439
Joined: Fri Nov 05, 2004 7:27 pm
Location: At my computer

Re: Looks nice...

Postby RenegadeC » Tue Aug 15, 2006 6:35 am

xaGe wrote:Image


I hate how Darkplaces allows null.spr to be seen. :\
User avatar
RenegadeC
 
Posts: 391
Joined: Fri Oct 15, 2004 10:19 pm
Location: The freezing hell; Canada

Postby xaGe » Tue Aug 15, 2006 6:53 am

Entar wrote:I gotta say, that's the most disgusting looking shotgun EVAR.


...AGREEDED! LOL... :-P I installed that model pack a few days ago without looking at the models 1st... Oppps...

...Oh and Ren.. Ummm... Hey your right it IS DP! So that being the case if you don't want to see that null.spr being drawn just throw this null.spr_0.png skin in the progs folder... :-)

Image

...Sorry ugly sg is still there... :-P The skin is nothing more than a Alpha channel only 64x64 texture. You can probably make it even smaller and still have it work I guess...
User avatar
xaGe
 
Posts: 461
Joined: Wed Mar 01, 2006 8:29 am
Location: Upstate, New York

Postby Sajt » Tue Aug 15, 2006 8:56 am

DP allows null.spr to be seen? What does that mean?
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby RenegadeC » Tue Aug 15, 2006 5:54 pm

Sajt wrote:DP allows null.spr to be seen? What does that mean?


It means any entity that uses a 2D sprite of a single transparent pixel is now visible while in other engines it's completely invisible as it should be.
User avatar
RenegadeC
 
Posts: 391
Joined: Fri Oct 15, 2004 10:19 pm
Location: The freezing hell; Canada

Postby leileilol » Tue Aug 15, 2006 6:33 pm

.alpha 0.0000001 on it

also somehow rid that flare
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby Tei » Tue Aug 15, 2006 7:34 pm

But.. theres a better way to do that? I mean, what people propose to hidden the spr is hacks. I think DP sould provide something real, maybe something network based DP_NOTSHOW or something!, check the dpextension.qc file!
User avatar
Tei
 
Posts: 193
Joined: Mon Oct 25, 2004 12:22 pm

Postby Entar » Tue Aug 15, 2006 8:23 pm

Tei wrote:But.. theres a better way to do that? I mean, what people propose to hidden the spr is hacks. I think DP sould provide something real, maybe something network based DP_NOTSHOW or something!, check the dpextension.qc file!

EF_NODRAW.
User avatar
Entar
 
Posts: 439
Joined: Fri Nov 05, 2004 7:27 pm
Location: At my computer

Postby Sajt » Tue Aug 15, 2006 11:45 pm

I think the geniuses here are just whining about the coronas
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby scar3crow » Tue Aug 15, 2006 11:57 pm

Sajt - No, in DP it renders 2 solid white squares from which the coronas are coming.
User avatar
scar3crow
InsideQC Staff
 
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Postby Sajt » Wed Aug 16, 2006 12:22 am

O_O!
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby Nash » Fri Oct 19, 2007 6:24 pm

Sorry to bump this, but the link to the flashlight mod is broken. RenegadeC, can you re-upload the file? Thanks a lot.

The tutorial found on http://www.inside3d.com/showtutorial.php?id=119 isn't really a good flashlight because it spawns the flashlight with a fixed radius in front of the player, and makes the world cast shadows in a really weird way. It also has the tendency to go through walls.

Thanks!
User avatar
Nash
 
Posts: 95
Joined: Fri Oct 19, 2007 5:56 pm
Location: Kuala Lumpur, Malaysia

Postby Sajt » Fri Oct 19, 2007 6:46 pm

If you're using Darkplaces, it's best to use a cubemap flashlight...

It generally goes something like this (I hope).

Code: Select all
void() flashlight_think =
{
   setorigin(self, self.owner.origin + self.owner.view_ofs);
   self.angles = self.owner.v_angle;
   self.angles_x = self.angles_x * -1;

   self.nextthink = time;
};

...

      newmis = spawn();

      newmis.pflags = PFLAGS_FULLDYNAMIC;

      newmis.light_lev = 720;
      newmis.color = '2.2 2.2 1.6';

      newmis.skin = 30;

      newmis.owner = self;
      self.flashlight = newmis;
      newmis.think = flashlight_think;
      newmis.nextthink = time;


'skin = 30' means it uses a cubemap found at 'moddir/cubemaps/30*.tga'. Where * is px, py, pz, nx, ny, or nz.

For a flashlight, just make a white blob on a black background and save it as cubemaps/30px.tga. The other five images should just be black.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest