Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
deltaCJ

[III] Markers not appearing, and integer check is not working

Recommended Posts

deltaCJ

 

 

Hello, so I have a script where the player must go to a warehouse in Trenton (by Joey's garage) and blow up some trucks. Open the spoiler if you want direct steps on what I did.

 

 


First I made the checkpoints and markers using:

018A: $2 = create_checkpoint_at 1132.8865 -946.4482 14.8227

 

I also make a pick up before this and the pick up spawns fine, but the weird thing is that if I make a marker above the pickup it still does not appear.

 

I thought my game would crash because if the checkpoint (assigned to $2) isn't created then the disable_marker opcode I used, would crash it right?

 

Nope.

 

After this, I used

$TRUCKS_DESTROYED = 0

to set the variable to zero for the trucks I want the player to blow up ( I want the player to blow up any truck, not a certain one.)

 

I then made it so there's 3 trucks, $TEMP_CAR1, $TEMP_CAR2, and $TEMP_CAR3 

I made sure to place markers over them.

0186: $3 = create_marker_above_car $TEMP_CAR1

0186: $4 = create_marker_above_car $TEMP_CAR2

0186: $5 = create_marker_above_car $TEMP_CAR3

 

I then made a loop thread to check for the amount of trucks wrecked.

But strange thing is that after I wreck 1 of them, it passes the loop?

 

:WG2_CHECK

wait 0

if and

$TRUCKS_DESTROYED < 2

0119: car $TEMP_CAR1 wrecked

jf @WG2_CHECK2

0164: disable_marker $3

0008: $TRUCKS_DESTROYED += 1 // integer values

 

:WG2_CHECK2

wait 0

if and

$TRUCKS_DESTROYED < 2

0119: car $TEMP_CAR2 wrecked jf

@WG2_CHECK3

0164: disable_marker $4

0008: $TRUCKS_DESTROYED += 1 // integer values

 

:WG2_CHECK3

wait 0

if and

$TRUCKS_DESTROYED < 2

0119: car $TEMP_CAR3 wrecked

jf @WG2_14

0164: disable_marker $5

0008: $TRUCKS_DESTROYED += 1 // integer values

 

:WG2_14

wait 0

if

$TRUCKS_DESTROYED == 2

jf @WG2_CHECK

 

:WG2_15

wait 1000

00BC: text_highpriority 'DIAB2_D' 5500 ms 1 wait 3000

 

Please help :D
 

 

Full Code:

 



:WG_2 03A4: name_thread 'WG2' 0050: gosub @WG2_START if 0112: wasted_or_busted then 0050: gosub @WG_FAIL end 0050: gosub @WG_CLEAN 004E: end_thread :WG2_START $ONMISSION = 1 0169: set_fade_color 1 1 1 01B4: set_player $PLAYER_CHAR frozen_state 0 wait 1000 0247: request_model #CT_MAN1 0247: request_model #YANKEE 0247: request_model #WORKER1 0247: request_model #WORKER2 0247: request_model #DOCKER1 0247: request_model #DOCKER2 0247: request_model #COLT45 038B: load_requested_models 02A3: toggle_widescreen 1 :WG2_10 wait 0 if and 0248: model #CT_MAN1 available 0248: model #YANKEE available 0248: model #WORKER1 available 0248: model #WORKER2 available 0248: model #DOCKER1 available 0248: model #DOCKER2 available 0248: model #COLT45 available jf @WG2_10 009A: $WONG = create_actor 21 #CT_MAN1 at 861.7382 -663.8361 15.6437 0249: release_model #CT_MAN1 0173: set_actor $WONG z_angle_to 177.8419 0055: put_player $PLAYER_CHAR at 868.1497 -674.2183 14.9727 0171: set_player $PLAYER_CHAR z_angle_to 359.6815 015F: set_camera_position 873.0884 -669.4424 14.9727 0.0 0.0 0.0 0159: camera_on_ped $PLAYER_ACTOR 15 2 wait 2000 0211: actor $WONG walk_to 861.5823 -668.4467 0211: actor $PLAYER_ACTOR walk_to 867.7177 -668.2227 wait 100 fade 1 1000 wait 1000 03AD: set_rubbish 0 03AF: set_streaming 1 wait 0 :WG2_11 wait 0 if 00FF: actor $WONG 0 861.5823 -668.4467 15.6437 radius 1.0 1.0 1.0 jf @WG2_11 0211: actor $WONG walk_to 865.4109 -668.3923 wait 2600 00BC: text_highpriority 'DIAB2_1' 3400 ms 1 :WG2_12 wait 0 if 00FF: actor $PLAYER_ACTOR 0 867.7177 -668.2227 14.9727 radius 1.0 1.0 1.0 jf @WG2_12 0210: player $PLAYER_CHAR look_at_actor $WONG 022E: set_player $PLAYER_CHAR to_look_at_actor $WONG wait 4000 if 80E1: not pad 0 key_pressed 15 jf @WG2_CUTEND 00BC: text_highpriority 'DIAB2_2' 3400 ms 1 wait 4250 if 80E1: not pad 0 key_pressed 15 jf @WG2_CUTEND 00BC: text_highpriority 'DIAB2_3' 3400 ms 1 015F: set_camera_position 862.684 -660.9164 14.9727 0.0 0.0 0.0 0159: camera_on_ped $WONG 15 2 0372: set_actor $WONG anim 19 wait_state_time 2000 ms 022D: set_actor $WONG to_look_at_player $PLAYER_CHAR 020F: actor $WONG look_at_player $PLAYER_CHAR wait 4250 if 80E1: not pad 0 key_pressed 15 jf @WG2_CUTEND 00BC: text_highpriority 'DIAB2_4' 3400 ms 1 wait 4250 if 80E1: not pad 0 key_pressed 15 jf @WG2_CUTEND 015F: set_camera_position 861.4431 -664.6551 15.6437 0.0 0.0 0.0 0159: camera_on_ped $WONG 15 2 00BC: text_highpriority 'DIAB2_5' 3400 ms 1 0372: set_actor $WONG anim 19 wait_state_time 2500 ms wait 4250 if 80E1: not pad 0 key_pressed 15 jf @WG2_CUTEND :WG2_CUTEND 00BE: text_clear_all fade 0 1000 wait 1000 03AD: set_rubbish 1 02EB: restore_camera_with_jumpcut 01B4: set_player $PLAYER_CHAR frozen_state 1 02A3: toggle_widescreen 0 00A5: $TEMP_CAR1 = create_car #YANKEE at 1166.9662 -943.1447 15.3371 0175: set_car $TEMP_CAR1 z_angle_to 318.9096 00A5: $TEMP_CAR2 = create_car #YANKEE at 1214.2787 -971.9693 15.279 0175: set_car $TEMP_CAR2 z_angle_to 220.3879 00A5: $TEMP_CAR3 = create_car #YANKEE at 1131.5089 -976.8867 14.8664 0175: set_car $TEMP_CAR3 z_angle_to 359.1964 032B: $1 = create_weapon_pickup #COLT45 2 ammo 35 at 864.4614 -659.4612 15.6437 018A: $2 = create_checkpoint_at 1132.8865 -946.4482 14.8227 wait 2000 wait 0 fade 1 1000 wait 1000 00BC: text_highpriority 'DIAB2_6' 4000 ms 1 wait 4550 00BC: text_highpriority 'DIAB2_7' 4000 ms 1 wait 4500 00BC: text_highpriority 'DIAB2_A' 4000 ms 1 :WG2_13 wait 0 if 00FA: player $PLAYER_CHAR stopped 1 1132.8865 -946.4482 14.8227 radius 6.0 6.0 2.0 jf @WG2_13 01B4: set_player $PLAYER_CHAR frozen_state 0 fade 0 1000 wait 1000 0164: disable_marker $2 009A: $10 = create_actor 21 #WORKER1 at 1163.4467 -946.9119 15.1072 0249: release_model #DOCKER1 009A: $11 = create_actor 21 #WORKER2 at 1171.7148 -938.058 15.1072 0249: release_model #DOCKER2 0249: release_model #WORKER2 0249: release_model #WORKER1 009A: $12 = create_actor 21 #DOCKER1 at 1137.2382 -971.7172 14.8992 009A: $13 = create_actor 21 #DOCKER2 at 1126.908 -964.9676 14.9394 009A: $14 = create_actor 21 #WORKER2 at 1219.8732 -973.4395 14.9911 009A: $15 = create_actor 21 #DOCKER1 at 1211.5791 -957.0024 15.1183 01B2: give_actor $10 weapon 2 ammo 999 01B2: give_actor $11 weapon 2 ammo 999 01B2: give_actor $12 weapon 2 ammo 999 01B2: give_actor $13 weapon 2 ammo 999 01B2: give_actor $14 weapon 2 ammo 999 01B2: give_actor $15 weapon 2 ammo 999 02E2: set_actor $10 weapon_accuracy_to 30 02E2: set_actor $11 weapon_accuracy_to 30 02E2: set_actor $12 weapon_accuracy_to 30 02E2: set_actor $13 weapon_accuracy_to 30 02E2: set_actor $14 weapon_accuracy_to 30 02E2: set_actor $15 weapon_accuracy_to 30 011A: set_actor $10 flags 1 011A: set_actor $11 flags 1 011A: set_actor $12 flags 1 011A: set_actor $13 flags 1 011A: set_actor $14 flags 1 011A: set_actor $15 flags 1 0243: set_actor $10 ped_stats_to 16 0243: set_actor $11 ped_stats_to 16 0243: set_actor $12 ped_stats_to 16 0243: set_actor $13 ped_stats_to 16 0243: set_actor $14 ped_stats_to 16 0243: set_actor $15 ped_stats_to 16 0350: unknown_actor $10 not_scared_flag 1 0350: unknown_actor $11 not_scared_flag 1 0350: unknown_actor $12 not_scared_flag 1 0350: unknown_actor $13 not_scared_flag 1 0350: unknown_actor $14 not_scared_flag 1 0350: unknown_actor $15 not_scared_flag 1 015F: set_camera_position 1116.6379 -940.0818 18.9727 0.0 0.0 0.0 0160: point_camera 1140.8116 -962.9453 16.492 2 wait 1000 fade 1 1000 00BC: text_highpriority 'DIAB2_B' 6500 ms 1 wait 2500 015F: set_camera_position 1151.157 -954.5894 17.8227 0.0 0.0 0.0 0160: point_camera 1162.9115 -951.4281 15.8837 2 wait 2500 015F: set_camera_position 1140.6185 -961.9933 18.9727 0.0 0.0 0.0 0160: point_camera 1127.5525 -965.3035 15.7438 2 wait 1500 fade 0 1000 wait 1000 02EB: restore_camera_with_jumpcut 01B4: set_player $PLAYER_CHAR frozen_state 1 0186: $3 = create_marker_above_car $TEMP_CAR1 0186: $4 = create_marker_above_car $TEMP_CAR2 0186: $5 = create_marker_above_car $TEMP_CAR3 0187: $TEMP_VAR1 = create_marker_above_actor $10 0187: $TEMP_VAR2 = create_marker_above_actor $11 0187: $TEMP_VAR3 = create_marker_above_actor $12 0187: $TEMP_VAR4 = create_marker_above_actor $13 0187: $TEMP_VAR5 = create_marker_above_actor $14 0187: $TEMP_VAR6 = create_marker_above_actor $15 0165: set_marker $TEMP_VAR1 color_to 0 0165: set_marker $TEMP_VAR2 color_to 0 0165: set_marker $TEMP_VAR3 color_to 0 0165: set_marker $TEMP_VAR4 color_to 0 0165: set_marker $TEMP_VAR5 color_to 0 0165: set_marker $TEMP_VAR6 color_to 0 $TRUCKS_DESTROYED = 0 wait 1000 fade 1 1000 :WG2_CHECK wait 0 if and $TRUCKS_DESTROYED < 2 0119: car $TEMP_CAR1 wrecked jf @WG2_CHECK2 0164: disable_marker $3 0008: $TRUCKS_DESTROYED += 1 // integer values :WG2_CHECK2 wait 0 if and $TRUCKS_DESTROYED < 2 0119: car $TEMP_CAR2 wrecked jf @WG2_CHECK3 0164: disable_marker $4 0008: $TRUCKS_DESTROYED += 1 // integer values :WG2_CHECK3 wait 0 if and $TRUCKS_DESTROYED < 2 0119: car $TEMP_CAR3 wrecked jf @WG2_14 0164: disable_marker $5 0008: $TRUCKS_DESTROYED += 1 // integer values :WG2_14 wait 0 if $TRUCKS_DESTROYED == 2 jf @WG2_CHECK :WG2_15 wait 1000 00BC: text_highpriority 'DIAB2_D' 5500 ms 1 wait 3000 :WG_PASS wait 0 0394: play_music 1 01E3: text_1number_styled 'M_PASS' 1500 4000 ms 1 0109: player $PLAYER_CHAR money += 1500 02A7: $WONG_MISSION_MARKER = create_icon_marker_and_sphere 13 at 841.316 -664.0244 14.9727 $ONMISSION = 0 $WONG_PROGRESS = 2 return :WG_FAIL // Died or got busted during your mission 0051: return :WG_CLEAN // Clean up the contents of your mission so you can end it $ONMISSION = 0 00D8: mission_cleanup 0051: return

 

TL;DR - Markers aren't appearing, but cars are still being created (Almost like it's not reading the line) and for some reason the check I made is not working!

