View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

  Experienced Modder Experienced ModderMember since: 20.07.2011, 10:22Posts: 489Location: Frankfurt am Main Likes: 4
 

 Post Topic: Re: [Free SDK] How to make a 'flashlight'
PostPosted 05.06.2012, 09:36 
No, probably a light shaft won't be visible but you can fake that as well.

On top of everything, you could beam a GeomEntity to the same position where you beam the light. This GeomEntity should point to beam.cgf which should be by default in the build (\Game\objects\Lights\beam.cgf). If you can't find it, go to \Game\Objects.pak, open it with winrar or winzip and extract the Lights folder. There you can find beam.cgf and the material for it...

At this point you are pretty much set.
Attachments:

Lightshaft.JPG

User avatar   Experienced Modder Experienced ModderMember since: 18.08.2011, 15:08Posts: 523Location: Canada Likes: 2
 

 Post Topic: Re: [Free SDK] How to make a 'flashlight'
PostPosted 05.06.2012, 21:11 
Thanks!


Quote:
[1:49:53 PM] fedayk1ntr: Join the Dark side
[1:50:04 PM} themodman101: You may have cookies, but we have all the milk.
User avatar   Beginner BeginnerMember since: 30.04.2011, 03:14Posts: 40 Likes: 0
 

 Post Topic: Re: [Free SDK] How to make a 'flashlight'
PostPosted 17.07.2012, 10:22 
Hey, I've run into a similar problem. I'm trying to get the Flashlight to match the camera's position exactly, Including the Pitch. In concept: When you look up, so does the light. When you look down, etc. I've gotten close, but instead of going up (when looking up) it goes down and vice-versa. I've attached that part of the FG below.
Attachments:

FG.png


  Experienced Modder Experienced ModderMember since: 20.07.2011, 10:22Posts: 489Location: Frankfurt am Main Likes: 4
 

 Post Topic: Re: [Free SDK] How to make a 'flashlight'
PostPosted 17.07.2012, 11:03 
Try to take the pitch and multiply it (Math:Mul) with -1(negative one) then get the result into that Vec3:ToVec.
User avatar   Beginner BeginnerMember since: 30.04.2011, 03:14Posts: 40 Likes: 0
 

 Post Topic: Re: [Free SDK] How to make a 'flashlight'
PostPosted 17.07.2012, 11:20 
Works perfect now. Thank you, Sir! :D


  Experienced Modder Experienced ModderMember since: 20.07.2011, 10:22Posts: 489Location: Frankfurt am Main Likes: 4
 

 Post Topic: Re: [Free SDK] How to make a 'flashlight'
PostPosted 17.07.2012, 11:23 
You're welcome! I should change my name into Sir-Spify :P :D
User avatar   Beginner BeginnerMember since: 30.04.2011, 03:14Posts: 40 Likes: 0
 

 Post Topic: Re: [Free SDK] How to make a 'flashlight'
PostPosted 17.07.2012, 11:36 
Cry-Sir-Spify. Just saying. :P


  Beginner BeginnerMember since: 18.10.2011, 19:32Posts: 92Location: germany Likes: 0
 

 Post Topic: Re: [Free SDK] How to make a 'flashlight'
PostPosted 02.08.2012, 19:41 
hi, i'am sorry to answer to an already solved topic but i found a better not so "fps dropping" way:
key7.jpg
  Beginner BeginnerMember since: 09.06.2012, 01:21Posts: 87Location: Germany Likes: 0
 

 Post Topic: Re: [Free SDK] How to make a 'flashlight'
PostPosted 03.08.2012, 00:38 
Taking to the first flowgraph - if you're going to prone or crouching, the light will stay at the same point on height-axis (z). So, if you're taking the camera height instead of 0.8 m it would be more nice.


  Beginner BeginnerMember since: 27.08.2011, 10:06Posts: 70 Likes: 0
 

 Post Topic: Re: [Free SDK] How to make a 'flashlight'
PostPosted 03.08.2012, 01:25 
Quote by ilovegamemaking:
hi, i'am sorry to answer to an already solved topic but i found a better not so "fps dropping" way:

How do I assign my flashlight light/entity to these:
Image
I've got it set up fine (I think)
Image
(in the above image my light called "flashlight" selected, thats where I started the flowgraph)
Here's a closer version of my light's properties...
Image
  Experienced Modder Experienced ModderMember since: 20.07.2011, 10:22Posts: 489Location: Frankfurt am Main Likes: 4
 

 Post Topic: Re: [Free SDK] How to make a 'flashlight'
PostPosted 03.08.2012, 10:26 
Select the flashlight then go to flowgraph and right click on Choose Entity (red field) and then click on 'Assign selected entity' (or 'Assign graph entity' - it doesn't matter - I just prefer the first one).
Attachments:

Assign.JPG
  Beginner BeginnerMember since: 18.10.2011, 19:32Posts: 92Location: germany Likes: 0
 

 Post Topic: Re: [Free SDK] How to make a 'flashlight'
PostPosted 03.08.2012, 10:36 
@BennzX
i'am sorry i dont know what you mean, i have tested it and the light follows the player exactly
key10.jpg
key11.jpg
  Beginner BeginnerMember since: 09.06.2012, 01:21Posts: 87Location: Germany Likes: 0
 

 Post Topic: Re: [Free SDK] How to make a 'flashlight'
PostPosted 03.08.2012, 13:16 
I meant the way bevor you created you'r "not so fps-dropping way" :P

As I've started to create an horrorgame I had some issues while proning trough a little tunnel. Light has always stayed at the upper screen egde. If someone has the same issues - just take the camera's position, from vec3, and take the z-variable from camera's position instead of the math-add +0.8. Much more better.


  Beginner BeginnerMember since: 18.10.2011, 19:32Posts: 92Location: germany Likes: 0
 

 Post Topic: Re: [Free SDK] How to make a 'flashlight'
PostPosted 03.08.2012, 13:20 
ok ;)
good luck with your horrorgame :))
  Beginner BeginnerMember since: 09.06.2012, 01:21Posts: 87Location: Germany Likes: 0
 

 Post Topic: Re: [Free SDK] How to make a 'flashlight'
PostPosted 03.08.2012, 14:07 
Thank you ;)

Tested out your version of the flashlight - it's simple, fast to create and without any issues ;)
Only thing is, I think first version was a bit smoother.