View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

User avatar   Uber Modder Uber ModderMember since: 06.01.2010, 12:10Posts: 1161Location: Safe House Likes: 0
 

 Post Topic: Re: [Crysis 2] Helmet-mounted flashlight
PostPosted 22.05.2012, 11:43 
Thank you,i will try that :)


http://tomyum72.deviantart.com/gallery/
" Adult Supervision Is Required ! "
ฝันเป็นจริง :) :)

User avatar   Trainee TraineeMember since: 19.05.2012, 04:47Posts: 149Location: Santa Cruz, California Likes: 1
 

 Post Topic: Re: [Crysis 2] Helmet-mounted flashlight
PostPosted 25.05.2012, 08:54 
Any pointers on how to attach it to the player model?
User avatar   Trained Modder Trained ModderMember since: 23.09.2011, 02:21Posts: 398 Likes: 48
 

 Post Topic: Re: [Crysis 2] Helmet-mounted flashlight
PostPosted 25.05.2012, 16:24 
Quote by twitchythumbs:
Any pointers on how to attach it to the player model?

Currently there isn't any way to attach or link an entity to the player, AFAIK ;(
User avatar   Uber Modder Uber ModderMember since: 20.07.2011, 21:46Posts: 1407 Likes: 81
 

 Post Topic: Re: [Crysis 2] Helmet-mounted flashlight
PostPosted 25.05.2012, 23:47 
Maybe you can make something like this?



Image

Image
User avatar   Trained Modder Trained ModderMember since: 02.06.2010, 17:50Posts: 201Location: Zurich, Switzerland Likes: 7
 

 Post Topic: Re: [Crysis 2] Helmet-mounted flashlight
PostPosted 26.05.2012, 00:19 
@OCASM
Actually it's pretty easy :)
Well probably you have to move a Tagpoint to the players position and then link an other tagpoint to the first one. Now you can move the flashlight every 0.01 second to Tagpoint2. It will look like the flaslight is linked tho the payer
User avatar   Trained Modder Trained ModderMember since: 23.09.2011, 02:21Posts: 398 Likes: 48
 

 Post Topic: Re: [Crysis 2] Helmet-mounted flashlight
PostPosted 26.05.2012, 19:36 
@ODemuth
Yes, you're right. The position for the "attached" object is easy, but the direction was the problem. I think I've fixed that now.

@USSR_GRAND
You can find my attempt in the attached file in this post. The light position isn't quite right yet so I disabled the shadows but you can make your own adjustments if you want to.

INSTRUCTIONS:
1. Unzip the XML file in your Prefabs folder.
2. In your level, open the prefab library called custom_playerflashlight.xml
3. Place it anywhere inside the level.
4. Extract all the components.
5. Link the playerFlashLight and playerFlashLightFill lights to the playerFlashLightProxy tagpoint.
6. Play the game. The key "k" activates/deactivates the flashlight :D

Notes:
-Haven't checked yet, but I think it works only inside the editor for now ^^u
-If your level is outdoors you will need to enclose it using invisible solids. Otherwise when you look at the sky the raycast won't hit anything and the flashlight won't update its direction, looking weird / wrong.
Attachments:

custom_playerflashlight.zip
[2.67 KiB]
Downloaded 104 times
User avatar   Trainee TraineeMember since: 30.07.2011, 17:48Posts: 142Location: adelaide Australia Likes: 0
 

 Post Topic: Re: [Crysis 2] Helmet-mounted flashlight
PostPosted 27.05.2012, 10:08 
hey, sorry but exactly where do i put this custom_playerflashlight.xml file to?
under gamecrysis2?

is it like taking the helmet flashlight file and instead of linking all the pieces just the two you mention and linking these to the main prefab??

i really want to make my own light like in USSR_GRAND's video!


My all new Professional Portfolio is here.. Take a visit here to get into the mindset that is me!

http://www.wix.com/dragonborn82develope ... portfolio#!
User avatar   Experienced Modder Experienced ModderMember since: 18.08.2011, 15:08Posts: 523Location: Canada Likes: 2
 

 Post Topic: Re: [Crysis 2] Helmet-mounted flashlight
PostPosted 27.05.2012, 14:00 
1. Open the PAK manager.
2. Open GameData.pak
3. Add the file to GameData
4. Open Database view.
5. Click on prefabs and locate your .xml

Hope it helped!


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   Trained Modder Trained ModderMember since: 23.09.2011, 02:21Posts: 398 Likes: 48
 

 Post Topic: Re: [Crysis 2] Helmet-mounted flashlight
PostPosted 27.05.2012, 15:48 
@coheed82
You could use VokusX's method, but an easier way is just to create a folder called "Prefabs" inside gamecrysis2 and put the file in there.

The prefab consists of three files:
-playerFlashLight.
-playerFlashLightFill (this one is optional, you can disable/delete it if you want).
-playerFlashLightProxy.

