|
|
| Max Payne 2 : Max Payne 2 Modding : [MP2] Usable Flashlight |
[Forum Rules] |
| Zioko |
Posted 12th May 2006 12:39pm |
L4Y Member Post 2 / 17
 |
Heyho Community!
I'm working on a mod ATM and got stuck.
I added a new weapon, and its supposed to be or work/behave as a flashlight.
Its a weapon, no secondary weapon, means you cant weild another weapon while holding the flashlight.
The problem is, i dont know how to add a light to it, since the flashlight is supposed to cast a light(spot) at the pointingdirection, or if not possible, a "light cube".
The light should be always "on" when u equip the flashlight, not by shooting.
Any help would be very nice. Thanks!
[EDIT:]
Ok, i made some progress, i know how to add a light (particle fx) to the flashlight now, but the problems continue!
Here's a the important part of the weapon txt file:
[Animationset]
{
[Animation] Index = WEAPONANIM_DEFAULT; Filename = "..FlashlightFlashlight_L0.kf2";
[Properties]
{
[Message] Frame = 0; String = "this->PS_StartEffect ( flashlight, "" );";
[Message] Frame = 0; String = "this->A_Play3DSound( weapons, flashlight, "" );";
}
[Animation] Index = WEAPONANIM_SHOOT; Filename = "..FlashlightFlashlight_L0.kf2";
[Properties]
{
}
[Animation] Index = WEAPONANIM_PLAYERSHOOT; Filename = "..FlashlightFlashlight_L0.kf2";
[Properties]
{
}
[Animation] Index = WEAPONANIM_RELOAD; Filename = "..FlashlightFlashlight_L0.kf2";
[Properties]
{
}
[Animation] Index = WEAPONANIM_SHOOTEMPTY; Filename = "..FlashlightFlashlight_L0.kf2";
[Properties]
{
}
[Animation] Index = WEAPONANIM_DROPONDEATH; Filename = "..FlashlightFlashlight_L0.kf2";
[Properties]
{
}
}
I got a "PS Starteffect" (particlefx, the "light_8m") and a sound that should play, when the guy equips the flashlight.
Well, none of those 2 things are working, it wont cast any light, and it also wont play the sound, when using the "gun".
I recieve no errors, its just that it aint working! I also tested that "Flashlight"-particelfx ingame, its working, but not with my flashlight. It seams that no single commandline in my weapon txt (Flashlight.txt) is working, but my Flashlightmodel has 30fps, so i dont see any problem.
..i got nuts...
..please help...
..thanks |
| |
Modified May 12th, 05:17pm by Zioko |
|
| Zioko |
Posted 13th May 2006 6:25am |
L4Y Member Post 3 / 17
 |
Well, i already looked in the KungFu3.0 deluxe edition mod for MaxPayne, this had a flare, this is where i got my reference from.
Like i said, the code is already there, and i see no mistake, so it should work. I dont see any problem with the code in the weapon txt, and no problem in the particle.txt, and the effect is also working. But somehow it wont work with my model, i even applied the original beretta model to my flashlight-"weapon" but it wont work...
Any advice guys? |
|
|
| JimmyCognitti |
Posted 13th May 2006 6:41am |  |
L4Y Member Post 129 / 400
 |
You might want to take a look at LightSaber4 for MP1, that mod has wonderful dynamic lighting management, it may help you a little (I think).
BTW, are you the same Zioko who released "Assazins mod" and "The Animatrix Beta" for MP1 a couple of years a go??
|
| Hey, catch me later, I'll buy you a beer. |
|
|
| Zioko |
Posted 13th May 2006 6:52am |
L4Y Member Post 4 / 17
 |
| Quoting JimmyCognitti | You might want to take a look at LightSaber4 for MP1, that mod has wonderful dynamic lighting management, it may help you a little (I think).
BTW, are you the same Zioko who released "Assazins mod" and "The Animatrix Beta" for MP1 a couple of years a go??
|
Yup, thats just me I went through a lot of games, modding stuff, but maxpayne got me back 
I had a look into the lightsaber mod, its almost the same code i referenced from KF3.0de. The funny thing is, when i add my
[Message] Frame = 0; String = "this->PS_StartEffect ( flashlight, \"\" );"; code to the crouch animtion in the "Male_Player.h" file, and go crouch ingame, it works, my player casts a dynamic light then, but it wont work with the weapon. Like i said, somehow no message/command in my flashlight.txt is working, nothing gets sent... this is very weird...
[EDIT]:
Ok, i now tried decompiling some other mods which have new weapons to test this. I added the same lines i got in my flashlight.txt and added the particleFX, and guess what... i wont work either. Did Remedy maybe screw things up?
I so friggin need that light attached to my flashlight, otherwise... well, it wouldnt make any sense. |
| |
Modified May 13th, 07:04am by Zioko |
|
| JimmyCognitti |
Posted 13th May 2006 8:07am |  |
L4Y Member Post 130 / 400
 |
Wow!! it's nice to have you back to the Max Payne universe
I've played some of UR mods (I specially loved "Assazins mod") and I must say you're great at doing cool animations.
BTW, what happened to UR "Focus" mod for MP1??
Anyways, keep on working on that flashlight FX, it'll work sooner or later.
Just don't give up dude
|
| Hey, catch me later, I'll buy you a beer. |
Modified May 13th, 08:10am by JimmyCognitti |
|
| Onemanshow |
Posted 13th May 2006 8:31am |
L4Y Member Post 20 / 26
 |
Try puting the light and sound code on your flashlight shooting animation, This is how the KF3.0de mod did there flashlight. |
|
|
| Zioko |
Posted 13th May 2006 8:38am |
L4Y Member Post 5 / 17
 |
@JimmyCognitti: Glad to hear that Well, after my HD with MaxPayne on it crashed, i lost all my data... it was a kool start, since i made new anims and lots of other stuff for the mod... but oh well, its gone
| Quoting Onemanshow | | Try puting the light and sound code on your flashlight shooting animation, This is how the KF3.0de mod did there flashlight. |
DAMN! The easiest way... yeah this will defenetly work!!! I dont know why i havent came up with that... man... your a genius, thx! 
[EDIT]:
K, got it working. By pressing fire, when u got the flashlight, you turn it on, by switching to another weapon, it'll get turned off... that easy And you can still do "meele" with it, hehe.
I even got rid of the flickering, yay!
Thats it, its finaly working, thanks to Onemanshow, you saved the day |
| |
Modified May 13th, 09:25am by Zioko |
|
|
|