Author Topic: SA/VC Mission Coding Troubleshooting  (Read 19212 times)

0 Members and 1 Guest are viewing this topic.

Offline вαℓυ

  • Lord of The Underground
  • Veteran Member
  • Posts: 3662
  • Killerstunter
    • View Profile
    • http://uk.youtube.com/user/Balujan
Re: SA/VC Mission Coding Troubleshooting
« Reply #45 on: June 15, 2010, 02:07:38 PM »
I went through Neo's first tutorial and messed with the script and now I pretty much know the very basic stuff but I've got a few questions I'd like to ask since it's still a bit confusing to me.

1. How do I create just one ped at a destination without any weapons? In Neo's tutorial it's explained how to spawn a ped inside a car and I ran through the opcodes dozens of times but couldn't find anything.

2. What are these label and jump thingies and if I want to make a longer script, how do I know which label comes after? The last label is :Label008743.

3. This question is related to the first question. Actually, this isn't a question but I just want find out if it's the spawn ped opcode which is crashing my game because I think that's the problem but could you please take a look and see if there are any other errors? :P

:Label008700
0001: wait  1000& ms
0247: request_model #BKB
00D6: if  0?
8248:   NOT   model #BKB available
004D: jump_if_false ££Label008706
0001: wait  1000& ms
0002: jump ££Label008700

:Label008706
038B: load_requested_models
0001: wait  1000& ms
0002: jump ££Label008711

:Label008711
0001: wait  1000& ms
01ED: spawn actor  28?? at 390.50!  -500.93!  9.39! - Pretty sure this is the cause.
0002: jump ££Label008717


Thanks a lot! :P

Offline Jerka

  • Posts: 414
    • View Profile
Re: SA/VC Mission Coding Troubleshooting
« Reply #46 on: June 15, 2010, 03:05:24 PM »
try this

009A:  28?? = create_actor  4? #BKB at  390.50!  -500.93!  9.39!

Offline Neo Anderson

  • ATS precision whore
  • Veteran Member
  • Posts: 5079
  • Registered on: April 16, 2004
    • View Profile
Re: SA/VC Mission Coding Troubleshooting
« Reply #47 on: June 15, 2010, 03:43:14 PM »
First off you might wanna check this thread http://www.gtastunting.net/forums/index.php?topic=22733.0 if your talking about MY tutorial on coding. It explains things in more detail.

Swooth is right as to your first question.

Labels are the way the code tells the game what it's gonna do and in what order. Hence why most labels increase in their number, like :Label008706 than when the code is done within that label it goes 0002: jump ££Label008711. The "jump" label tells the code to go to the next label which is :Label008711 than carry out the code you write in that label.

Label numbers can be any number really as long as the next on is higher. If the number is not higher the code will "jump" back and repeat a previous set of commands again.

Yes that opcode is what is causing your crash. Use opcode 009A:  28?? = create_actor  4? #BKB at  390.50!  -500.93!  9.39!

Offline kaneda

  • Veteran Member
  • Posts: 2338
    • View Profile
    • @pump_upp - best crypto pumps on telegram !
Re: SA/VC Mission Coding Troubleshooting
« Reply #48 on: June 15, 2010, 05:07:51 PM »
Code: [Select]
:Label008700
0001: wait  1000& ms
0247: request_model #BKB
00D6: if  0?
8248:   NOT   model #BKB available
004D: jump_if_false ££Label008706
0001: wait  1000& ms
0002: jump ££Label008700

:Label008706
038B: load_requested_models
0001: wait  1000& ms
0002: jump ££Label008711

:Label008711
0001: wait  1000& ms
01ED: spawn actor  28?? at 390.50!  -500.93!  9.39! - Pretty sure this is the cause.
0002: jump ££Label008717

It also looks like your jump_if_false command in the first thread is jumping to the wrong thread. It should jump back to the initial thread.

You have: 004D: jump_if_false ££Label008706

but it should be jumping to Label008700. You should be able to streamline that whole thread too. You could knock it down to this:

