Quantcast

Jump to content

» «
Photo

What's wrong with that code?

10 replies to this topic
Maru89
  • Maru89

    Player Hater

  • Members
  • Joined: 09 Dec 2012

#1

Posted 25 April 2013 - 12:22 PM Edited by Maru89, 25 April 2013 - 01:53 PM.

I've tried to make my own mission for GTA 3. Everything works fine untill I enter the mission and watch the "cutscene". After the fade the player just freezes and cannot move at all. Also I can't get to the menu although it's possible to look around with NUM4 and NUM6.

I've tried everything and still cannot find out what's wrong. So here's the code:

CODE
:DARKEL1
gosub @DARKEL1_36
if
wasted_or_busted
else_jump @DARKEL1_27
gosub @DARKEL1_1020

:DARKEL1_27
gosub @DARKEL1_1093
end_thread

:DARKEL1_36
increment_mission_attempts
$ONMISSION = 1 // integer values
$ON_MISSION_FOR_DARKEL = 1 // integer values
thread 'DARKEL1'
wait 0
02A3: toggle_widescreen 1
023C: load_special_actor 1 'DARKEL'
fade 1 1500
jump @DARKEL1_96

:DARKEL1_96
if
823D:   not special_actor 1 loaded
else_jump @DARKEL1_122
wait 0
jump @DARKEL1_96

:DARKEL1_122
02A3: toggle_widescreen 1
01B4: set_player $PLAYER_CHAR frozen_state 0
01F7: set_player $PLAYER_CHAR ignored_by_cops_state_to 1
0171: set_player $PLAYER_CHAR z_angle_to 180.0
009A: $DARKEL = create_actor 21 #SPECIAL01 at 1320.5 -170.5 15.1875
0173: set_actor $DARKEL z_angle_to 0.0
020F: actor $DARKEL look_at_player $PLAYER_CHAR
jump @DARKEL1_189

:DARKEL1_189
if
0118:   actor $DARKEL dead
else_jump @DARKEL1_227
00BC: text_highpriority 'DAR_DED' 5000 ms 1
jump @DARKEL1_1020

:DARKEL1_227
015F: set_camera_position 1322.5 -180.5 19.5 0.0 0.0 0.0
0395: clear_area 1 at 1322.5 -180.5 range 10.0 10.0
0157: camera_on_player $PLAYER_CHAR 15 1
00BC: text_highpriority 'DARK1_A' 5000 ms 2
02A1: (unknown) 5000 1
jump @DARKEL1_301

:DARKEL1_301
if
0118:   actor $DARKEL dead
else_jump @DARKEL1_339
00BC: text_highpriority 'DAR_DED' 5000 ms 1
jump @DARKEL1_1020

:DARKEL1_339
020F: actor $DARKEL look_at_player $PLAYER_CHAR
00BC: text_highpriority 'DARK1_B' 5000 ms 2
02A1: (unknown) 5000 1
jump @DARKEL1_376

:DARKEL1_376
if
0118:   actor $DARKEL dead
else_jump @DARKEL1_414
00BC: text_highpriority 'DAR_DED' 5000 ms 1
jump @DARKEL1_1020

:DARKEL1_414
020F: actor $DARKEL look_at_player $PLAYER_CHAR
00BC: text_highpriority 'DARK1_C' 5000 ms 2
02A1: (unknown) 5000 1
jump @DARKEL1_451

:DARKEL1_451
if
0118:   actor $DARKEL dead
else_jump @DARKEL1_489
00BC: text_highpriority 'DAR_DED' 5000 ms 1
jump @DARKEL1_1020

:DARKEL1_489
020F: actor $DARKEL look_at_player $PLAYER_CHAR
00BC: text_highpriority 'DARK1_D' 5000 ms 2
02A1: (unknown) 5000 1
jump @DARKEL1_526

:DARKEL1_526
if
0118:   actor $DARKEL dead
else_jump @DARKEL1_564
00BC: text_highpriority 'DAR_DED' 5000 ms 1
jump @DARKEL1_1020

