Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
AiRBLaDE

hand grenade problem

Recommended Posts

whenever I throw a hand grenade it automatically disappears and there is no explosion or nothing. I go through the animations of throwing it, but then nothing happens. I am running a mod when this happened. But what I want to know if this is a problem with the config.bin and what can I fix in this file to make the hand grenades work?

Sorry if this has already been asked, I didnt see it when I looked.

Share this post


Link to post
Share on other sites
Quote[/b] ] I am running a mod when this happened.

I would think that you should ask the specific mod's creators about this problem.

Share this post


Link to post
Share on other sites

It's not something as simple as cloudlets disabled is it? If not I'd suggest removing all addons except for official stuff and see if they work again, if so return the addons a few at a time until you track down the one causing a problem smile_o.gif

Share this post


Link to post
Share on other sites

well, I know its a problem with the config.bin file because when I deleted that from my mod folder and I started the game up, after I went into mission editor, the hand grenades did work.  

And I just did replace the cfgcloudlets in the config.bin file of my mod with the settings from the original config.bin and there is still this handgrenade problem.

So it has something to do with the config file.

also: I dont know if this may help but when I go prone on the ground and throw the handgrenade at myself, it does blow up.  But when I throw it in the air, it disappears and nothing happens.

edit: Also, I am the creator of this mod which replaces the original game units. I know its not a problem with the addons because the first few versions I made of this mod, the hand grenades did work. But after I added some special effects to the config file they stopped working...

Share this post


Link to post
Share on other sites

Are you running the Y2K3 mod?

If so, download the full installer 7.1 not the patch. The patch doesn't work with the grenades.

I had the exact same problem.

Share this post


Link to post
Share on other sites

its not Y2k3, its a mod I made, but similar to it. And, I dont want to use any hand grenade addons to make this work either. I just wanted to fix the original default hand grenades to work. Ill download 7.1 full of Y2k3 and look at the config file they use.

But if anyone has any other ideas for how I can fix this please do tell me.

Share this post


Link to post
Share on other sites
its not Y2k3, its a mod I made, but similar to it. And, I dont want to use any hand grenade addons to make this work either. I just wanted to fix the original default hand grenades to work. Ill download 7.1 full of Y2k3 and look at the config file they use.

But if anyone has any other ideas for how I can fix this please do tell me.

By any chances, are you trying to implement KTE delayed grenades ?

If you made a mistake when implementing them, the grenade will disappear when launched and nothing more will happen.

Share this post


Link to post
Share on other sites
Quote[/b] ]By any chances, are you trying to implement KTE delayed grenades ?

If you made a mistake when implementing them, the grenade will disappear when launched and nothing more will happen.

Nope, I didnt try using KTE grenades.

Share this post


Link to post
Share on other sites

I said KTE, because he is the first one to make functionning delayed grenade script, but it can be another kind of script creating delayed grenade.

So let's adapt to a more generic question : are you using delayed grenades scripting ?

Or are you using any kind of scripts changing something to the grenade by some "fired" eventhandler in your config for the civilian/soldier classes ?

Share this post


Link to post
Share on other sites

it turns out, I actually did have the delayed hand grenade script in the config file. It was under eventhandlers, just like you said sanctuary which said :