Edited by deltaCJ
GTA Forums editor some how messed up the code I inserted sorry :/

Share this post


Link to post
Share on other sites
ZAZ

main.scm or cleo?

please post whole script at pastebin

Share this post


Link to post
Share on other sites
ZAZ

It needs a own variable for each marker to avoid that the disable_marker code will be read thousand times per second

:WG2_CHECK4
wait 0
if and
    0118:   actor $10 dead
    $DeadActorFLAG1 == 0
jf @WG2_CHECK5
$DeadActorFLAG1 = 1
0164: disable_marker $TEMP_VAR1
jump @WG2_CHECK5
 
:WG2_CHECK5
if and
    0118:   actor $11 dead
    $DeadActorFLAG2 == 0
jf @WG2_CHECK6
$DeadActorFLAG2 = 1
0164: disable_marker $TEMP_VAR2
jump @WG2_CHECK6
 
:WG2_CHECK6
if and
    0118:   actor $12 dead
    $DeadActorFLAG3 == 0
jf @WG2_CHECK7
$DeadActorFLAG3 = 1
0164: disable_marker $TEMP_VAR3
jump @WG2_CHECK7

same for the cars

 if and
    0119:   car $TEMP_CAR1 wrecked
    $WreckedCarFLAG1 == 0
jf @WG2_CHECK7
$WreckedCarFLAG1 = 1
0164: disable_marker $3

 