:DARKEL1_564
020F: actor $DARKEL look_at_player $PLAYER_CHAR
00BC: text_highpriority 'DARK1_E' 5000 ms 2
02A1: (unknown) 5000 1
jump @DARKEL1_601

:DARKEL1_601
if
0118:   actor $DARKEL dead
else_jump @DARKEL1_639
00BC: text_highpriority 'DAR_DED' 5000 ms 1
jump @DARKEL1_1020

:DARKEL1_639
020F: actor $DARKEL look_at_player $PLAYER_CHAR
00BC: text_highpriority 'DARK1_F' 5000 ms 2
02A1: (unknown) 5000 1
jump @DARKEL1_676

:DARKEL1_676
if
0118:   actor $DARKEL dead
else_jump @DARKEL1_714
00BC: text_highpriority 'DAR_DED' 5000 ms 1
jump @DARKEL1_1020

:DARKEL1_714
020F: actor $DARKEL look_at_player $PLAYER_CHAR
00BC: text_highpriority 'DARK1_G' 1500 ms 2
02A1: (unknown) 1500 1
fade 0 1500
jump @DARKEL1_758

:DARKEL1_758
if
fading
else_jump @DARKEL1_782
wait 0
jump @DARKEL1_758

:DARKEL1_782
02A3: toggle_widescreen 0
01B4: set_player $PLAYER_CHAR frozen_state 1
01F7: set_player $PLAYER_CHAR ignored_by_cops_state_to 0
02EB: restore_camera_with_jumpcut
jump @DARKEL1_809

:DARKEL1_809
wait 500
fade 1 1500
034F: destroy_actor_with_fade $DARKEL // The actor fades away like a ghost
01EB: set_car_density_to 2.0
0297: clear_rampage_kills
032B: $DARKEL1_UZI = create_weapon_pickup #UZI 3 ammo 0 at 1320.5 -140.0 15.1875
02A8: $DARKEL1_UZI_MARKER = create_marker 20 at 1320.5 -140.0 15.1875

:DARKEL1_870
if
8214:   not pickup $DARKEL1_UZI picked_up
else_jump @DARKEL1_897
wait 0
jump @DARKEL1_870

:DARKEL1_897
0164: disable_marker $DARKEL1_UZI_MARKER
01F9: init_rampage 'DARK1_1' 3 241000 20 #FAKETARGET #PLAYERSDOOR #PLAYERSDOOR #PLAYERSDOOR 0  // DESTROY 20 CARS!
01FA: $DAR_RAMPAGE_STATUS = rampage_status

:DARKEL1_936
if
 $DAR_RAMPAGE_STATUS == 1 // integer values
else_jump @DARKEL1_970
wait 0
01FA: $DAR_RAMPAGE_STATUS = rampage_status
jump @DARKEL1_936

:DARKEL1_970
if
 $DAR_RAMPAGE_STATUS == 2 // integer values
else_jump @DARKEL1_1002
$PASSED_DARKEL1 = 1 // integer values
jump @DARKEL1_1037

:DARKEL1_1002
if
 $DAR_RAMPAGE_STATUS == 3 // integer values
else_jump @DARKEL1_1020

:DARKEL1_1020
00BA: text_styled 'M_FAIL' 5000 ms 1  // MISSION FAILED!
return

:DARKEL1_1037
0394: play_music 1
01E3: text_1number_styled 'M_PASS' 10000 5000 ms 1  // MISSION PASSED! $~1~
0110: clear_player $PLAYER_CHAR wanted_level
0109: player $PLAYER_CHAR money += 20000
0318: set_latest_mission_passed 'DARKEL1'
030C: set_mission_points += 1
01EB: set_car_density_to 1.0
return

:DARKEL1_1093
$ONMISSION = 0 // integer values
$ON_MISSION_FOR_DARKEL = 0 // integer values
0164: disable_marker $DARKEL1_UZI_MARKER
0215: destroy_pickup $DARKEL1_UZI
0296: unload_special_actor 1
mission_cleanup
return

