Quantcast

Jump to content

» «
Photo

spawning a sphere only after mission is completed

11 replies to this topic
SpiderMight
  • SpiderMight

    Cleo Modder

  • Members
  • Joined: 14 Aug 2008
  • None

#1

Posted 07 April 2012 - 12:40 AM

i am having trouble getting a red sphere to spawn right after a custom mission is completed here is the scripts i am using :
CODE
{$CLEO .cs}

:Test_M_Start_1
03A4: name_thread 'Mission1starter'

:Start_load
wait 0
if
  Player.Defined($PLAYER_CHAR)
else_jump @Start_load  
if
00EC:   actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0       //done
else_jump @Start_load
Model.Load(#ARMY)

:army_guy1
wait 0
if
  Model.Available(#ARMY)
else_jump @army_guy1
1@ = Actor.Create(Mission1, #ARMY, 240.6714, 59.3084, 2.6639)    //done      //Cutscene talking guy
Actor.Angle(1@) = 173.9185
Actor.WeaponAccuracy(1@) = 100
0446: set_actor 1@ immune_to_headshots 1
07DD: set_actor 1@ temper_to 100 // see pedstats.dat  
03FE: set_actor 1@ money 0
01B2: give_actor 1@ weapon 31 ammo 30000 // Load the weapon model before using this  
Actor.Health(1@) = 600
Model.Destroy(#ARMY)

:not_base_sphere
wait 0
if
80EC:   not actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0
else_jump @dead_check
wait 0
actor.DestroyInstantly(1@)
03BD: destroy_sphere 2@
jump @Start_load

:dead_check
wait 0
if
Actor.Dead(1@)
jf @Test_M_Start_2
jump @end_all

:end_all
actor.DestroyInstantly(1@)
jump @Start_load

:Test_M_Start_2
03BD: destroy_sphere 2@
0001: wait  0 ms
00D6: if  0
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @Test_M_Start_2
00D6: if  0
0038:   $ONMISSION ==  0  // integer values
004D: jump_if_false @Test_M_Start_2

:check_mission_passed
wait 0
if
0595: mission_complete 'Mission1'
jf @Test_M_Start_6
03BC: 5@ = create_sphere_at 211.2203 82.6193 3.8906 radius 2.0
00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere 211.2203 82.6193 3.8906 radius 1.0 1.0 1.0 on_foot                //this sphere will not spawn even after custom "mission1" is completed
jf @check_mission_passed
00BA: text_styled 'MSAC'  1000 ms  2
jump @Test_M_Start_2

:Test_M_Start_6
03BC: 2@ = create_sphere_at 240.6784 57.4507 2.5064 radius 2.0
00D6: if
00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere 240.6784 57.4507 2.5064 radius 1.0 1.0 1.0 on_foot
004D: jump_if_false @not_base_sphere
00BA: text_styled 'MSAB'  1000 ms  2
actor.DestroyInstantly(1@)
0004: $ONMISSION =  1  // integer values
0A94: start_custom_mission "Mission1"  
jump @Test_M_Start_2


and this one is the custom mission1 :
CODE
{$CLEO .cm}
:TestMiss_1
03A4: name_thread "Mission1"  
0050: gosub @TestMiss_main_1
00D6: if  0
0112:   wasted_or_busted
004D: jump_if_false @TestMiss_end_1
0050: gosub @TestMiss_fail_1                    

:TestMiss_end_1
0050: gosub @TestMiss_clep_1
004E: end_thread

:TestMiss_main_1
0317: increment_mission_attempts//here starts the missionscript
0004: $ONMISSION =  1

016A: fade 0 time 500

:load_army_guytalk
wait 0
if
  Player.Defined($PLAYER_CHAR)
else_jump @load_army_guytalk  
if
00EC:   actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0    
else_jump @load_army_guytalk
Player.CanMove($PLAYER_CHAR, false)
Model.Load(#ARMY)
Model.Load(#m4)
model.Load(#CELLPHONE)
Model.Load(#WMYPLT)
model.Load(#micro_uzi)
04ED: load_animation "GANGS"

:army_guy_talker
wait 2000
if
  Model.Available(#ARMY)
else_jump @army_guy_talker
1@ = Actor.Create(Mission1, #ARMY, 240.6714, 59.3084, 2.6639)    //  done
Actor.Angle(1@) = 173.9185
Actor.WeaponAccuracy(1@) = 100
0446: set_actor 1@ immune_to_headshots 0
07DD: set_actor 1@ temper_to 100 // see pedstats.dat  
03FE: set_actor 1@ money 0
01B2: give_actor 1@ weapon 31 ammo 30000 // Load the weapon model before using this
Actor.Health(1@) = 1100  
Model.Destroy(#ARMY)

wait 9000
016A: fade 1 time 1000

:animation_talk2
wait 0                                              
if
04EE:   animation "GANGS" loaded
else_jump @animation_talk2

0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIA' time 7000 flag 1       //6 letters max in name
wait 7100
0792: disembark_instantly_actor 1@
04EF: release_animation "GANGS"
0605: actor $PLAYER_ACTOR perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'CJTMO' time 7000 flag 1     //6 letters max in name
wait 7100
0792: disembark_instantly_actor $PLAYER_ACTOR
04EF: release_animation "GANGS"
0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIB' time 7000 flag 1     //6 letters max in name
wait 7100
0792: disembark_instantly_actor 1@
04EF: release_animation "GANGS"
0605: actor $PLAYER_ACTOR perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'CJTMT' time 5500 flag 1     //6 letters max in name
wait 5600
0792: disembark_instantly_actor $PLAYER_ACTOR
04EF: release_animation "GANGS"
0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIC' time 9000 flag 1     //6 letters max in name
wait 9100
0792: disembark_instantly_actor 1@
04EF: release_animation "GANGS"
wait 100
0729: AS_actor 1@ hold_cellphone 1 // requires to load first the model #cellphone
wait 2000
00BC: show_text_highpriority GXT 'BMKID' time 7000 flag 1     //6 letters max in name
wait 7100
00BC: show_text_highpriority GXT 'BMKIE' time 2500 flag 1     //6 letters max in name
wait 2600
0729: AS_actor 1@ hold_cellphone 0
0249: release_model #CELLPHONE
01B2: give_actor 1@ weapon 31 ammo 30000 // Load the weapon model before using this
0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIF' time 8500 flag 1     //6 letters max in name
wait 8600
00BC: show_text_highpriority GXT 'BMKIG' time 8500 flag 1     //6 letters max in name
wait 8600
0792: disembark_instantly_actor 1@
04EF: release_animation "GANGS"
Player.CanMove($PLAYER_CHAR, true)
02A8: $terroristhouse = create_marker 0 at 766.5538 -555.8936 18.0129
00BC: show_text_highpriority GXT 'GTOTH' time 7000 flag 1       //6 letters max in name
03E5: show_text_box 'BINFOF'

:dead_check
wait 0                                                                                                                              
if
Actor.Dead(1@)
else_jump @not_in_sphere_check
jump @TestMiss_fail_1

:not_in_sphere_check
wait 0
if
80EC:   not actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0
else_jump @dead_check
actor.DestroyInstantly(1@)
jump @teleport_to_terrorist_house

:teleport_to_terrorist_house
wait 0
if
  Player.Defined($PLAYER_CHAR)
else_jump @teleport_to_terrorist_house  
if
00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere 766.5538 -555.8936 18.0129 radius 2.0 2.0 2.0 on_foot    //done
else_jump @teleport_to_terrorist_house
0164: disable_marker $terroristhouse
016A: fade 0 time 1000
0001: wait 1000 ms
04BB: select_interior 1
04E4: unknown_refresh_game_renderer_at 223.1581 1289.0724
03CB: set_rendering_origin_at 223.1581 1289.0724 1082.1328
0860: link_actor $PLAYER_ACTOR to_interior 1
00A1: put_actor $PLAYER_ACTOR at 223.1581 1289.0724 1082.1328
0173: set_actor $PLAYER_ACTOR Z_angle_to 6.9519
0001: wait 500 ms
016A: fade 1 time 1000

:intel_pickup
0213: $PICKUP_INTEL_BM = create_pickup #BRIEFCASE type 3 at 232.0651 1287.4071 1082.1406
wait 0
if
0214:   pickup $PICKUP_INTEL_BM picked_up
else_jump @intel_pickup
00BC: show_text_highpriority GXT 'GNEWSO' time 4000 flag 1       //6 letters max in name
wait 4100
jump @tele_out

:tele_out
016A: fade 0 time 1000
0001: wait 1000 ms
04BB: select_interior 0
04E4: unknown_refresh_game_renderer_at 766.5538 -555.8936
03CB: set_rendering_origin_at 766.5538 -555.8936 18.0129
0860: link_actor $PLAYER_ACTOR to_interior 0
00A1: put_actor $PLAYER_ACTOR at 766.5538 -555.8936 18.0129
0173: set_actor $PLAYER_ACTOR Z_angle_to 358.6452
0001: wait 500 ms
016A: fade 1 time 1000

:bad_guy
wait 1000
if
  Model.Available(#WMYPLT)
else_jump @bad_guy
0860: link_actor $PLAYER_ACTOR to_interior 0
2@ = Actor.Create(Mission1, #WMYPLT, 768.6641, -543.2671, 16.5837)    // done
0860: link_actor $PLAYER_ACTOR to_interior 0
Actor.Angle(2@) = 165.4577
Actor.WeaponAccuracy(2@) = 100
0446: set_actor 2@ immune_to_headshots 1
07DD: set_actor 2@ temper_to 100 // see pedstats.dat  
03FE: set_actor 2@ money 0
01B2: give_actor 2@ weapon 28 ammo 30000 // Load the weapon model before using this
Actor.Health(2@) = 400  
Model.Destroy(#WMYPLT)
05E2: AS_actor 2@ kill_actor $PLAYER_ACTOR
00BC: show_text_highpriority GXT 'KLLTO' time 7000 flag 1       //6 letters max in name

:dead_check2
wait 0                                                                                                                              
if
Actor.Dead(2@)
else_jump @dead_check2
actor.RemoveReferences(2@)
00BC: show_text_highpriority GXT 'GTORT' time 7000 flag 1       //6 letters max in name
player.ClearWantedLevel($PLAYER_CHAR)
02A8: $btoport = create_marker 0 at 240.6784 57.4507 2.5064
jump @load_army_guytalk2

:load_army_guytalk2
wait 0
if
  Player.Defined($PLAYER_CHAR)
else_jump @load_army_guytalk2  
if
00EC:   actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0    
else_jump @load_army_guytalk2
jump @army_guy_talker2

:army_guy_talker2
wait 0
if
  Model.Available(#ARMY)
else_jump @army_guy_talker2
3@ = Actor.Create(Mission1, #ARMY, 240.6714, 59.3084, 2.6639)    //  done
Actor.Angle(3@) = 173.9185
Actor.WeaponAccuracy(3@) = 100
0446: set_actor 3@ immune_to_headshots 0
07DD: set_actor 3@ temper_to 100 // see pedstats.dat  
03FE: set_actor 3@ money 0
01B2: give_actor 3@ weapon 31 ammo 30000 // Load the weapon model before using this
Actor.Health(3@) = 1100  
Model.Destroy(#ARMY)

:go_back_to_report
wait 0
if
  Player.Defined($PLAYER_CHAR)
else_jump @go_back_to_report  
if
00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere 240.6784 57.4507 2.5064 radius 2.0 2.0 2.0 on_foot    //done
else_jump @go_back_to_report
Player.CanMove($PLAYER_CHAR, false)
0164: disable_marker $btoport
0605: actor $PLAYER_ACTOR perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'CJFMON' time 7000 flag 1       //6 letters max in name
wait 7100
0792: disembark_instantly_actor $PLAYER_ACTOR
04EF: release_animation "GANGS"
0605: actor 3@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIH' time 7000 flag 1       //6 letters max in name
wait 7100
jump @TestMiss_pass_1

:TestMiss_pass_1
0394: play_music 1
player.ClearWantedLevel($PLAYER_CHAR)
Player.CanMove($PLAYER_CHAR, true)
0998: add_respect 10
00BA: text_styled 'MBPASS'  1000 ms  2
03E5: show_text_box 'BINFOF'
0318: set_latest_mission_passed 'Mission1'  // Big Smoke
jump @TestMiss_clep_1

:TestMiss_fail_1
00BA: text_styled 'MBFAIL'  1000 ms  1
jump @TestMiss_clep_1

:TestMiss_clep_1
0004: $ONMISSION =  0
00D8: mission_cleanup
0051: return

Ashwin.Star
  • Ashwin.Star

    Back for Next ♪♫

  • Members
  • Joined: 14 Nov 2010
  • India

#2

Posted 07 April 2012 - 02:16 AM

There are many solution of this Problem,
* Merge both script in one script, & put one after another
* Use a Global variable
like :> after passing the mission first set it to 1, & in second script will wait until that Var becomes 1,
so next Script will start working only after passing first one!

SpiderMight
  • SpiderMight

    Cleo Modder

  • Members
  • Joined: 14 Aug 2008
  • None

#3

Posted 07 April 2012 - 02:24 AM

thank you very much biggrin.gif

SpiderMight
  • SpiderMight

    Cleo Modder

  • Members
  • Joined: 14 Aug 2008
  • None

#4

Posted 07 April 2012 - 02:38 AM Edited by spidermight, 07 April 2012 - 02:55 AM.

i made the scripts into one script then what happens is if mission failed or passed will it still goto the the next sphere no matter what ,i want it so only if mission completed then it goes to the next sphere leading to the next mission please help

Ashwin.Star
  • Ashwin.Star

    Back for Next ♪♫

  • Members
  • Joined: 14 Nov 2010
  • India

#5

Posted 07 April 2012 - 03:26 AM Edited by Ashwin the new boy, 07 April 2012 - 07:24 AM.

before you proceed Next,
you need to learn some Basics, like
no need to use Jump in this type of case
CODE

//// script
jump @1

:1

-------------------
use "if and" in this type of case
CODE

:1
wait 0
if
/// condition
jf @1
if
/// condition
jf @1

use it like this
CODE

:1
wait 0
if and
/// condition
/// condition
/// upto 7 condition
jf @1

i hope you Understand what i meant to say

anyway here is you Solution

CODE

{$CLEO .cm}
:TestMiss_1
03A4: name_thread "Mission1"  
0050: gosub @TestMiss_main_1
00D6: if  0
0112:   wasted_or_busted
004D: jump_if_false @TestMiss_end_1
0050: gosub @TestMiss_fail_1                    

:TestMiss_end_1
0050: gosub @TestMiss_clep_1
004E: end_thread

:TestMiss_main_1
0317: increment_mission_attempts//here starts the missionscript
0004: $ONMISSION =  1

016A: fade 0 time 500

:load_army_guytalk
wait 0
if
 Player.Defined($PLAYER_CHAR)
else_jump @load_army_guytalk  
if
00EC:   actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0    
else_jump @load_army_guytalk
Player.CanMove($PLAYER_CHAR, false)
Model.Load(#ARMY)
Model.Load(#m4)
model.Load(#CELLPHONE)
Model.Load(#WMYPLT)
model.Load(#micro_uzi)
04ED: load_animation "GANGS"

:army_guy_talker
wait 2000
if
 Model.Available(#ARMY)
else_jump @army_guy_talker
1@ = Actor.Create(Mission1, #ARMY, 240.6714, 59.3084, 2.6639)    //  done
Actor.Angle(1@) = 173.9185
Actor.WeaponAccuracy(1@) = 100
0446: set_actor 1@ immune_to_headshots 0
07DD: set_actor 1@ temper_to 100 // see pedstats.dat  
03FE: set_actor 1@ money 0
01B2: give_actor 1@ weapon 31 ammo 30000 // Load the weapon model before using this
Actor.Health(1@) = 1100  
Model.Destroy(#ARMY)

wait 9000
016A: fade 1 time 1000

:animation_talk2
wait 0                                              
if
04EE:   animation "GANGS" loaded
else_jump @animation_talk2

0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIA' time 7000 flag 1       //6 letters max in name
wait 7100
0792: disembark_instantly_actor 1@
04EF: release_animation "GANGS"
0605: actor $PLAYER_ACTOR perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'CJTMO' time 7000 flag 1     //6 letters max in name
wait 7100
0792: disembark_instantly_actor $PLAYER_ACTOR
04EF: release_animation "GANGS"
0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIB' time 7000 flag 1     //6 letters max in name
wait 7100
0792: disembark_instantly_actor 1@
04EF: release_animation "GANGS"
0605: actor $PLAYER_ACTOR perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'CJTMT' time 5500 flag 1     //6 letters max in name
wait 5600
0792: disembark_instantly_actor $PLAYER_ACTOR
04EF: release_animation "GANGS"
0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIC' time 9000 flag 1     //6 letters max in name
wait 9100
0792: disembark_instantly_actor 1@
04EF: release_animation "GANGS"
wait 100
0729: AS_actor 1@ hold_cellphone 1 // requires to load first the model #cellphone
wait 2000
00BC: show_text_highpriority GXT 'BMKID' time 7000 flag 1     //6 letters max in name
wait 7100
00BC: show_text_highpriority GXT 'BMKIE' time 2500 flag 1     //6 letters max in name
wait 2600
0729: AS_actor 1@ hold_cellphone 0
0249: release_model #CELLPHONE
01B2: give_actor 1@ weapon 31 ammo 30000 // Load the weapon model before using this
0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIF' time 8500 flag 1     //6 letters max in name
wait 8600
00BC: show_text_highpriority GXT 'BMKIG' time 8500 flag 1     //6 letters max in name
wait 8600
0792: disembark_instantly_actor 1@
04EF: release_animation "GANGS"
Player.CanMove($PLAYER_CHAR, true)
02A8: $terroristhouse = create_marker 0 at 766.5538 -555.8936 18.0129
00BC: show_text_highpriority GXT 'GTOTH' time 7000 flag 1       //6 letters max in name
03E5: show_text_box 'BINFOF'

:dead_check
wait 0                                                                                                                              
if
Actor.Dead(1@)
else_jump @not_in_sphere_check
jump @TestMiss_fail_1

:not_in_sphere_check
wait 0
if
80EC:   not actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0
else_jump @dead_check
actor.DestroyInstantly(1@)
jump @teleport_to_terrorist_house

:teleport_to_terrorist_house
wait 0
if
 Player.Defined($PLAYER_CHAR)
else_jump @teleport_to_terrorist_house  
if
00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere 766.5538 -555.8936 18.0129 radius 2.0 2.0 2.0 on_foot    //done
else_jump @teleport_to_terrorist_house
0164: disable_marker $terroristhouse
016A: fade 0 time 1000
0001: wait 1000 ms
04BB: select_interior 1
04E4: unknown_refresh_game_renderer_at 223.1581 1289.0724
03CB: set_rendering_origin_at 223.1581 1289.0724 1082.1328
0860: link_actor $PLAYER_ACTOR to_interior 1
00A1: put_actor $PLAYER_ACTOR at 223.1581 1289.0724 1082.1328
0173: set_actor $PLAYER_ACTOR Z_angle_to 6.9519
0001: wait 500 ms
016A: fade 1 time 1000

:intel_pickup
0213: $PICKUP_INTEL_BM = create_pickup #BRIEFCASE type 3 at 232.0651 1287.4071 1082.1406
wait 0
if
0214:   pickup $PICKUP_INTEL_BM picked_up
else_jump @intel_pickup
00BC: show_text_highpriority GXT 'GNEWSO' time 4000 flag 1       //6 letters max in name
wait 4100
jump @tele_out

:tele_out
016A: fade 0 time 1000
0001: wait 1000 ms
04BB: select_interior 0
04E4: unknown_refresh_game_renderer_at 766.5538 -555.8936
03CB: set_rendering_origin_at 766.5538 -555.8936 18.0129
0860: link_actor $PLAYER_ACTOR to_interior 0
00A1: put_actor $PLAYER_ACTOR at 766.5538 -555.8936 18.0129
0173: set_actor $PLAYER_ACTOR Z_angle_to 358.6452
0001: wait 500 ms
016A: fade 1 time 1000

:bad_guy
wait 1000
if
 Model.Available(#WMYPLT)
else_jump @bad_guy
0860: link_actor $PLAYER_ACTOR to_interior 0
2@ = Actor.Create(Mission1, #WMYPLT, 768.6641, -543.2671, 16.5837)    // done
0860: link_actor $PLAYER_ACTOR to_interior 0
Actor.Angle(2@) = 165.4577
Actor.WeaponAccuracy(2@) = 100
0446: set_actor 2@ immune_to_headshots 1
07DD: set_actor 2@ temper_to 100 // see pedstats.dat  
03FE: set_actor 2@ money 0
01B2: give_actor 2@ weapon 28 ammo 30000 // Load the weapon model before using this
Actor.Health(2@) = 400  
Model.Destroy(#WMYPLT)
05E2: AS_actor 2@ kill_actor $PLAYER_ACTOR
00BC: show_text_highpriority GXT 'KLLTO' time 7000 flag 1       //6 letters max in name

:dead_check2
wait 0                                                                                                                              
if
Actor.Dead(2@)
else_jump @dead_check2
actor.RemoveReferences(2@)
00BC: show_text_highpriority GXT 'GTORT' time 7000 flag 1       //6 letters max in name
player.ClearWantedLevel($PLAYER_CHAR)
02A8: $btoport = create_marker 0 at 240.6784 57.4507 2.5064
jump @load_army_guytalk2

:load_army_guytalk2
wait 0
if
 Player.Defined($PLAYER_CHAR)
else_jump @load_army_guytalk2  
if
00EC:   actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0    
else_jump @load_army_guytalk2
jump @army_guy_talker2

:army_guy_talker2
wait 0
if
 Model.Available(#ARMY)
else_jump @army_guy_talker2
3@ = Actor.Create(Mission1, #ARMY, 240.6714, 59.3084, 2.6639)    //  done
Actor.Angle(3@) = 173.9185
Actor.WeaponAccuracy(3@) = 100
0446: set_actor 3@ immune_to_headshots 0
07DD: set_actor 3@ temper_to 100 // see pedstats.dat  
03FE: set_actor 3@ money 0
01B2: give_actor 3@ weapon 31 ammo 30000 // Load the weapon model before using this
Actor.Health(3@) = 1100  
Model.Destroy(#ARMY)

:go_back_to_report
wait 0
if
 Player.Defined($PLAYER_CHAR)
else_jump @go_back_to_report  
if
00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere 240.6784 57.4507 2.5064 radius 2.0 2.0 2.0 on_foot    //done
else_jump @go_back_to_report
Player.CanMove($PLAYER_CHAR, false)
0164: disable_marker $btoport
0605: actor $PLAYER_ACTOR perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'CJFMON' time 7000 flag 1       //6 letters max in name
wait 7100
0792: disembark_instantly_actor $PLAYER_ACTOR
04EF: release_animation "GANGS"
0605: actor 3@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIH' time 7000 flag 1       //6 letters max in name
wait 7100
jump @TestMiss_pass_1

:TestMiss_pass_1
0394: play_music 1
player.ClearWantedLevel($PLAYER_CHAR)
Player.CanMove($PLAYER_CHAR, true)
0998: add_respect 10
00BA: text_styled 'MBPASS'  1000 ms  2
03E5: show_text_box 'BINFOF'
0318: set_latest_mission_passed 'Mission1'  // Big Smoke
0004: $ONMISSION =  0
00D8: mission_cleanup
Jump @Test_M_Start_1

:TestMiss_fail_1
00BA: text_styled 'MBFAIL'  1000 ms  1
0004: $ONMISSION =  0
00D8: mission_cleanup
0051: return

///////////////////// putting next to here /////////////////////////

:Test_M_Start_1
03A4: name_thread 'Mission1starter'


:Start_load
wait 0
if
 Player.Defined($PLAYER_CHAR)
else_jump @Start_load  
if
00EC:   actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0       //done
else_jump @Start_load
Model.Load(#ARMY)

:army_guy1
wait 0
if
 Model.Available(#ARMY)
else_jump @army_guy1
1@ = Actor.Create(Mission1, #ARMY, 240.6714, 59.3084, 2.6639)    //done      //Cutscene talking guy
Actor.Angle(1@) = 173.9185
Actor.WeaponAccuracy(1@) = 100
0446: set_actor 1@ immune_to_headshots 1
07DD: set_actor 1@ temper_to 100 // see pedstats.dat  
03FE: set_actor 1@ money 0
01B2: give_actor 1@ weapon 31 ammo 30000 // Load the weapon model before using this  
Actor.Health(1@) = 600
Model.Destroy(#ARMY)

:not_base_sphere
wait 0
if
80EC:   not actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0
else_jump @dead_check
wait 0
actor.DestroyInstantly(1@)
03BD: destroy_sphere 2@
jump @Start_load

:dead_check
wait 0
if
Actor.Dead(1@)
jf @Test_M_Start_2
jump @end_all

:end_all
actor.DestroyInstantly(1@)
jump @Start_load

:Test_M_Start_2
03BD: destroy_sphere 2@
0001: wait  0 ms
00D6: if  0
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @Test_M_Start_2
00D6: if  0
0038:   $ONMISSION ==  0  // integer values
004D: jump_if_false @Test_M_Start_2

:check_mission_passed
wait 0
if
0595: mission_complete 'Mission1'
jf @Test_M_Start_6
03BC: 5@ = create_sphere_at 211.2203 82.6193 3.8906 radius 2.0
00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere 211.2203 82.6193 3.8906 radius 1.0 1.0 1.0 on_foot                //this sphere will not spawn even after custom "mission1" is completed
jf @check_mission_passed
00BA: text_styled 'MSAC'  1000 ms  2
jump @Test_M_Start_2

:Test_M_Start_6
03BC: 2@ = create_sphere_at 240.6784 57.4507 2.5064 radius 2.0
00D6: if
00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere 240.6784 57.4507 2.5064 radius 1.0 1.0 1.0 on_foot
004D: jump_if_false @not_base_sphere
00BA: text_styled 'MSAB'  1000 ms  2
actor.DestroyInstantly(1@)
0004: $ONMISSION =  1  // integer values
0A94: start_custom_mission "Mission1"  
jump @Test_M_Start_2

SpiderMight
  • SpiderMight

    Cleo Modder

  • Members
  • Joined: 14 Aug 2008
  • None

#6

Posted 07 April 2012 - 06:57 AM

i am still having problems, even if i win or fail the mission the sphere for the next mission does not show up, i tried the one you posted but didnt work
CS FILE:
CODE
{$CLEO .cs}

:Test_M_Start_1
03A4: name_thread 'Mission1starter'

:Start_load
wait 0
if
Player.Defined($PLAYER_CHAR)
else_jump @Start_load  
if
00EC:   actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0       //done
else_jump @Start_load
Model.Load(#ARMY)

:army_guy1
wait 0
if
Model.Available(#ARMY)
else_jump @army_guy1
1@ = Actor.Create(Mission1, #ARMY, 240.6714, 59.3084, 2.6639)    //done      //Cutscene talking guy
Actor.Angle(1@) = 173.9185
Actor.WeaponAccuracy(1@) = 100
0446: set_actor 1@ immune_to_headshots 1
07DD: set_actor 1@ temper_to 100 // see pedstats.dat  
03FE: set_actor 1@ money 0
01B2: give_actor 1@ weapon 31 ammo 30000 // Load the weapon model before using this  
Actor.Health(1@) = 600
Model.Destroy(#ARMY)

:not_base_sphere
wait 0
if
80EC:   not actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0
else_jump @dead_check
wait 0
actor.DestroyInstantly(1@)
03BD: destroy_sphere 2@
jump @Start_load

:dead_check
wait 0
if
Actor.Dead(1@)
jf @Test_M_Start_2
jump @end_all

:end_all
actor.DestroyInstantly(1@)
jump @Start_load

:Test_M_Start_2
03BD: destroy_sphere 2@
0001: wait  0 ms
00D6: if  0
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @Test_M_Start_2
00D6: if  0
0038:   $mission1_Passed ==  0  // integer values
004D: jump_if_false @Test_M_Start_2

:Test_M_Start_6
03BC: 2@ = create_sphere_at 240.6784 57.4507 2.5064 radius 2.0
00D6: if
00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere 240.6784 57.4507 2.5064 radius 1.0 1.0 1.0 on_foot
004D: jump_if_false @not_base_sphere
00BA: text_styled 'MSAB'  1000 ms  2
actor.DestroyInstantly(1@)
0004: $mission1_Passed =  1  // integer values
0A94: start_custom_mission "Mission1"  

:0
wait 0
if
0004: $mission1_Passed = 2
jf @Test_M_Start_2

:Load_sphere_and_models_2
wait 0
if
Player.Defined($PLAYER_CHAR)
else_jump @Load_sphere_and_models_2  
if
00EC:   actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0       //done
else_jump @Load_sphere_and_models_2
Model.Load(#ARMY)

:army_guy2
wait 0
if
Model.Available(#ARMY)
else_jump @army_guy1
3@ = Actor.Create(Mission1, #ARMY, 246.1451, 72.8039, 3.8622)    //     //Cutscene talking guy2
Actor.Angle(3@) = 6.4107
Actor.WeaponAccuracy(3@) = 100
0446: set_actor 3@ immune_to_headshots 1
07DD: set_actor 3@ temper_to 100 // see pedstats.dat  
03FE: set_actor 3@ money 0
01B2: give_actor 3@ weapon 31 ammo 30000 // Load the weapon model before using this  
Actor.Health(3@) = 1100
Model.Destroy(#ARMY)

:not_base_sphere2
wait 0
if
80EC:   not actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0
else_jump @dead_check2
wait 0
actor.DestroyInstantly(3@)
03BD: destroy_sphere 4@
jump @Load_sphere_and_models_2

:dead_check2
wait 0
if
Actor.Dead(3@)
jf @Test_M_Start_Part_2
jump @end_all2

:end_all2
actor.DestroyInstantly(3@)
jump @Start_load

:Test_M_Start_29
03BD: destroy_sphere 4@
0001: wait  0 ms
00D6: if  0
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @Test_M_Start_29
00D6: if
0038:   $mission1_Passed ==  2  // integer values
004D: jump_if_false @Test_M_Start_29

:Test_M_Start_Part_2
03BC: 4@ = create_sphere_at 246.0344 75.0424 3.83 radius 2.0
00D6: if
00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere 246.0344 75.0424 3.83 radius 1.0 1.0 1.0 on_foot
004D: jump_if_false @not_base_sphere2
00BA: text_styled 'MSAC'  1000 ms  2
actor.DestroyInstantly(3@)
//0004: $mission2_Passed =  1  // integer values
jump @Test_M_Start_29


CM FILE :
CODE
{$CLEO .cm}
:TestMiss_1
03A4: name_thread "Mission1"  
0050: gosub @TestMiss_main_1
00D6: if  0
0112:   wasted_or_busted
004D: jump_if_false @TestMiss_end_1
0050: gosub @TestMiss_fail_1                    

:TestMiss_end_1
0050: gosub @TestMiss_clep_1
004E: end_thread

:TestMiss_main_1
0317: increment_mission_attempts//here starts the missionscript
0004: $mission1_Passed =  1

016A: fade 0 time 500

:load_army_guytalk
wait 0
if
 Player.Defined($PLAYER_CHAR)
else_jump @load_army_guytalk  
if
00EC:   actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0    
else_jump @load_army_guytalk
Player.CanMove($PLAYER_CHAR, false)
Model.Load(#ARMY)
Model.Load(#m4)
model.Load(#CELLPHONE)
Model.Load(#WMYPLT)
model.Load(#micro_uzi)
04ED: load_animation "GANGS"

:army_guy_talker
wait 2000
if
 Model.Available(#ARMY)
else_jump @army_guy_talker
1@ = Actor.Create(Mission1, #ARMY, 240.6714, 59.3084, 2.6639)    //  done
Actor.Angle(1@) = 173.9185
Actor.WeaponAccuracy(1@) = 100
0446: set_actor 1@ immune_to_headshots 0
07DD: set_actor 1@ temper_to 100 // see pedstats.dat  
03FE: set_actor 1@ money 0
01B2: give_actor 1@ weapon 31 ammo 30000 // Load the weapon model before using this
Actor.Health(1@) = 1100  
Model.Destroy(#ARMY)

wait 9000
016A: fade 1 time 1000

:animation_talk2
wait 0                                              
if
04EE:   animation "GANGS" loaded
else_jump @animation_talk2

0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIA' time 7000 flag 1       //6 letters max in name
wait 7100
0792: disembark_instantly_actor 1@
04EF: release_animation "GANGS"
0605: actor $PLAYER_ACTOR perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'CJTMO' time 7000 flag 1     //6 letters max in name
wait 7100
0792: disembark_instantly_actor $PLAYER_ACTOR
04EF: release_animation "GANGS"
0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIB' time 7000 flag 1     //6 letters max in name
wait 7100
0792: disembark_instantly_actor 1@
04EF: release_animation "GANGS"
0605: actor $PLAYER_ACTOR perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'CJTMT' time 5500 flag 1     //6 letters max in name
wait 5600
0792: disembark_instantly_actor $PLAYER_ACTOR
04EF: release_animation "GANGS"
0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIC' time 9000 flag 1     //6 letters max in name
wait 9100
0792: disembark_instantly_actor 1@
04EF: release_animation "GANGS"
wait 100
0729: AS_actor 1@ hold_cellphone 1 // requires to load first the model #cellphone
wait 2000
00BC: show_text_highpriority GXT 'BMKID' time 7000 flag 1     //6 letters max in name
wait 7100
00BC: show_text_highpriority GXT 'BMKIE' time 2500 flag 1     //6 letters max in name
wait 2600
0729: AS_actor 1@ hold_cellphone 0
0249: release_model #CELLPHONE
01B2: give_actor 1@ weapon 31 ammo 30000 // Load the weapon model before using this
0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIF' time 8500 flag 1     //6 letters max in name
wait 8600
00BC: show_text_highpriority GXT 'BMKIG' time 8500 flag 1     //6 letters max in name
wait 8600
0792: disembark_instantly_actor 1@
04EF: release_animation "GANGS"
Player.CanMove($PLAYER_CHAR, true)
02A8: $terroristhouse = create_marker 0 at 766.5538 -555.8936 18.0129
00BC: show_text_highpriority GXT 'GTOTH' time 7000 flag 1       //6 letters max in name
03E5: show_text_box 'BINFOF'

:dead_check
wait 0                                                                                                                              
if
Actor.Dead(1@)
else_jump @not_in_sphere_check
jump @TestMiss_fail_1

:not_in_sphere_check
wait 0
if
80EC:   not actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0
else_jump @dead_check
actor.DestroyInstantly(1@)
jump @teleport_to_terrorist_house

:teleport_to_terrorist_house
wait 0
if
 Player.Defined($PLAYER_CHAR)
else_jump @teleport_to_terrorist_house  
if
00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere 766.5538 -555.8936 18.0129 radius 2.0 2.0 2.0 on_foot    //done
else_jump @teleport_to_terrorist_house
0164: disable_marker $terroristhouse
016A: fade 0 time 1000
0001: wait 1000 ms
04BB: select_interior 1
04E4: unknown_refresh_game_renderer_at 223.1581 1289.0724
03CB: set_rendering_origin_at 223.1581 1289.0724 1082.1328
0860: link_actor $PLAYER_ACTOR to_interior 1
00A1: put_actor $PLAYER_ACTOR at 223.1581 1289.0724 1082.1328
0173: set_actor $PLAYER_ACTOR Z_angle_to 6.9519
0001: wait 500 ms
016A: fade 1 time 1000

:intel_pickup
0213: $PICKUP_INTEL_BM = create_pickup #BRIEFCASE type 3 at 232.0651 1287.4071 1082.1406
wait 0
if
0214:   pickup $PICKUP_INTEL_BM picked_up
else_jump @intel_pickup
00BC: show_text_highpriority GXT 'GNEWSO' time 4000 flag 1       //6 letters max in name
wait 4100
jump @tele_out

:tele_out
016A: fade 0 time 1000
0001: wait 1000 ms
04BB: select_interior 0
04E4: unknown_refresh_game_renderer_at 766.5538 -555.8936
03CB: set_rendering_origin_at 766.5538 -555.8936 18.0129
0860: link_actor $PLAYER_ACTOR to_interior 0
00A1: put_actor $PLAYER_ACTOR at 766.5538 -555.8936 18.0129
0173: set_actor $PLAYER_ACTOR Z_angle_to 358.6452
0001: wait 500 ms
016A: fade 1 time 1000

:bad_guy
wait 1000
if
 Model.Available(#WMYPLT)
else_jump @bad_guy
0860: link_actor $PLAYER_ACTOR to_interior 0
2@ = Actor.Create(Mission1, #WMYPLT, 768.6641, -543.2671, 16.5837)    // done
0860: link_actor $PLAYER_ACTOR to_interior 0
Actor.Angle(2@) = 165.4577
Actor.WeaponAccuracy(2@) = 100
0446: set_actor 2@ immune_to_headshots 1
07DD: set_actor 2@ temper_to 100 // see pedstats.dat  
03FE: set_actor 2@ money 0
01B2: give_actor 2@ weapon 28 ammo 30000 // Load the weapon model before using this
Actor.Health(2@) = 400  
Model.Destroy(#WMYPLT)
05E2: AS_actor 2@ kill_actor $PLAYER_ACTOR
00BC: show_text_highpriority GXT 'KLLTO' time 7000 flag 1       //6 letters max in name

:dead_check2
wait 0                                                                                                                              
if
Actor.Dead(2@)
else_jump @dead_check2
actor.RemoveReferences(2@)
00BC: show_text_highpriority GXT 'GTORT' time 7000 flag 1       //6 letters max in name
player.ClearWantedLevel($PLAYER_CHAR)
02A8: $btoport = create_marker 0 at 240.6784 57.4507 2.5064
jump @load_army_guytalk2

:load_army_guytalk2
wait 0
if
 Player.Defined($PLAYER_CHAR)
else_jump @load_army_guytalk2  
if
00EC:   actor $PLAYER_ACTOR 0 near_point 234.7088 93.3518 radius 100.0 100.0    
else_jump @load_army_guytalk2
jump @army_guy_talker2

:army_guy_talker2
wait 0
if
 Model.Available(#ARMY)
else_jump @army_guy_talker2
3@ = Actor.Create(Mission1, #ARMY, 240.6714, 59.3084, 2.6639)    //  done
Actor.Angle(3@) = 173.9185
Actor.WeaponAccuracy(3@) = 100
0446: set_actor 3@ immune_to_headshots 0
07DD: set_actor 3@ temper_to 100 // see pedstats.dat  
03FE: set_actor 3@ money 0
01B2: give_actor 3@ weapon 31 ammo 30000 // Load the weapon model before using this
Actor.Health(3@) = 1100  
Model.Destroy(#ARMY)

:go_back_to_report
wait 0
if
 Player.Defined($PLAYER_CHAR)
else_jump @go_back_to_report  
if
00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere 240.6784 57.4507 2.5064 radius 2.0 2.0 2.0 on_foot    //done
else_jump @go_back_to_report
Player.CanMove($PLAYER_CHAR, false)
0164: disable_marker $btoport
0605: actor $PLAYER_ACTOR perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'CJFMON' time 7000 flag 1       //6 letters max in name
wait 7100
0792: disembark_instantly_actor $PLAYER_ACTOR
04EF: release_animation "GANGS"
0605: actor 3@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1
00BC: show_text_highpriority GXT 'BMKIH' time 7000 flag 1       //6 letters max in name
wait 7100
jump @TestMiss_pass_1

:TestMiss_pass_1
0394: play_music 1
player.ClearWantedLevel($PLAYER_CHAR)
Player.CanMove($PLAYER_CHAR, true)
0998: add_respect 10
00BA: text_styled 'MBPASS'  1000 ms  2
03E5: show_text_box 'BINFOF'
0318: set_latest_mission_passed 'Mission1'  // Big Smoke
0004: $mission1_Passed =  2
jump @TestMiss_clep_1

:TestMiss_fail_1
00BA: text_styled 'MBFAIL'  1000 ms  1
0004: $mission1_Passed =  0
jump @TestMiss_clep_1

:TestMiss_clep_1
00D8: mission_cleanup
0051: return

Leona74
  • Leona74

    Player Hater

  • Members
  • Joined: 28 Mar 2012

#7

Posted 07 April 2012 - 07:09 AM

user posted imagebefore you proceed Next,

Ashwin.Star
  • Ashwin.Star

    Back for Next ♪♫

  • Members
  • Joined: 14 Nov 2010
  • India

#8

Posted 07 April 2012 - 07:26 AM

@spidermight
try it again NOW

SpiderMight
  • SpiderMight

    Cleo Modder

  • Members
  • Joined: 14 Aug 2008
  • None

#9

Posted 07 April 2012 - 07:42 AM

QUOTE (Ashwin the new boy @ Saturday, Apr 7 2012, 07:26)
@spidermight
try it again NOW

it does not work i go in the sphere and nothing happens its like it just skips the whole mission
i can not compile script with this :
CODE
0050: gosub @TestMiss_clep_1


CODE
Test_M_Start_1

and this because its not in the same script

SpiderMight
  • SpiderMight

    Cleo Modder

  • Members
  • Joined: 14 Aug 2008
  • None

#10

Posted 12 December 2012 - 12:53 AM

Bump, is anyone able to help it been to long i really want to get this fixed up sad.gif

ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union

#11

Posted 12 December 2012 - 08:49 PM

QUOTE (spidermight @ Wednesday, Dec 12 2012, 01:53)
Bump, is anyone able to help it been to long i really want to get this fixed up sad.gif

Look for the examples about cleo mission serie (how to get info in starter script if mission was complete)
here and here

SpiderMight
  • SpiderMight

    Cleo Modder

  • Members
  • Joined: 14 Aug 2008
  • None

#12

Posted 13 December 2012 - 12:59 AM

thank you zaz




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users