#1 11-01-2009 05:06

TDKKnightProwlTDK
From: Jewell Ridge, VA
Registered: 02-11-2008
Posts: 2

TITANIC: The Mod - help needed

hello, my name is knightprowl from GTAforums, i am making a mod about the Tianic in SA, so far ive got the BETA 2 ready, but now i need some assistance, im tring to make the titanic split into 2 parts, like in the movie, i have the code almost done, but idk how to do this exactally correct, i will code this myself as i have so far, i just want a little bit of help, so i can finally release this mod and get it off my back, so please, anyone willing to tell me where i am wrong, please do this, cause once this is working im gonna release the mod again, for a BETA 2, so please, anyone willing to help me out, let me know on here, or through a PM on here or GTAforums, my name is knightprowl on both, anyways, here is the code below, all im tring to do is make the ship sink like it did in the movie, to go up at an angle, then break into 2 parts, then both go verticall and then sink, thats all im asking, the rest is good except the sinking, so anyways, thanks for thouse whom have looked and helped me so far, thanks and peace

KP

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007

{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------
03A4: name_thread 'TITANIC_SINK' 
0247: load_model 1207 
0247: load_model 1245 
0247: load_model #WMYPLT 
0247: load_model #WMOPREA 
0247: load_model #WMYCH 
0247: load_model #WMYRI 
0247: load_model #SWFYRI 
0247: load_model #BFYRI 
0247: load_model #HFYRI 
0247: load_model #OMYRI 
0247: load_model #WFYRI 
0247: load_model #WMYBU 
0247: load_model #SBFYRI 
0247: load_model #SWMYRI 
0247: load_model #OFYRI 
038B: load_requested_models 

:TITANIC_SINK_88
0001: wait 0 ms 
00D6: if 
0248:   model 1207 available 
0248:   model 1245 available 
0248:   model #WMYPLT available 
0248:   model #WMOPREA available 
0248:   model #WMYCH available 
0248:   model #WMYRI available 
0248:   model #SWFYRI available 
0248:   model #BFYRI available 
0248:   model #HFYRI available 
0248:   model #OMYRI available 
0248:   model #WFYRI available 
0248:   model #WMYBU available 
0248:   model #SBFYRI available 
0248:   model #SWMYRI available 
0248:   model #OFYRI available 
004D: jump_if_false @TITANIC_SINK_88 
0107: 22@ = create_object 1207 at 878.1075 -3398.907 -11.77466 
0107: 23@ = create_object 1245 at 878.1075 -3398.907 -11.77466 
066D: 24@ = attach_particle "PRT_SMOKE_HUGE" to_object 22@ with_offset 0.0 66.056 62.272 flag 1 
066D: 25@ = attach_particle "PRT_SMOKE_HUGE" to_object 22@ with_offset 0.0 30.055 62.272 flag 1 
066D: 26@ = attach_particle "PRT_SMOKE_HUGE" to_object 22@ with_offset 0.0 -7.667 62.272 flag 1 
01BC: put_object 22@ at 878.1075 -3398.907 -11.77466 
01BC: put_object 23@ at 878.1075 -3398.907 -11.77466 
0177: set_object 22@ Z_angle_to 181.138 
0177: set_object 23@ Z_angle_to 181.138 
0750: set_object 22@ visibility 0 
0750: set_object 23@ visibility 0 
009A: 1@ = create_actor_pedtype 5 model #SBFYRI at 873.5859 -3293.896 15.6146 
009A: 2@ = create_actor_pedtype 4 model #WMOPREA at 869.0507 -3310.413 11.86596 
009A: 3@ = create_actor_pedtype 4 model #WMYCH at 890.8004 -3325.061 14.8269 
009A: 4@ = create_actor_pedtype 4 model #WMYRI at 890.0822 -3346.798 22.17065 
009A: 5@ = create_actor_pedtype 5 model #SWFYRI at 889.5921 -3503.039 11.86596 
009A: 6@ = create_actor_pedtype 5 model #BFYRI at 885.6097 -3526.793 15.95133 
009A: 7@ = create_actor_pedtype 5 model #HFYRI at 889.4095 -3481.31 22.17065 
009A: 8@ = create_actor_pedtype 4 model #OMYRI at 892.1353 -3462.614 22.17065 
009A: 9@ = create_actor_pedtype 5 model #WFYRI at 864.3344 -3421.647 22.17065 
009A: 10@ = create_actor_pedtype 5 model #WMYBU at 862.4233 -3379.603 18.38159 
009A: 11@ = create_actor_pedtype 5 model #SBFYRI at 866.2266 -3371.089 22.17065 
009A: 12@ = create_actor_pedtype 4 model #WMOPREA at 867.1362 -3514.406 15.42831 
009A: 13@ = create_actor_pedtype 5 model #WMYCH at 881.8749 -3488.016 18.38159 
009A: 14@ = create_actor_pedtype 4 model #WMOPREA at 893.9373 -3459.789 18.38159 
009A: 15@ = create_actor_pedtype 4 model #WMYCH at 893.9152 -3411.491 18.38159 
009A: 16@ = create_actor_pedtype 4 model #WMYRI at 873.2083 -3279.758 19.54565 
009A: 17@ = create_actor_pedtype 5 model #SWFYRI at 885.9495 -3275.772 15.61596 
009A: 18@ = create_actor_pedtype 5 model #BFYRI at 872.2627 -3325.996 18.31909 
009A: 19@ = create_actor_pedtype 5 model #HFYRI at 874.3141 -3480.027 22.17065 
009A: 20@ = create_actor_pedtype 4 model #OMYRI at 886.0153 -3351.214 25.81909 
009A: 21@ = create_actor_pedtype 5 model #WMYBU at 869.8848 -3362.913 25.81909 
0337: set_actor 1@ visibility 0 
0337: set_actor 2@ visibility 0 
0337: set_actor 3@ visibility 0 
0337: set_actor 4@ visibility 0 
0337: set_actor 5@ visibility 0 
0337: set_actor 6@ visibility 0 
0337: set_actor 7@ visibility 0 
0337: set_actor 8@ visibility 0 
0337: set_actor 9@ visibility 0 
0337: set_actor 10@ visibility 0 
0337: set_actor 11@ visibility 0 
0337: set_actor 12@ visibility 0 
0337: set_actor 13@ visibility 0 
0337: set_actor 14@ visibility 0 
0337: set_actor 15@ visibility 0 
0337: set_actor 16@ visibility 0 
0337: set_actor 17@ visibility 0 
0337: set_actor 18@ visibility 0 
0337: set_actor 19@ visibility 0 
0337: set_actor 20@ visibility 0 
0337: set_actor 21@ visibility 0 

:TITANIC_SINK_1073
0001: wait 0 ms 
00D6: if 
0AB0:   key_pressed 9 
004D: jump_if_false @TITANIC_SINK_1073 
069A: attach_object 23@ to_object 22@ with_offset 0.0 0.0 0.0 rotation 0.0 0.0 0.0 
0750: set_object 22@ visibility 1 
0750: set_object 23@ visibility 1 
0337: set_actor 1@ visibility 1 
0337: set_actor 2@ visibility 1 
0337: set_actor 3@ visibility 1 
0337: set_actor 4@ visibility 1 
0337: set_actor 5@ visibility 1 
0337: set_actor 6@ visibility 1 
0337: set_actor 7@ visibility 1 
0337: set_actor 8@ visibility 1 
0337: set_actor 9@ visibility 1 
0337: set_actor 10@ visibility 1 
0337: set_actor 11@ visibility 1 
0337: set_actor 12@ visibility 1 
0337: set_actor 13@ visibility 1 
0337: set_actor 14@ visibility 1 
0337: set_actor 15@ visibility 1 
0337: set_actor 16@ visibility 1 
0337: set_actor 17@ visibility 1 
0337: set_actor 18@ visibility 1 
0337: set_actor 19@ visibility 1 
0337: set_actor 20@ visibility 1 
0337: set_actor 21@ visibility 1 
00C0: set_current_time_hours_to 23 minutes_to 45 
01B6: set_weather 15 
0006: 0@ = 301567 
0004: &0(0@,1i) = 30000 
0005: $X_ANGLE = 0.0 
0005: $Y_ANGLE = 0.0 
0005: $Z_ANGLE = 181.138 
0005: $XPOS = 878.1075 
0005: $YPOS = -3398.907 
0005: $ZPOS = -11.77466 

:TITANIC_SINK_1383
0001: wait 500 ms 
0453: set_object 22@ XY_rotation $X_ANGLE 0.0 angle $Z_ANGLE 
01BC: put_object 22@ at $XPOS $YPOS $ZPOS 
000D: $X_ANGLE -= 0.5 
000D: $ZPOS -= 0.5 
00D6: if 
8020:   not  $X_ANGLE > -30.0 
004D: jump_if_false @TITANIC_SINK_1383 
0001: wait 1000 ms 
0682: detach_object 23@ 1.0 1.0 1.0 collision_detection 0 
0453: set_object 23@ XY_rotation $X_ANGLE 0.0 angle $Z_ANGLE 
01BC: put_object 23@ at $XPOS $YPOS $ZPOS 
034D: rotate_object 23@ from_angle -30.0 to_angle 5.0 flag 0 
000D: $X_ANGLE -= 0.5 
000D: $ZPOS -= 0.5 
00D6: if 
0030:   $X_ANGLE >= 5.0 
004D: jump_if_false @TITANIC_SINK_1383 
0001: wait 1000 ms 
0453: set_object 22@ XY_rotation $X_ANGLE 0.0 angle $Z_ANGLE 
01BC: put_object 22@ at $XPOS $YPOS $ZPOS 
0453: set_object 23@ XY_rotation $X_ANGLE 0.0 angle $Z_ANGLE 
01BC: put_object 23@ at $XPOS $YPOS $ZPOS 
000D: $X_ANGLE -= 0.5 
000D: $ZPOS -= 0.5 
00D6: if 
0030:   $X_ANGLE >= -90.0 
004D: jump_if_false @TITANIC_SINK_1383 
0001: wait 5000 ms 
0453: set_object 22@ XY_rotation $X_ANGLE 0.0 angle $Z_ANGLE 
01BC: put_object 22@ at $XPOS $YPOS $ZPOS 
0009: $X_ANGLE += 0.5 
000D: $ZPOS -= 0.5 
00D6: if 
0030:   $X_ANGLE >= 0.0 
004D: jump_if_false @TITANIC_SINK_1383 
0249: release_model 1207 
0249: release_model 1245 
0249: release_model #WMYPLT 
0249: release_model #WMOPREA 
0249: release_model #WMYCH 
0249: release_model #WMYRI 
0249: release_model #SWFYRI 
0249: release_model #BFYRI 
0249: release_model #HFYRI 
0249: release_model #OMYRI 
0249: release_model #WFYRI 
0249: release_model #WMYBU 
0249: release_model #SBFYRI 
0249: release_model #SWMYRI 
0249: release_model #OFYRI 
00C0: set_current_time_hours_to 2 minutes_to 20 
0002: jump @TITANIC_SINK_88

"Its Not Who I Am Underneath...But What I Do...That Defines Me" "Why So Serious"

Offline

#2 01-03-2009 16:44

Seemann
Registered: 07-08-2006
Posts: 2,156

Re: TITANIC: The Mod - help needed

Dont use global variables.
Your if staments are way too big. Split them onto several shorter stamentes (maximum 8 conditions could be checked at one time).

Offline

Board footer

Powered by FluxBB