Ashwin.Star
  • Ashwin.Star

    Back for Next ♪♫

  • Members
  • Joined: 14 Nov 2010
  • India

#2

Posted 25 April 2013 - 01:27 PM

this thing can be happen when player is Frozen,

As long as i remember,
in opcode
"01B4: set_player $PLAYER_CHAR frozen_state 1"
the last peremeter '1' means don't allow player to move
Try to change it with 0,

may be i remember incorrect,
so i am checking it again

Maru89
  • Maru89

    Player Hater

  • Members
  • Joined: 09 Dec 2012

#3

Posted 25 April 2013 - 04:39 PM

QUOTE (Ashwin the new boy @ Thursday, Apr 25 2013, 13:27)

"01B4: set_player $PLAYER_CHAR frozen_state 1"
the last peremeter '1' means don't allow player to move
Try to change it with 0

No, that didn't help but thanks anyway.

ZAZ
  • ZAZ

    Kernlochbohrer

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

#4

Posted 25 April 2013 - 07:39 PM

I have tested your script, it worked. First the camera showed me the cutscene,
then text appeared "Darke1 A missing", then wait 5 seconds,
then text appeared "Darke1 B missing", then wait 5 seconds,
then text appeared "Darke1 C missing", then wait 5 seconds,
then text appeared "Darke1 E missing", then wait 5 seconds,
then text appeared "Darke1 F missing", then wait 5 seconds,
then text appeared "Darke1 G missing", then wait 5 seconds,
then fade back and camera switched back to player and player was movable and everything was normal
then picked up the weaponpickup and got the message "Darke1 A missing"
then i tried to do rampage, but couldn't complete, but failed and got the message "Mission failed"

Maru89
  • Maru89

    Player Hater

  • Members
  • Joined: 09 Dec 2012

#5

Posted 26 April 2013 - 04:24 AM

The "Darkel1 missing" was because of missing strings in american.gxt. Anyway how come the same script works for you and it doesn't work for me?

Ashwin.Star
  • Ashwin.Star

    Back for Next ♪♫

  • Members
  • Joined: 14 Nov 2010
  • India

#6

Posted 26 April 2013 - 08:09 AM

May be Because of any other Script,

Maru89
  • Maru89

    Player Hater

  • Members
  • Joined: 09 Dec 2012

#7

Posted 26 April 2013 - 02:00 PM

I don't think so. I used the original main.scm and didn't change other missions except adding one thread to make it possible to start the my mission.

ZAZ
  • ZAZ

    Kernlochbohrer

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

#8

Posted 26 April 2013 - 02:09 PM

so post the mission starter script and where you placed it in main.scm

Maru89
  • Maru89

    Player Hater

  • Members
  • Joined: 09 Dec 2012

#9

Posted 26 April 2013 - 02:44 PM Edited by Maru89, 26 April 2013 - 06:55 PM.

QUOTE (ZAZ @ Friday, Apr 26 2013, 14:09)
so post the mission starter script and where you placed it in main.scm

First script. This will give you a message on the pager and create the sphere and icon:
CODE
:DARK_PH
thread 'DARK_PH'

:DARK_PH_10
wait 15000
if
0256:   player $PLAYER_CHAR defined
else_jump @DARK_PH_107
if
03C6:   current_island == 1
else_jump @DARK_PH_107
if
 $ONMISSION == 0 // integer values
else_jump @DARK_PH_107
014D: text_pager 'DA_PH1' 140 2 0  // I'd have some job for a man like you. If you're interested get to the tunnel between Supa Save! and that bald bomb maniac's autoyard.
02A7: $DARKEL_MISSION_MARKER = create_icon_marker_and_sphere 6 at 1320.5 -165.5 15.1875
create_thread @NONAME_77
end_thread

:DARK_PH_107
jump @DARK_PH_10


Second one. This one will start the mission when the player walks in sphere:
CODE
:NONAME_77
wait $DEFAULT_WAIT_TIME
if and
 $FLAG_STAUNTON_OPEN == 1 // integer values
 $PASSED_DARKEL1 == 0 // integer values