Code: [Select]
:Label008700
0001: wait  1000& ms
0247: request_model #BKB
038B: load_requested_models

:Label008900
00D6: if  0?
8248:   NOT   model #BKB available
004D: jump_if_false ££Label008700
009A:  28?? = create_actor  4? #BKB at  X!  Y!  Z!
004E: end_thread

Keep in mind that labels can read pretty much anything, but if you're using a numerical label system like in the example the numbers should always climb.

« Last Edit: June 15, 2010, 05:12:38 PM by kaneda »

Offline вαℓυ

  • Lord of The Underground
  • Veteran Member
  • Posts: 3662
  • Killerstunter
    • View Profile
    • http://uk.youtube.com/user/Balujan
Re: SA/VC Mission Coding Troubleshooting
« Reply #49 on: April 06, 2011, 10:47:48 PM »
Bumpity Bump, again. :euro:

Is it possible to fire up cheatcodes through scripting? Lets say, the slowmotion cheat (BOOOOOORING)? :P

Offline kaneda

  • Veteran Member
  • Posts: 2338
    • View Profile
    • @pump_upp - best crypto pumps on telegram !
Re: SA/VC Mission Coding Troubleshooting
« Reply #50 on: April 07, 2011, 01:31:55 AM »
Code: [Select]
015D: set_gamespeed  .6!
That's what the cheat results in. You can drop it down further though for slower gameplay. I'm sure you can speed it up as well, and if I remember correctly it's as simple as replacing .6 with 2.

Default game speed is, naturally, 1.

Other cheats I'm not sure of - making all cars planes for example. Check the opcode list and tinker is the best way to find out.

Offline Reynard The Fox

  • Reynolds
  • Senior Member
  • Posts: 3291
    • View Profile
Re: SA/VC Mission Coding Troubleshooting
« Reply #51 on: April 07, 2011, 05:16:21 AM »
http://www.gtamodding.com/index.php?title=Memory_Addresses_%28SA%29
There are some cheat memory addresses in there. Almost every one of them is a boolean value, 1 for on and 0 for off. With Cleo you can inject this line into the game.
Code: [Select]
0A8C: write_memory 0x96914C size 1 value 1 virtual_protect 0This will turn on perfect handling.

Offline вαℓυ

  • Lord of The Underground
  • Veteran Member
  • Posts: 3662
  • Killerstunter
    • View Profile
    • http://uk.youtube.com/user/Balujan
Re: SA/VC Mission Coding Troubleshooting
« Reply #52 on: April 07, 2011, 07:53:09 AM »
Thanks, Kaneda & Reynolds. :D

Offline Jerka

  • Posts: 414
    • View Profile
Re: SA/VC Mission Coding Troubleshooting
« Reply #53 on: June 07, 2011, 07:15:00 PM »
Could someone tell me which opcode allows vehicles to ignore paths? (damn roads)

Edit: I looked back one page and found it, nvm  :happy:

Edit again, 00AF: set_car_driver_behaviour  400?? 8? doesn't seem to work for me, neither does 00AF: set_car  404?? driver_behaviour_to  2? which is copied right from the original SCM, any help?

Code: [Select]
DEFINE VERSION VICE 0.22

0002: jump ££Label008620
DEFINE MEMORY  34329

:Label008620
0002: jump ££Label008644
DEFINE OBJECTS  1
DEFINE OBJECT DOOR                        \\ This is an unused object. You can put anything here.

:Label008644
0002: jump ££Label008658
DEFINE MISSIONS  0

;-------------MAIN---------------