The first two should be linked to the last one, which will be then synchronized with the player's position and direction via flowgraph automatically when you're in-game. I linked them to offset their positions relative to the player because while it could be done in flowgraph, it would require vector math at which I completely suck. Linking them to the proxy is just easier xD
User avatar   Trainee TraineeMember since: 30.07.2011, 17:48Posts: 142Location: adelaide Australia Likes: 0
 

 Post Topic: Re: [Crysis 2] Helmet-mounted flashlight
PostPosted 28.05.2012, 08:24 
Thankyou very much to VokusX and to OCASM!
yeah it works, i just put the file in the new "prefabs" folder under gamecrysis2.. also i put it in the gamedata.pak as well. it came up with a window though regarding said file being added to the gamedata.pak
something about it being added to the MOD folder.. i guess i'll have to add the custom_playerFlashLight.xml into my MOD folder of my level for when im ready to ship it out. Of course you two will be in the credits of my map.

i admit it i've actually begun work on a new map.. kind of a side project from the one im currently showing on the cryengine 3 forum.. as we all know we get better as we go, and as such this new "secret" map has me blown away, let alone what you guys may think when you see it :) thanks again.


My all new Professional Portfolio is here.. Take a visit here to get into the mindset that is me!

http://www.wix.com/dragonborn82develope ... portfolio#!
User avatar   Trained Modder Trained ModderMember since: 23.09.2011, 02:21Posts: 398 Likes: 48
 

 Post Topic: Re: [Crysis 2] Helmet-mounted flashlight
PostPosted 31.05.2012, 04:57 
I'll be looking forward to see it :)
User avatar   Experienced Modder Experienced ModderMember since: 18.08.2011, 15:08Posts: 523Location: Canada Likes: 2
 

 Post Topic: Re: [Crysis 2] Helmet-mounted flashlight
PostPosted 31.05.2012, 21:23 
No problem, always happy to help a fellow forum member!


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   Trainee TraineeMember since: 30.07.2011, 17:48Posts: 142Location: adelaide Australia Likes: 0
 

 Post Topic: Re: [Crysis 2] Helmet-mounted flashlight
PostPosted 09.06.2012, 07:48 
hey vokusX & OCASM, that map i was talking about is here :
on the main cryengine 3 forums under levels.. look for Project Apocalypse! thanks ;)


My all new Professional Portfolio is here.. Take a visit here to get into the mindset that is me!

http://www.wix.com/dragonborn82develope ... portfolio#!
  Beginner BeginnerMember since: 30.07.2012, 08:54Posts: 2 Likes: 0
 

 Post Topic: Re: [Crysis 2] Helmet-mounted flashlight
PostPosted 31.07.2012, 22:53 
Hey i love the idea and id love to give u credit it my map but i cant seem to get the custom player flashlight to work. I am new so it is probably something simple that i cannot see and id be grateful if u could help me. So i got the 3 files in the prefab into the game by extracting them all and i linked playerflashlightfill to the playerflashlightproxy but it would not let me select the playerflashlight so that i could link it again to the playerflashlightproxy ik its prob something simple but thanks in advance and the flashlight looks amazing xD
User avatar   Trained Modder Trained ModderMember since: 23.09.2011, 02:21Posts: 398 Likes: 48
 

 Post Topic: Re: [Crysis 2] Helmet-mounted flashlight
PostPosted 01.08.2012, 21:57 
You're in luck. I just discovered that you can in fact make prefabs out of linked objects. Just select the parent and only the parent when you make the prefab. If you select the children it won't work.

So, given that, here are updated versions of the prefabs. You don't have to manually link all the components anymore!

Here are the updated instructions on how to use them:

For the AI flashlight:

1. Place the flashLightHeadA.pak file inside the gamecrysis2 folder.
2. In your level, open the prefab library called CUSTOM.xml.
3. Place the flashLightHeadA prefab next to a soldier and extract it all.
4. Link the flashLightHeadAProxy to the AI you want it to be attached to.
5. Go to the flashLightHeadAProxy flowgraph and assign the chosen soldier to the only unassigned flownode.
6. That's it! After that you can just copy the soldier and all the attached parts will be copied as well. If you just want to copy the flashlight, just unlink it from the soldier.

For the player flashlight:

1. Make a folder named "Prefabs" inside your GameCrysis2 directory. It can be your mod's or the standard one.
2. Unzip the file "custom_playerflashlight.xml" inside it.
3. In your level, open the prefab library called custom_playerflashlight.xml
3. Place the prefab anywhere inside the level.
4. That's it. You don't have to extract anything unless you want to make modifications to the lights.
Attachments:

custom_playerflashlight_linked.zip
[2.66 KiB]
Downloaded 82 times
flashLightHeadA_linked.pak
[6.63 KiB]
Downloaded 64 times