GTAGaming Forums

GTAGaming Forums (http://www.gtagaming.com/forums/index.php)
-   Grand Theft Auto IV Mods (http://www.gtagaming.com/forums/forumdisplay.php?f=318)
-   -   GTA IV - AddExplosion Command (http://www.gtagaming.com/forums/showthread.php?t=112553)

HouseMD 01-11-2009 08:59 AM

GTA IV - AddExplosion Command
 
I am using aru's C++ Hook and am trying to make an explosion... It is defined like this in Scripting.h: AddExplosion(f32 x, f32 y, f32 z, u32 p3, f32 p4, u32 p5, u32 p6, f32 p7). I understand up to "f32 z" and don't know what the others past it mean?!?! Does anyone know?

I did some experiments and give you this:

AddExplosion(f32 x-coordinate,f32 y-coordinate,f32 z-coordinate,u32 explosiontype,f32 unsure,u32 unsure,u32 TurnEnvironmentEffectOff,f32 unsure)

explosiontype:
The type of explosion you wish to create. 1 is motolov for example and 2 is some explosion as is 0


TurnEnvironmentEffectOff:
turn off any effects to environment but create explosion. 0 is on - 1 is off.
if it is on you see flames and rocks flying as it blows, otherwise just a explosion with flames appearing on the floor and nowhere else this also affects peds and cars.

unsure:
I cannot tell what these are for, i tried setting them to 0,1 and 120 and they have made no difference for the explosion. Maybe one of them is an ignore option?

rappo 01-11-2009 11:26 AM

Usually if I don't know the parameters of a function, what I do is I go into SparkIV and check out .sco files in script.img to seehow Rockstar used the function. You have to think of a mission where they might have used something like this and then go check it out.

In ray3.sco, you will see this line:
Code:

ADD_EXPLOSION(-267.1f, 751.29f, 11.63f, 0, 0.5f, 0, 1, 0.0f);
Now I have no idea what those last five values are, but you could duplicate them and put your own coordinates for the first three, and see what happens.

HouseMD 01-11-2009 03:24 PM

well i got the type to work, it pretty much makes an explosion no matter what u put in those 5 parameters... Its wierd :P

i found out 0 = granade, 1 = molotov, 2 = rpg etc


All times are GMT -6. The time now is 05:55 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.