else_jump @NONAME_77_32
end_thread

:NONAME_77_32
if
 $PASSED_DARKEL1 == 1 // integer values
else_jump @NONAME_77_52
end_thread

:NONAME_77_52
if
0256:   player $PLAYER_CHAR defined
else_jump @NONAME_77_298
if
00F6:   player $PLAYER_CHAR 0 1320.5 -165.5 15.1875 radius 1.5 2.0 2.0
else_jump @NONAME_77_298
if
 $ONMISSION == 0 // integer values
else_jump @NONAME_77_298
if
03EE:   player $PLAYER_CHAR controllable
else_jump @NONAME_77_205
03EF: player $PLAYER_CHAR make_safe
0169: set_fade_color 0 0 0
fade 0 1500
03AF: set_streaming 0
00BA: text_styled 'DARK1' 15000 ms 2  // 'CARMAGEDDON'

:NONAME_77_177
if
fading
else_jump @NONAME_77_201
wait 0
jump @NONAME_77_177

:NONAME_77_201
start_mission 80

:NONAME_77_205
if
8256:   not player $PLAYER_CHAR defined
else_jump @NONAME_77_228
jump @NONAME_77

:NONAME_77_228
if
00F6:   player $PLAYER_CHAR 0 1320.5 -165.5 15.1875 radius 1.5 2.0 2.0
else_jump @NONAME_77_298
wait 0
if
8256:   not player $PLAYER_CHAR defined
else_jump @NONAME_77_291
jump @NONAME_77

:NONAME_77_291
jump @NONAME_77_228

:NONAME_77_298
jump @NONAME_77


The first one is between restarting script on Staunton (the thread is called :C_RSTRT) and the King Courtney's call on pager (thread called :YARD_PH)
The second one is between script to start 'The Exchange' mission and script for saving I think (it's called :I_SAVE)

And few more things that were necessary.

One line in "MAIN" thread:
CODE
$PASSED_DARKEL1 = 0 // integer values


Define missions were increased to 81 (original one has 80) and added a line:
CODE
DEFINE MISSION 80 AT @DARKEL1

ZAZ
  • ZAZ

    Kernlochbohrer

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

#10

Posted 27 April 2013 - 10:37 AM

this cause the problem, i don't know why
CODE
03EF: player $PLAYER_CHAR make_safe

and the blocks after start mission are not good
try this missionstarter as Second one. This one will start the mission when the player walks in sphere:
CODE
:NONAME_77
wait $DEFAULT_WAIT_TIME
if and
$FLAG_STAUNTON_OPEN == 1 // integer values
$PASSED_DARKEL1 == 0 // integer values
else_jump @NONAME_77_32
end_thread

:NONAME_77_32
if
$PASSED_DARKEL1 == 1 // integer values
else_jump @NONAME_77_52
end_thread

:NONAME_77_52
if
0256:   player $PLAYER_CHAR defined
else_jump @NONAME_77
if
00F6:   player $PLAYER_CHAR 0 1320.5 -165.5 15.1875 radius 1.5 2.0 2.0
else_jump @NONAME_77
if
$ONMISSION == 0 // integer values
else_jump @NONAME_77

//if
//03EE:   player $PLAYER_CHAR controllable
//else_jump @NONAME_77_298
//03EF: player $PLAYER_CHAR make_safe
0169: set_fade_color 0 0 0
fade 0 1500
03AF: set_streaming 0
00BA: text_styled 'DARK1' 15000 ms 2  // 'CARMAGEDDON'

:NONAME_77_177
if
fading
else_jump @NONAME_77_201
wait 0
jump @NONAME_77_177

:NONAME_77_201
start_mission 0
wait 1000
jump @NONAME_77

Maru89
  • Maru89

    Player Hater

  • Members
  • Joined: 09 Dec 2012

#11

Posted 27 April 2013 - 12:53 PM

It worked biggrin.gif
Thank you a lot. Here are some cookies for you: cookie.gif cookie.gif cookie.gif cookie.gif cookie.gif




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users