_this exec ""\Nmod_Effects\fuseinit.sqs"""

after I took out that line and I started up the game, it miracioulously worked! Thanks for your help.

Lets say I wanted to get that script to work in the game? What would I have to do? wink_o.gif

Share this post


Link to post
Share on other sites

This is how i have it working on a personnal config, using a modified version of KTE grenade scripts

In my config, i have , after the

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class SmokeShellRed:SmokeShell

{

smokeColor[]={1,0.25,0,0};

};

class SmokeShellGreen:SmokeShell

{

smokeColor[]={0.2,0.8,0.2,0};

};

added the following :

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class KTE_Grenade : SmokeShell

{

displayName = "Frag. grenade";

soundFly[]={"\DTA\Sound\Weapons\grenade_launch.wss",0.000100,1};

model="handgrenade.p3d";

picture="\DTA\dtaext\equip\m\m_handgrenade.paa";

class Smoke

{

interval=0.40000;

cloudletDuration=5;

cloudletAnimPeriod=1.000000;

cloudletSize=2.500000;

cloudletAlpha=0.0;

cloudletGrowUp=1.0;

cloudletFadeIn=0;

cloudletFadeOut=0;

cloudletAccY=-0.100;

cloudletMinYSpeed=0.2;

cloudletMaxYSpeed=0.750;

cloudletShape="cl_basic";

cloudletColor[]={1,1,1,0};

initT=1000;

deltaT=-500;

maxT=0;

class Table

{

class T1 {maxT = 0; color[] = {0.7, 0.7, 0.7, 0};}

class T2 {maxT = 1000; color[] = {0.4, 0.4, 0.4, 0};}

};

density=0;

size=1.100000;

initYSpeed=0.700000;

timeToLive=90;

in=3.000000;

out=0.000000;

};

};

On the class Man:Land

i have at the end of this class Man:Land definition added the following :

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class EventHandlers

{

fired="_this exec ""\grendelay\men_fired.sqs""";

};

In my \privatemod\Addons folder i have a .pbo named grendelay.pbo

inside of it i have a men_fired.sqs that is

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_a = _this select 4

_grenaded = ["GrenadeHand"]

?_a in _grenaded : _this exec "\grendelay\fuseinit.sqs"

exit

and a fuseinit.sqs that is , based on KTE and ECP version :

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _this select 0

_weapon = _this select 1

_muzzle = _this select 2

_mode = _this select 3

_ammo = _this select 4

?!(local _unit): exit

? _weapon != "Throw": exit

~0.01

_nade = nearestObject [_unit,_ammo]

_velocity = velocity _nade

_position = getpos _nade

_nade setpos [_position select 0, _position select 1, 1000]

_nade setvelocity [0,0,100]

_newgrenade = "KTE_Grenade" createVehicle _position

_newgrenade setvelocity _velocity

_fuse = 5

_gl = "logic" camCreate getpos _newgrenade

#height_check

?(_time > _fuse): goto "air_explosion"

? velocity _newgrenade select 2 == 0: goto "next"

_gl setpos getpos _newgrenade

~0.01

goto "height_check"

#next

_logic = "logic" camCreate [0,0,0]

_x = getpos _gl select 0

_y = getpos _gl select 1

_dist = _logic distance _gl

_ground = (_x ^ 2) + (_y ^ 2)

deleteVehicle _logic

_height = sqrt ((_dist ^ 2) - _ground)

#wait

~0.01

?(_time < _fuse): goto "wait"

_nade setvelocity [0,0,0]

_nade setpos [getpos _newgrenade select 0,getpos _newgrenade select 1,_height+1.8]

_nade setvelocity [0,0,-10000]

deleteVehicle _newgrenade

deleteVehicle _gl

exit

#air_explosion

_logic = "logic" camCreate [0,0,0]

_x = getpos _gl select 0

_y = getpos _gl select 1

_dist = _logic distance _gl

_ground = (_x ^ 2) + (_y ^ 2)

deleteVehicle _logic

_height = sqrt ((_dist ^ 2) - _ground)

_nade setpos [getpos _newgrenade select 0,getpos _newgrenade select 1,_height + 2]

_newgrenade setvelocity [0,0,0.01]

_nade setvelocity [0,0,(0-5000)]

@ isnull _nade

_possy = getpos _newgrenade

deleteVehicle _newgrenade

deleteVehicle _gl

_blast = "Explosion" createvehicle _possy

_smoke = "Crater" createvehicle _possy

exit

Copy paste and adapt it to your config needs, and it should work (for me it works perfectly)

Notice the line _fuse = 5 , modify this number to the delay before explosion after launching the grenade, i have set it to 5 seconds , but you can change it to what you want.

Share this post


Link to post
Share on other sites

Troubleshooting is not the right forum for solving problems caused because you've been messing around with the files, if you uninstall and then reinstall the problem should be solved, anything else that you've done which has caused the problem along the nature of creating your own addon/mod makes it more a thread for A&M:D smile_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×