and of course also in the cleanup section

:WG2_CLEAN
if
$DeadActorFLAG1 == 0
jf @WG2_CLEAN_1
0164: disable_marker $TEMP_VAR1

:WG2_CLEAN_1
if
$DeadActorFLAG2 == 0
jf @WG2_CLEAN_2
0164: disable_marker $TEMP_VAR2

:WG2_CLEAN_2
if
$DeadActorFLAG3 == 0
jf @WG2_CLEAN_3
0164: disable_marker $TEMP_VAR3

:WG2_CLEAN_3

and so on



01C2: remove_references_to_actor $WONG
01C2: remove_references_to_actor $10 
01C2: remove_references_to_actor $11
01C2: remove_references_to_actor $12
01C2: remove_references_to_actor $13
01C2: remove_references_to_actor $14
01C2: remove_references_to_actor $15


01C3: remove_references_to_car $TEMP_CAR1
01C3: remove_references_to_car $TEMP_CAR2
01C3: remove_references_to_car $TEMP_CAR3




// Clean up the contents of your mission so you can end it
$ONMISSION = 0
00D8: mission_cleanup
0051: return

 

 

 

 

 

 

 

btw. i found a little mistake in the 'WONG1' mission script

:WONG_CUTEND
00BE: text_clear_all
fade 0 1000
wait 1000
0171: set_player $PLAYER_CHAR z_angle_to 89.3415
02EB: restore_camera_with_jumpcut
01B4: set_player $PLAYER_CHAR frozen_state 1
02A3: toggle_widescreen 0
00A5: 1@ = create_car #KURUMA at 868.5852 -664.9392 14.5659
0175: set_car 1@ z_angle_to 358.4527
0186: 3@ = create_marker_above_car 1@
0165: set_marker 2@ color_to 0     <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<  should be 3@
wait 1000
fade 1 1000
wait 1000  
00BC: text_highpriority 'DIAB1_B' 3500 ms 1
 
:WONG_CARCHK
wait 10
if
    00DC:   player $PLAYER_CHAR driving 1@
jf @WONG_CARCHK
018A: 2@ = create_checkpoint_at 949.2166 -446.8219 14.8391
00BC: text_highpriority 'DIAB1_A' 3500 ms 1
0164: disable_marker 3@

 

Share this post


Link to post
Share on other sites
deltaCJ

Oops thanks for that, didn't notice. and thank you! I'll make sure to put that in right now :)

 

Thanks for the help.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.