AB033 Posted July 3, 2009 Share Posted July 3, 2009 (edited) Hi. I want to put an actor at one place. I tried everything but actor just does not appear. Here is the code: // This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007DEFINE OBJECTS 1DEFINE OBJECT SANNY BUILDER 3.04 DEFINE MISSIONS 0DEFINE EXTERNAL_SCRIPTS 0 // Use -1 in order not to compile AAA scriptDEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 0{$VERSION 3.1.0027}//-------------MAIN---------------thread 'MAIN' fade 0 0 042C: set_total_missions_to 0 030D: set_max_progress 0 01F0: set_max_wanted_level_to 6 set_wb_check_to 0 00C0: set_current_time_hours_to 10 minutes_to 0 $7 = 0.0 $6 = 0.0 $5 = 30.0 04E4: unknown_refresh_game_renderer_at $7 $6 Camera.SetAtPos($7, $6, $5)062A: change_float_stat 165 to 999.0 062A: change_float_stat 23 to 999.0 062A: change_float_stat 21 to 0.0 062A: change_float_stat 163 to 999.0 062A: change_float_stat 160 to 999.0 062A: change_float_stat 229 to 999.0 062A: change_float_stat 223 to 999.0 062A: change_float_stat 230 to 999.0 0629: change_integer_stat 181 to 4 0629: change_integer_stat 68 to 0 $PLAYER_CHAR = Player.Create(#NULL, $7, $6, $5)07AF: $PLAYER_GROUP = player $PLAYER_CHAR group $PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)Camera.SetBehindPlayerActor.Angle($PLAYER_ACTOR) = 262.0set_weather 1 Player.SetClothes($PLAYER_CHAR, "BBALLJACKRSTAR", "BBJACK", Torso)Player.SetClothes($PLAYER_CHAR, "JEANSDENIM", "JEANS", Legs)Player.SetClothes($PLAYER_CHAR, "SNEAKERBINCBLK", "SNEAKER", Shoes)Player.SetClothes($PLAYER_CHAR, "PLAYER_FACE", "HEAD", Head)Player.Build($PLAYER_CHAR)select_interior 0 Player.CanMove($PLAYER_CHAR) = True01B7: release_weather 016C: restart_if_wasted_at $7 $6 $5 angle 0.0 town_number 0 Model.Load(#CHEETAH):MAIN_383wait 0 if Model.Available(#CHEETAH)else_jump @MAIN_383 $CHEETAH = Car.Create(#CHEETAH, $7, $6, $5)036A: put_actor $PLAYER_ACTOR in_car $CHEETAH fade 1 1000 wait 100 03E6: remove_text_box create_thread @MODEL :MAIN_449wait 500 jump @MAIN_449 end_thread :MODELthread 'MODEL' 014B: $PARKED_DUMPER = init_parked_car_generator #DUMPER color -1 -1 1 alarm 0 door_lock 0 0 10000 at 1.140753 433.1658 24.99462 angle 90.0 014C: set_parked_car_generator $PARKED_DUMPER cars_to_generate_to 101 end_thread Model.Load(#BFYST)038B: load_requested_models :MODEL_69if not Model.Available(#BFYST)else_jump @MODEL_95 wait 0 jump @MODEL_69 :[email protected] = Actor.Create(CivFemale, #BFYST, -24.74731, 263.198, 8.912769)Model.Destroy(#BFYST) What is the problem here? NOTE: I'm using Steve M's Map Cleaner. I made a map. Does that make a trouble? Edited July 5, 2009 by AB033 Link to comment Share on other sites More sharing options...
Dutchy3010 Posted July 3, 2009 Share Posted July 3, 2009 It doesn't spawn the actor because of the "end_thread" earlier: 014C: set_parked_car_generator $PARKED_DUMPER cars_to_generate_to 101end_threadModel.Load(#BFYST) After that the code stops of course. You have to use that end_thread code at the end of the thread to prevent crashes, though. DYOM - Create, play, share! Link to comment Share on other sites More sharing options...
AB033 Posted July 4, 2009 Author Share Posted July 4, 2009 I deleted all the "end threads", but the game does not crash but still there is no actor. // This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007DEFINE OBJECTS 1DEFINE OBJECT SANNY BUILDER 3.04 DEFINE MISSIONS 0DEFINE EXTERNAL_SCRIPTS 0 // Use -1 in order not to compile AAA scriptDEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 0{$VERSION 3.1.0027}//-------------MAIN---------------thread 'MAIN' fade 0 0 042C: set_total_missions_to 0 030D: set_max_progress 0 01F0: set_max_wanted_level_to 6 set_wb_check_to 0 00C0: set_current_time_hours_to 10 minutes_to 0 $7 = 0.0 $6 = 0.0 $5 = 30.0 04E4: unknown_refresh_game_renderer_at $7 $6 Camera.SetAtPos($7, $6, $5)062A: change_float_stat 165 to 999.0 062A: change_float_stat 23 to 999.0 062A: change_float_stat 21 to 0.0 062A: change_float_stat 163 to 999.0 062A: change_float_stat 160 to 999.0 062A: change_float_stat 229 to 999.0 062A: change_float_stat 223 to 999.0 062A: change_float_stat 230 to 999.0 0629: change_integer_stat 181 to 4 0629: change_integer_stat 68 to 0 $PLAYER_CHAR = Player.Create(#NULL, $7, $6, $5)07AF: $PLAYER_GROUP = player $PLAYER_CHAR group $PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)Camera.SetBehindPlayerActor.Angle($PLAYER_ACTOR) = 262.0set_weather 1 Player.SetClothes($PLAYER_CHAR, "BBALLJACKRSTAR", "BBJACK", Torso)Player.SetClothes($PLAYER_CHAR, "JEANSDENIM", "JEANS", Legs)Player.SetClothes($PLAYER_CHAR, "SNEAKERBINCBLK", "SNEAKER", Shoes)Player.SetClothes($PLAYER_CHAR, "PLAYER_FACE", "HEAD", Head)Player.Build($PLAYER_CHAR)select_interior 0 Player.CanMove($PLAYER_CHAR) = True01B7: release_weather 016C: restart_if_wasted_at $7 $6 $5 angle 0.0 town_number 0 Model.Load(#CHEETAH):MAIN_383wait 0 if Model.Available(#CHEETAH)jf @MAIN_383 $CHEETAH = Car.Create(#CHEETAH, $7, $6, $5)036A: put_actor $PLAYER_ACTOR in_car $CHEETAH fade 1 1000 wait 100 03E6: remove_text_box create_thread @MODEL :MAIN_449wait 500 jump @MAIN_449 :MODELthread 'MODEL' 014B: $PARKED_DUMPER = init_parked_car_generator #DUMPER color -1 -1 1 alarm 0 door_lock 0 0 10000 at 1.140753 433.1658 24.99462 angle 90.0 014C: set_parked_car_generator $PARKED_DUMPER cars_to_generate_to 101 Model.Load(#BFYST)038B: load_requested_models :MODEL_67if not Model.Available(#BFYST)jf @MODEL_93 wait 0 jump @MODEL_67 :[email protected] = Actor.Create(CivFemale, #BFYST, -24.74731, 263.198, 8.912769)end_thread Thanks for help. Link to comment Share on other sites More sharing options...
AB033 Posted July 4, 2009 Author Share Posted July 4, 2009 Ooops, sorry it's ok. It is problem but not in script. It is in mapping. Thanks. Link to comment Share on other sites More sharing options...
AB033 Posted July 5, 2009 Author Share Posted July 5, 2009 (edited) Okay Dutchy3010, I'm back in the action. I need a help and I'm making a mission. Mission needs to look like this: STORY: -CJ has arrived in small town. In front of his house he meets his first neighbour. After some talk, they get in the car and neighbour is showing CJ the town (Driving, markers, etc). At end of the tour they go back home and mission is over. WORK PROGRESS: I made an Icon and sphere in front of the house. I loaded the models (car and actor,neighbour). And that is it. Then I need a help. I want to make a cutscene and put the dialog between CJ and neighbour. Also I want to make neighbour and CJ to get in the car. The rest of mission I can do alone. Here is the code: // This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007DEFINE OBJECTS 1DEFINE OBJECT SANNY BUILDER 3.04 DEFINE MISSIONS 0DEFINE EXTERNAL_SCRIPTS 0 // Use -1 in order not to compile AAA scriptDEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 0{$VERSION 3.1.0027}//-------------MAIN---------------thread 'MAIN' fade 0 0 042C: set_total_missions_to 0 030D: set_max_progress 0 01F0: set_max_wanted_level_to 6 set_wb_check_to 0 00C0: set_current_time_hours_to 23 minutes_to 0 $7 = 0.0 $6 = 0.0 $5 = 30.0 04E4: unknown_refresh_game_renderer_at $7 $6 Camera.SetAtPos($7, $6, $5)062A: change_float_stat 165 to 999.0 062A: change_float_stat 23 to 999.0 062A: change_float_stat 21 to 0.0 062A: change_float_stat 163 to 999.0 062A: change_float_stat 160 to 999.0 062A: change_float_stat 229 to 999.0 062A: change_float_stat 223 to 999.0 062A: change_float_stat 230 to 999.0 0629: change_integer_stat 181 to 4 0629: change_integer_stat 68 to 0 $PLAYER_CHAR = Player.Create(#NULL, $7, $6, $5)07AF: $PLAYER_GROUP = player $PLAYER_CHAR group $PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)Camera.SetBehindPlayerActor.Angle($PLAYER_ACTOR) = 262.0set_weather 1 Player.SetClothes($PLAYER_CHAR, "BBALLJACKRSTAR", "BBJACK", Torso)Player.SetClothes($PLAYER_CHAR, "JEANSDENIM", "JEANS", Legs)Player.SetClothes($PLAYER_CHAR, "SNEAKERBINCBLK", "SNEAKER", Shoes)Player.SetClothes($PLAYER_CHAR, "PLAYER_FACE", "HEAD", Head)Player.Build($PLAYER_CHAR)select_interior 0 Player.CanMove($PLAYER_CHAR) = True01B7: release_weather 016C: restart_if_wasted_at $7 $6 $5 angle 0.0 town_number 0 Model.Load(#CHEETAH):MAIN_383wait 0 if Model.Available(#CHEETAH)else_jump @MAIN_383 $CHEETAH = Car.Create(#CHEETAH, $7, $6, $5)036A: put_actor $PLAYER_ACTOR in_car $CHEETAH fade 1 1000 wait 100 03E6: remove_text_box start_mission 0 // Initial 1wait 0 create_thread_wb @TUT_SNIFF :MAIN_456wait $DEFAULT_WAIT_TIME jump @MAIN_456 :TUT_SNIFFthread "TUT_SNIFF" $MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere(42, $X_SWEET_HOUSE, $Y_SWEET_HOUSE, $Z_SWEET_HOUSE):TUT_SNIFF_29wait $DEFAULT_WAIT_TIME if and Player.Defined($PLAYER_CHAR) $ONMISSION == 0 else_jump @TUT_SNIFF_138 if and00FF: actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_foot Player.Controllable($PLAYER_CHAR) $TUT_MISSIONS_PASSED == 0 else_jump @TUT_SNIFF_138 $ONMISSION = 1 00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2 // Big Smokestart_mission 1 // Initial 2:TUT_SNIFF_138 $TUT_MISSIONS_PASSED == 1 else_jump @TUT_SNIFF_29 Marker.Disable($MARKER_SWEET_HOUSE)end_thread $TUT_MISSIONS_PASSED = 0 $ONMISSION = 0 $X_SWEET_HOUSE = -19.87011 $Y_SWEET_HOUSE = 24.4917 $Z_SWEET_HOUSE = 25.327 0629: change_integer_stat 225 to 999 end_thread thread 'TUT 1' gosub @TUT_1_47 if wasted_or_busted else_jump @TUT_1_38 gosub @TUT_1_211 :TUT_1_38gosub @TUT_1_236 end_thread :TUT_1_47Model.Load(#BMYST)Model.Load(#TAMPA)038B: load_requested_models :TUT_1_58wait 0 if and Model.Available(#BMYST) Model.Available(#TAMPA)else_jump @TUT_1_58 0674: set_car_model #TAMPA numberplate "PATRICK_" $CAR_NUM = Car.Create(#TAMPA, -11.11453, 22.22224, 24.45567)$INNOCENT = Actor.Create(CivMale, #BMYST, -16.29843, 29.47078, 25.33551)wait 0 if Actor.Dead($INNOCENT)else_jump @TUT_1_171 jump @TUT_1_211 :TUT_1_1710394: play_music 1 $TUT_MISSIONS_PASSED += 1 Player.Money($PLAYER_CHAR) += 1000001E3: show_text_1number_styled GXT 'M_PASS' number 10000 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~return :TUT_1_21100BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED! return :TUT_1_236$ONMISSION = 0 Player.WantedLevel($PLAYER_CHAR) = 0Model.Destroy(#BMYST)mission_cleanup return create_thread @MODEL :TUT_1_266wait 500 jump @TUT_1_266 Working with you is Perfect Dutchy3010! I think you will have fun with doing this, coz' I know you are Professional in this. I love to work with you. Please help, but ONLY if you can and if you want. Thanks! Edited July 5, 2009 by AB033 Link to comment Share on other sites More sharing options...
trickstar34 Posted July 5, 2009 Share Posted July 5, 2009 Read the latest add-on to Mission Coding for Dummies, it explains how to make a cutscene, or you can explain better and I can do it for you. However it seems like this is turning into a request and belongs in the request topic. Link to comment Share on other sites More sharing options...
AB033 Posted July 6, 2009 Author Share Posted July 6, 2009 Thanks Trickstar! Sorry I didn't see there is tutuorial about cutscenes. I got it. Question is: How to put a dialog between player and actor? Do you understand? Link to comment Share on other sites More sharing options...
Dutchy3010 Posted July 6, 2009 Share Posted July 6, 2009 (edited) What you basically want, is two actors who are doing an animation at the right time and you have to display text. A very easy example from my rent-a-car script: 04ED: load_animation 'GANGS'repeat wait 0until 04EE: animation 'GANGS' loaded 00BC: show_text_highpriority GXT 'RENT001' time 2000 flag 1; 0605: actor [email protected] perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time 2200 // versionA wait 2200 ms00BC: show_text_highpriority GXT 'RENT002' time 2000 flag 1; 0605: actor $PLAYER_ACTOR perform_animation_sequence "PRTIAL_GNGTLKB" IFP_file "GANGS" 4.0 loop 1 0 0 0 time 2200 // versionA wait 2200 ms00BC: show_text_highpriority GXT 'RENT003' time 2000 flag 1; 0605: actor [email protected] perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time 2200 // versionA wait 2200 ms If you want, you can change camera, so you are looking at the actor who is "talking": Camera.SetPosition(-1963.2296, 290.4124, 36.068, 0.0, 0.0, 0.0)Camera.PointAt(-1961.4208, 293.3627, 35.4687, 2) Of course there are also other opcodes you can use for the camera. Good luck. EDIT @ Trickstar below: let me decide myself if and when I help someone. Thanks. Edited July 6, 2009 by Dutchy3010 DYOM - Create, play, share! Link to comment Share on other sites More sharing options...
trickstar34 Posted July 6, 2009 Share Posted July 6, 2009 Dutchy, it's best he first reads the tutorial before giving advice on them like that, that way he understands the you cant put a wait between those two objects. That's a problem he may encounter so I decided to mention it. Link to comment Share on other sites More sharing options...
AB033 Posted July 6, 2009 Author Share Posted July 6, 2009 Okay, let's make it easy. I stand in a marker. Mission starts. In the same time starts the cutscene. Two actors standing, talking. To make it easy forget the animations. Just want to put a dialog, text, talk between them two. EXAMPLE: ACTOR: Hello, what's your name? You are new here? CJ (player_actor): Carl Johnson, CJ. Yes I'm new here. What's your name? etc.etc. How to do that? What is the code? Do you know what I mean? Link to comment Share on other sites More sharing options...
trickstar34 Posted July 6, 2009 Share Posted July 6, 2009 Yea, make FXT files, I'll search for the tutorial on it for you, then you lock players position (best to put the actor where you want him to be) then you add texts, also explained in Mission Coding for Dummies. Set waits for how long you want CJ to stand still, then at the end fade out so the player is visible, then set Player.CanMove = True then your done. Link to comment Share on other sites More sharing options...
AB033 Posted July 6, 2009 Author Share Posted July 6, 2009 I don't have an a idea how that needs to look (code). Does anybody can make it for me: When player_actor stands in sphere cutscene starts. There are two actors: player actor and actor. No animations. They talk for some time and cutscene ends. Can you do it? Because I didn't see it and I don't know how it needs to look like. (Complete cutscene, no parts, one in all) Link to comment Share on other sites More sharing options...
AB033 Posted July 6, 2009 Author Share Posted July 6, 2009 I guess not. Topic can be closed. Link to comment Share on other sites More sharing options...
Recommended Posts