Posted 08 January 2012 - 06:48 AM
What, or where can I find the correct function calls (with their params or at least some info) to fire the weapons?? For example:
If I want to "shoot" a rocket, I have to call 0x737C80 with 8 params: 0 4@ 1.0 8@ 7@ 6@ 19 0@, pop 8, and add this var to store some result: 1@. Something like this: 0AA7: call_function 0x737C80 params 8 pop 8 0 4@ 1.0 8@ 7@ 6@ 19 0@ 1@
But what about the other weapons? Or at least these: the AK47, the minigun, the chainsaw and the sawnoff...
I know you can help me... thanks !!!
Posted 08 January 2012 - 02:43 PM Edited by Deji, 08 January 2012 - 02:48 PM.
There are other related things. Can't be sure if they are called by CWeapon::Fire anyway or are called by something else (probably already called). But they could be useful if you need to only do certain parts of the gunshot...
CWeapon::DoBulletImpact - 0x73B550
A few functions call that. I think I identified one which is possibly for mounted guns on vehicles. You can start there to figure out what other steps to take including optionally using "?createLight" (0x7000E0) to create a gunfire flash effect and using particles to create a muzzle (or if you have an actual weapon created, you can also use the crappy DFF muzzle flash).
Also check out the code behind these opcodes:
| 06BC: create_M4_shoot_from 2193.268 -1165.441 1031.124 target $TEMPVAR_X_COORD $TEMPVAR_Y_COORD $TEMPVAR_Z_COORD energy 1|
058A: create_gun_flash_from 2193.268 -1165.441 1031.124 to $TEMPVAR_X_COORD $TEMPVAR_Y_COORD $TEMPVAR_Z_COORD
You should document your finds for the good of future you and other modders
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users