:Label008658
03A4: name_thread "MAIN"
016A: fade  0? ()  0? ms
01F0: set_max_wanted_level_to  0?
03AD: toggle_rubbish  0?
03DE: set_pedestrians_density_multiplier_to  0?
01EB: set_car_density_to  0?
0111: set_wasted_busted_check_to  0? (disabled)
00C0: set_current_time  10?  0?
04E4: unknown_refresh_game_renderer_at  -804.36!  971.22!
03CB: set_camera  -804.36!  971.22!  10.62!
0053: $PLAYER_CHAR = create_player #NULL at  -804.36!  971.22!  10.62!
01F5: $PLAYER_ACTOR = create_emulated_actor_from_player $PLAYER_CHAR
0330: set_player $PLAYER_CHAR infinite_run_to  1? (true)
0001: wait  0? ms
01B6: set_weather  0?
00D6: if  0?
8118:   NOT   actor $PLAYER_ACTOR dead
004D: jump_if_false ££Label0086EF
0352: set_actor $PLAYER_ACTOR skin_to "PLAYER"
038B: load_requested_models
0353: refresh_actor $PLAYER_ACTOR
0222: set_player  2228?? health_to  100!

:Label0086EF
016A: fade  1? (back)  1000& ms
00D6: if  0?
0256:   player $PLAYER_CHAR defined
004D: jump_if_false ££Label0086EF
04BB: select_interiour  0?  \\ select render area
01B4: set_player $PLAYER_CHAR frozen_state  1? (unfrozen)
01B7: release_weather

:Label008700
0001: wait  1000& ms
0247: request_model #PCJ600
0247: request_model #INFERNUS
0247: request_model #UZI
0247: request_model #ARMY
0247: request_model #hotring
0247: request_model #coach
00D6: if  0?
8248:   NOT   model #PCJ600 available
8248:   NOT   model #INFERNUS available
8248:   NOT   model #UZI available
8248:   NOT   model #ARMY available
8248:   NOT   model #hotring available
8248:   NOT   model #coach available
004D: jump_if_false ££Label008706
0001: wait  1000& ms
0002: jump ££Label008700

:Label008706
038B: load_requested_models
0001: wait  1000& ms
0002: jump ££Label008711

:Label008711
0001: wait  1000& ms
00A5: 400?? = create_car #coach at -804.36!  971.22!  10.62!
0001: wait  1000& ms
0175: set_car  400?? z_angle_to  180!
00A5: 404?? = create_car #hotring at -792.33!  834.68!  10.98!
0001: wait  1000& ms
00AF: set_car  400?? driver_behaviour_to  8?
00AF: set_car  404?? driver_behaviour_to  8?
0001: wait  1000& ms
00AE: unknown_set_car  400?? to_ignore_traffic_lights  1?
00AE: unknown_set_car  404?? to_ignore_traffic_lights  1?
0001: wait  1000& ms
00AD: set_car  400?? max_speed_to  100!
00AD: set_car  404?? max_speed_to  100!
0001: wait  1000& ms
02AC: set_car  400?? immunities  1?  1?  1?  1?  1?
02AC: set_car  404?? immunities  1?  1?  1?  1?  1?
0001: wait  1000& ms
02C2: car  400?? drive_to_point -806.27!  834.92!  10.98!
02C2: car  404?? drive_to_point -804.36!  971.22!  10.62!
0001: wait  5000& ms
0002: jump ££Label008743

:Label008743
0001: wait  1000& ms
0002: jump ££Label008743
« Last Edit: June 07, 2011, 07:51:45 PM by Swooth »

Offline Nerochaos

  • Cyber End Dragon
  • Posts: 92
  • CED Crew
    • View Profile
    • My Profiles
Re: SA/VC Mission Coding Troubleshooting
« Reply #54 on: September 25, 2011, 07:31:15 AM »
I make the intro
But I don't know create text as this clip
Absurd
The text "ATS" is move up
How to make it :D
Thank Kaneda!

Offline [CED]NhokNhut

  • Posts: 10
  • I liek teh stuntz
    • View Profile
Re: SA/VC Mission Coding Troubleshooting
« Reply #55 on: November 12, 2011, 10:54:55 PM »
I want to create intro like this clip, Kaneda please guide me?
Music O Fortuna hey !!
Trial by Fire

Offline Shingetsu

  • The Dark Matter
  • Veteran Member
  • Posts: 1428
  • Azurex Studio
    • View Profile
Re: SA/VC Mission Coding Troubleshooting
« Reply #56 on: August 26, 2012, 03:43:21 AM »
How i can control the angle of camera  :(

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal