Old 01-11-2009   #1
HouseMD
Registered User
 
HouseMD's Avatar
 
Join Date: Jan 2009
Posts: 26
HouseMD is an unknown quantity at this point
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?
__________________
Everyone lies...

Last edited by HouseMD; 01-11-2009 at 10:24 AM.. Reason: auto-merged double post
HouseMD is offline   Reply With Quote
Old 01-11-2009   #2
rappo
Professional Dumbass
 
rappo's Avatar
 
Join Date: Aug 2003
Location: Los Angeles
Posts: 6,986
rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.
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.
__________________
rappo is offline   Reply With Quote
Old 01-11-2009   #3
HouseMD
Registered User
 
HouseMD's Avatar
 
Join Date: Jan 2009
Posts: 26
HouseMD is an unknown quantity at this point
well i got the type to work, it pretty much makes an explosion no matter what u put in those 5 parameters... Its wierd

i found out 0 = granade, 1 = molotov, 2 = rpg etc
__________________
Everyone lies...

Last edited by HouseMD; 01-11-2009 at 03:27 PM..
HouseMD is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 09:28 AM.