Quantcast

Jump to content

» «
Photo

GTA VC: The Bonus Missions

1 reply to this topic
LikeBAX
  • LikeBAX

    aka MC Vic

  • Members
  • Joined: 31 Dec 2009
  • Russia

#1

Posted 28 October 2013 - 05:38 PM Edited by MC Vic, 28 October 2013 - 06:00 PM.

bezymyannyjj3.png

 

Hi everyone! Over a year ago I had an idea to continue GTA VC storyline, because it's not ended. After Keep Your Friends Close mission, Tommy receives calls from Kent Paul and Ernest Kelly (then also from Colonel Cortez). Paul tells Tommy that Mercedes became a prostitute and Kelly says that he's recovering.

Also, it's known that in hud.txd you can see an unused icon - Mitch Baker.

So, I started making 3 new missions with cut-scenes, using CLEO. One from Paul, one from Kelly, and one from Baker.

VC coding don't allow .cm missions, so I decided to write them as usual CLEO scripts.

But after some tested parts, I got trouble. First, the cut-scene was OK, and then the ingame scene and the gameplay too.

But after the third test, the game started crashing.

I don't know what to do,

I need help because it's only my 2nd script for Vice City.

The script structure:

1. Cutscene

2. Ingame scene (the game OFTEN crashes)

3. Gameplay - fighting (the game OFTEN crashes)







Spoiler

ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union
  • Contribution Award [Mods]
    Helpfulness Awards [Mods]

#2

Posted 29 October 2013 - 07:39 PM Edited by ZAZ, 29 October 2013 - 07:41 PM.

Did you really made your own cutscene data? .. respect, if it works

 

The local vars in simple threads are limited to 16@

so this cause a crash:

018A: 17@ = create_checkpoint_at -375.6873 -517.59 12.7934
Marker.Disable(17@)

and 16@ is used as internal timer and can't be used for other stuff

so this cause also a crash:

Actor.Create(16@,4,#BMOTR,-1146.1782, -445.979, 11.1213)
Actor.Health(16@) = 100
...
01CA: actor 16@ kill_player $PLAYER_CHAR
..
Actor.Dead(16@)
.
Actor.DestroyInstantly(16@)

test the script below to see how the internal timer works:

{$CLEO}
:test_1
03A4: name_thread 'TEST'

:test_2
wait 0
01E3: text_1number_styled 'A_TIME' 16@ 250 ms 4

if
16@ > 10000
jf @test_2
16@ = 0
jump @test_2

Additional advice:

 

Global vars in cleo can cause bugs and crashes

so use locals for the cutscene vars

02E5: 3@ = create_cutscene_object #SPECIAL01
02E6: set_cutscene_anim 3@ 'CSPLAY'

02E5: 4@ = create_cutscene_object #SPECIAL02
02E6: set_cutscene_anim 4@ 'CSKENT'

...
02E8: 5@ = cutscenetime

..
798 > 5@ // integer values

the check for $1140 is ok if you need it, because it checks only for this global

$1140 == 1

but it isn't reliable that it always works

 

 

the wasted busted check works only in mission scripts

if or
wasted_or_busted
Actor.Dead(2@)

you should do the check in this way:

:go
wait 0
if
   Player.Defined($player_char)
jf @MissionFailed
if
   Actor.Dead(2@)
jf @8
jump @MissionFailed

It's not reliable that a conditional check with more than 7 condition works

:6
wait 1000<-------- too much wait time
if and
Model.available(#BMYBB)
Model.available(#BMYCR)
Model.available(#BMYST)
Model.available(#BMYRI)
Model.available(#BMYBU)
Model.available(#BMOST)
Model.available(#BMODK)
023D: special_actor 1 loaded
jf @6

you should do the check in this way:

:6a
wait 0
if
023D:   special_actor 1 loaded
jf @6a

:6b
wait 0
if and
   Model.Available(#BMYBB)
   Model.Available(#BMYCR)
   Model.Available(#BMYST)
   Model.Available(#BMYRI)
   Model.Available(#BMYBU)
   Model.Available(#BMOST)
   Model.Available(#BMODK)
jf @6b

opcodes for location checks like 00F5: or 0100: can show the pink sphere

00F5: player $PLAYER_CHAR 0 -1153.4719 -366.4713 10.9067 radius 3.0 3.0 3.0
0100: actor $PLAYER_ACTOR near_point_in_car -375.6873 -517.59 12.7934 radius 5.0 5.0 5.0 sphere 0

it needs to set the parameter to 1, in opcode 00F5: the 2. param, in opcode 0100: the last param

 

also does it need to have max. waittime of 0 milliseconds in the loop, otherwise the sphere is flickering or not shown

 

your check have 2 wait codes and cause a flickering:

:BANKJOB_91
wait 0
if
Player.Defined($PLAYER_CHAR)
jf @BANKJOB_91
wait 0
if
00F5: player $PLAYER_CHAR 1 -1153.4719 -366.4713 10.9067 radius 3.0 3.0 3.0
else_jump @BANKJOB_91
Player.CanMove($PLAYER_CHAR) = False
00BA: text_styled 'GE17' 2000 ms 2
0164: disable_marker 1@
jump @MissionStart

this check shows the sphere correct

:BANKJOB_91
wait 0 
if 
   Player.Defined($player_char)
jf @BANKJOB_91 
if 
00F5:   player $player_char 1 -1153.472 -366.4713 10.9067 radius 3.0 3.0 3.0 
jf @BANKJOB_91

same for the check at script end

:go
wait 0
if or
wasted_or_busted
Actor.Dead(2@)
jf @8
jump @MissionFailed

:8
wait 0<--- useless because next else_jump jumps to @go
if
0100: actor $PLAYER_ACTOR near_point_in_car -375.6873 -517.59 12.7934 radius 5.0 5.0 5.0 sphere 0<-- change it to 1
jf @go

the return codes which will following now, is wrong, because return may only be use in subscripts which was called by gosub

but it will not be read, because gosub @MissionPassed leads into subscript which ends with 05DC: end_custom_thread

:8
wait 0
if
0100: actor $PLAYER_ACTOR near_point_in_car -375.6873 -517.59 12.7934 radius 5.0 5.0 5.0 sphere 0
jf @go
Marker.Disable(17@)
gosub @MissionPassed
return<-----------------------wrong

also this is useless:

gosub @MissionPassed
return

you can also write it in this way:

:8
if
0100: actor $PLAYER_ACTOR near_point_in_car -375.6873 -517.59 12.7934 radius 5.0 5.0 5.0 sphere 1
jf @go
Marker.Disable(17@)
wait 500
00BA: text_styled 'PAS1' 5000 ms 1 // MISSION PASSED!
0394: play_music 1
0318: set_latest_mission_passed 'GE17'
$ONMISSION = 0 // integer values
mission_cleanup
05DC: end_custom_thread




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users