Rapier Posted March 11, 2012 Share Posted March 11, 2012 Hello guys! Well, I'm doing a script and is necessary to create an object to create some coordinates from this object. As VC does not have an opcode to let objects invisible, I need the name of the smallest object possible (or some way to make it invisible). Could anyone help me? Thanks! Link to comment Share on other sites More sharing options...
DK22Pac Posted March 11, 2012 Share Posted March 11, 2012 Tell more about your idea, I believe its possible to do what you want without objects. Link to comment Share on other sites More sharing options...
Michael.Knight1 Posted March 11, 2012 Share Posted March 11, 2012 Hello guys! Well, I'm doing a script and is necessary to create an object to create some coordinates from this object. As VC does not have an opcode to let objects invisible, I need the name of the smallest object possible (or some way to make it invisible). Could anyone help me? Thanks! You don't can put object invisible in gta VC Link to comment Share on other sites More sharing options...
Rapier Posted March 11, 2012 Author Share Posted March 11, 2012 @DK22Pac: Well, I'm making a partial conversion of my old mod GTAVC PMM. Take a look at the script: {$CLEO .S}thread 'FIREBLL'Model.Load(#GRENADE)038B: load_requested_models :LabelFireballif not Model.Available(#GRENADE)jf @LabelFireball01 wait 0jump @LabelFireball:LabelFireball0104C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset 0.0 0.0 0.00172: [email protected] = actor $PLAYER_ACTOR z_angle 0107: [email protected] = create_object #GRENADE at [email protected] [email protected] [email protected]: set_object [email protected] collision_detection 0 0177: set_object [email protected] z_angle_to [email protected] 0372: set_actor $PLAYER_ACTOR anim 31 wait_state_time 1000 [email protected] = 0 wait [email protected] = 0 // Contador [email protected] = 1.75 // Offset do ângulo [email protected] = 0 // Flag para destrancar o [email protected] = 0 // Flag de explosãojump @LabelFireball03:LabelFireball02wait 0if and [email protected] > 1000 [email protected] == 0jf @[email protected] = 1Player.CanMove($PLAYER_CHAR) = true:LabelFireball03if [email protected] == 0jf @LabelFireball06 [email protected] += [email protected] += 0.250400: create_coordinate [email protected] [email protected] [email protected] from_object [email protected] offset 0.0 [email protected] 0.0 024F: create_corona 2.0 2.0 2.0 with_color 255 0 0 at_point [email protected] [email protected] [email protected] 0437: scatter_particle 61 0.0 at [email protected] [email protected] [email protected] 0.0 0.0 0.0 if 8339: not objects_in_cube [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] 0 1 1 0 0 jf @LabelFireball04 if [email protected] > 499 jf @LabelFireball02 //0006: [email protected] = 10437: scatter_particle 42 0.0 at [email protected] [email protected] [email protected] 0.0 0.0 0.0jump @LabelFireball05:LabelFireball040006: [email protected] = 1020C: create_explosion_with_radius 10 at [email protected] [email protected] [email protected] :LabelFireball05Model.Destroy(#GRENADE)Object.Destroy([email protected])Object.RemoveReferences([email protected]):LabelFireball06 if [email protected] == 1jf @LabelFireball0205DC: end_custom_thread This script creates an energy ball that explodes when it finds vehicles or peds. To create the coordinates of this energy ball I need an object. In SA, this method works perfect because there is an opcode to make the object invisible. I think the only way is to use a very small object. @Michael.Knight1: Dude, that I already know! Link to comment Share on other sites More sharing options...
DK22Pac Posted March 11, 2012 Share Posted March 11, 2012 So, why do you need object? You can do it in this way. 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 [email protected] 0.0 Link to comment Share on other sites More sharing options...
Rapier Posted March 11, 2012 Author Share Posted March 11, 2012 @DK22Pac: That's the way I did years ago, the only problem is that you have to lock the player position to not alter the trajectory of the energy ball. So if you create an object to create the trajectory of the energy ball, you do not need to lock the player, you understand? Link to comment Share on other sites More sharing options...
DK22Pac Posted March 11, 2012 Share Posted March 11, 2012 Ok. Then, store actor's matrix (64 bytes) to buffer, and use .exe procedure to get offset from matrix. Link to comment Share on other sites More sharing options...
Rapier Posted March 11, 2012 Author Share Posted March 11, 2012 Sounds easy, but I have no idea how to do this... Link to comment Share on other sites More sharing options...
DK22Pac Posted March 11, 2012 Share Posted March 11, 2012 (edited) Just need to find RwV3dTransformPoints adress... I haven't Vice's idb and can't download it now (link is broken). constRwV3dTransformPoints = 0x...end// store actor's matrix to buffer - use it when player pressed key to throw ball05E6: [email protected] = actor $PLAYER_ACTOR [email protected] += 405F7: [email protected] = label @matrix offsetfor [email protected] = 0 to 15 05E0: [email protected] = read_memory [email protected] size 4 virtual_protect 0 05DF: write_memory [email protected] size 4 value [email protected] virtual_protect 0 [email protected] += 4 [email protected] += 4end//// get offset from matrix05F8: [email protected] = var [email protected] [email protected] = 0.0 // X offset// [email protected] is Y [email protected] = 0.0 // Z offset05F7: [email protected] = label @matrix offset05E1: call RwV3dTransformPoints num_params 4 pop 4 [email protected] 1 [email protected] [email protected]//:matrixhex00000000 00000000 00000000 0000000000000000 00000000 00000000 0000000000000000 00000000 00000000 0000000000000000 00000000 00000000 00000000end Edit: found it, wait for few mins Edited March 11, 2012 by DK22Pac Link to comment Share on other sites More sharing options...
Rapier Posted March 11, 2012 Author Share Posted March 11, 2012 Man, my brain will begin to fry with it... Link to comment Share on other sites More sharing options...
DK22Pac Posted March 11, 2012 Share Posted March 11, 2012 (edited) Ok, I'll make that as scm-functions. :getOffsetFromPlayerMatrix{Example:05F5: call_scm_func @getOffsetFromPlayerMatrix params_count 3 ofssets 0.0 [email protected] 0.0 store_to [email protected] [email protected] [email protected]}05F8: [email protected] = var [email protected] offset05F7: [email protected] = label @matrix offset05E1: call 0x647160 num_params 4 pop 4 [email protected] 1 [email protected] [email protected]: ret 3 [email protected] [email protected] [email protected]:storePlayerMatrix{Example:05F5: call_scm_func @storePlayerMatrix params_count 0}05E6: [email protected] = actor $PLAYER_ACTOR [email protected] += 405F7: [email protected] = label @matrix offset05E3: call_method 0x4DF8F0 struct [email protected] num_params 1 pop 0 [email protected]: ret 0:matrixhex00000000 00000000 00000000 0000000000000000 00000000 00000000 0000000000000000 00000000 00000000 0000000000000000 00000000 00000000 00000000end Edited March 11, 2012 by DK22Pac Link to comment Share on other sites More sharing options...
Rapier Posted March 11, 2012 Author Share Posted March 11, 2012 This is really impressive, but as I'll add this in my script??? Link to comment Share on other sites More sharing options...
DK22Pac Posted March 11, 2012 Share Posted March 11, 2012 Put it after 05DC: end_custom_thread Link to comment Share on other sites More sharing options...
xNCx Posted March 11, 2012 Share Posted March 11, 2012 Didn't read the whole topic, but if you need the smallest object, you should have a look at #FAKETARGET id 377. Link to comment Share on other sites More sharing options...
DK22Pac Posted March 11, 2012 Share Posted March 11, 2012 Also try 05E8: [email protected] = object [email protected] [email protected] += 0x5005DF: write_memory [email protected] size 1 value 0 virtual_protect 0 // clear all flags for object Link to comment Share on other sites More sharing options...
Rapier Posted March 11, 2012 Author Share Posted March 11, 2012 Put it after 05DC: end_custom_thread Ok, I'll try... @krasiejow: Thank you! Link to comment Share on other sites More sharing options...
Rapier Posted March 11, 2012 Author Share Posted March 11, 2012 sh*t, the game crashes... What is wrong? {$CLEO .S}thread 'FIREBLL'05F5: call_scm_func @LabelStorePlayerMatrix params_count [email protected] = 0 wait [email protected] = 0 // Contador [email protected] = 1.75 // Offset do ângulo [email protected] = 0 // Flag para destrancar o [email protected] = 0 // Flag de explosãojump @LabelFireball03:LabelFireball02wait 0if and [email protected] > 1000 [email protected] == 0jf @[email protected] = 1Player.CanMove($PLAYER_CHAR) = true:LabelFireball03if [email protected] == 0jf @LabelFireball06 [email protected] += [email protected] += 0.2505F5: call_scm_func @LabelGetOffSetFromPlayerMatrix params_count 3 offsets 0.0 [email protected] 0.0 store_to [email protected] [email protected] [email protected]: create_corona 2.0 2.0 2.0 with_color 255 0 0 at_point [email protected] [email protected] [email protected] 0437: scatter_particle 61 0.0 at [email protected] [email protected] [email protected] 0.0 0.0 0.0 if 8339: not objects_in_cube [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] 0 1 1 0 0 jf @LabelFireball04 if [email protected] > 499 jf @LabelFireball02 //0006: [email protected] = 10437: scatter_particle 42 0.0 at [email protected] [email protected] [email protected] 0.0 0.0 0.0jump @LabelFireball05:LabelFireball040006: [email protected] = 1020C: create_explosion_with_radius 10 at [email protected] [email protected] [email protected] :LabelFireball05Model.Destroy(377)Object.Destroy([email protected])Object.RemoveReferences([email protected]):LabelFireball06 if [email protected] == 1jf @LabelFireball0205DC: end_custom_thread:LabelGetOffSetFromPlayerMatrix{Example:05F5: call_scm_func @GetOffSetFromPlayerMatrix params_count 3 offsets 0.0 [email protected] 0.0 store_to [email protected] [email protected] [email protected]}05F8: [email protected] = var [email protected] offset05F7: [email protected] = label @LabelMatrix offset05E1: call 0x647160 num_params 4 pop 4 [email protected] 1 [email protected] [email protected]: ret 3 [email protected] [email protected] [email protected]:LabelStorePlayerMatrix{Example:05F5: call_scm_func @StorePlayerMatrix params_count 0}05E6: [email protected] = actor $PLAYER_ACTOR [email protected] += 405F7: [email protected] = label @LabelMatrix offset05E3: call_method 0x4DF8F0 struct [email protected] num_params 1 pop 0 [email protected]: ret 0:LabelMatrixhex00000000 00000000 00000000 0000000000000000 00000000 00000000 0000000000000000 00000000 00000000 0000000000000000 00000000 00000000 00000000end Link to comment Share on other sites More sharing options...
Juarez Posted March 11, 2012 Share Posted March 11, 2012 Edit: found it, wait for few mins biggrin.gif where? Link to comment Share on other sites More sharing options...
DK22Pac Posted March 11, 2012 Share Posted March 11, 2012 @Rapier Idunno, I can't check it cause I havent Vice City. So try other method, with object flags. And you forgot to delete all parts of code where [email protected] used. @juarez I told about vc.exe database for IDA. Link to comment Share on other sites More sharing options...
Rapier Posted March 11, 2012 Author Share Posted March 11, 2012 @DK22Pac: Thank you for help and also for the attention. But the hint of krasiejow worked well. The object 377 is invisible. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now