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

0 Members and 1 Guest are viewing this topic.

Offline kaneda

  • Veteran Member
  • Posts: 2338
    • View Profile
    • @pump_upp - best crypto pumps on telegram !
SA/VC Mission Coding Troubleshooting
« Reply #15 on: September 18, 2008, 10:01:00 PM »
If you repeat the one model, they'll all have the same skin, yes. Like if you spawned in 20 #COP actors - they'll all be the same model with the same skin.

I'm guessing what you're asking is how to get 20 or so Tommys in, all with distinct skins, yeah?

Offline Flat Face

  • With power comes lulz
  • Administrator
  • Posts: 9243
    • View Profile
SA/VC Mission Coding Troubleshooting
« Reply #16 on: September 18, 2008, 10:28:40 PM »
i'll help him with this one

Ok in the img you've got a bunch of different peds right? like HFYMD and hmobe for instance, what you do is replace each one with the tommy model and a tommy skin in the txd  then spawn each different ped in the intro so that you have many different tommy's

Offline kaneda

  • Veteran Member
  • Posts: 2338
    • View Profile
    • @pump_upp - best crypto pumps on telegram !
SA/VC Mission Coding Troubleshooting
« Reply #17 on: September 18, 2008, 10:45:35 PM »
That's the way I've always done it. It's a workload, and you can run into problems with certain peds not behaving like they should, but that's it in a nutshell.

Offline Dannye

  • Veteran Member
  • Posts: 3564
    • View Profile
SA/VC Mission Coding Troubleshooting
« Reply #18 on: September 19, 2008, 12:54:54 AM »
Code: [Select]
014B: $bob = init_parked_car_generator #PATRIOT 43 72 0 alarm 0 door_lock 0 0 10000 at -1022.6.0 -868.6.0 12.2.0 angle 175.0Parameters (not 100% sure on all of them):
  • $bob: Just a name for it so you can refer to it later, can be anything you want (but should start with a '$').
  • #PATRIOT: The id of the car you want to spawn (check default.ide for list of cars if ya want something else).
  • 43: Primary car colour (I'm only guessing here, but perhaps when you see -1 used in other examples in the game's original code, it means no set colour is defined, so a colour will be picked at random?)
  • 72: Secondary car colour (ditto the above guess)
  • 1: Whether or not the car belongs to the player, thus whether or not you may get police attention for stealing it (0 = not yours, 1 = yours) (notice all the sunshine autos car spawns have a 1).
  • 0: % chance of alarm going off when you enter it (0 = never go off, 1 = always go off)
  • 0: % chance of doors being locked when you try to enter it (0 = never locked, 1 = always locked)
  • 0: All I know is that its an integer, but since its always set to 0 in every 014B in the original SCM code, its a safe bet that you can just leave it as 0.
  • 10000: Not sure, I read somewhere that it could be car health, and that does sound appropriate (again, its used in every 014B in the original code, so I'm sure there's no harm with sticking with that value).
  • 1022.6: X-axis position of the car
  • -868.6: Y-axis position of the car
  • 12.2: Z-axis position of the car (can think of this as the height)
  • 175: Angle the car is facing (0 = north, 180 = south, etc)
Code: [Select]
014C: set_parked_car_generator $bob cars_to_generate_to 101Parameters:
  • $bob: In this opcode you must refer to a generator previously created using 014B, thus the reason why we use $bob here too, because we are referring to the previous one we wrote where we called it $bob.
  • 101: Notice that in the original game code, there are only two values ever used, 0 and 101. Its pretty much a toggle, to turn the car generator on or off. I most cases you are going to want to use the value 101 - because thats the 'enabled' value. (The only time R* use 0 is when they set up, for example, the Sunshine Autos car generators at the beginning - because they don't want the cars spawning there at the start of the game [later on in the code, at the spot where you complete the mission that makes the car(s) spawn, they then perform a 014C again, this time using a 101 value]).
« Last Edit: September 19, 2008, 01:04:36 AM by Dannye »

Offline Flat Face

  • With power comes lulz
  • Administrator
  • Posts: 9243
    • View Profile
SA/VC Mission Coding Troubleshooting
« Reply #19 on: September 19, 2008, 01:11:32 AM »
really helpful dannye  thanks for that, hopefully some more will be posted by either you or kan some time?

Offline kaneda

  • Veteran Member
  • Posts: 2338
    • View Profile
    • @pump_upp - best crypto pumps on telegram !
SA/VC Mission Coding Troubleshooting
« Reply #20 on: September 19, 2008, 02:27:36 AM »
Might be easier if you post any opcodes you have questions about in regards to their variables.

Offline Flat Face

  • With power comes lulz
  • Administrator
  • Posts: 9243
    • View Profile
SA/VC Mission Coding Troubleshooting
« Reply #21 on: September 19, 2008, 02:45:10 AM »
well i don't know how to find them all in the scm's Lol um.. maybe a new topic with the basic codes and explanations of them would be best for people? if you need suggestions of codes then i can help but thats about all i can hear :/

Offline kaneda

  • Veteran Member
  • Posts: 2338
    • View Profile
    • @pump_upp - best crypto pumps on telegram !
SA/VC Mission Coding Troubleshooting
« Reply #22 on: September 19, 2008, 03:09:56 AM »
If you're using Mission Builder, it should come with an opcodes list (opcodes.txt).

Offline Dannye

  • Veteran Member
  • Posts: 3564
    • View Profile
SA/VC Mission Coding Troubleshooting
« Reply #23 on: September 19, 2008, 06:29:49 AM »
Indeed. The *.ini's that come with any compiler should list pretty much every opcode available. Depending on how old the compiler is, and thus how often (and how recently) the *.ini was last updated is a factor worth considering - because as time goes by people are figuring out what more and more of the previously unknown opcodes are. I'd suggest the VICESCM and/or SASCM that comes with Sanny Builder, that's the most comprehensive one as far as I am aware (I often look through them myself, even though I don't even use SB).

Its true that those lists, while covering every single opcode, don't go into massive detail about how they work - however they often do describe alot of the parameters (in the words pre/proceeding them), and that, combined with looking through the game's original SCM code (easily the best resource), can usually lead to figuring out how an opcode works. A couple other resources for finding more information about opcodes includes the Opcode Databases (perhaps not as updated as the ini's, but they do sometimes have extra info to aid in deciphering them - VC link, SA link), the VC and SA opcode topics over at GTAF (VC and SA), and lastly, doing a google search of the entire GTAForums looking for any occurrence of whatever opcode in question you are wanting info on (I do this one all the time as well).

Offline Seba

  • Posts: 66
    • View Profile
SA/VC Mission Coding Troubleshooting
« Reply #24 on: September 20, 2008, 11:13:29 AM »
Ok i have a question how to create a cutscene (i mean that two black stripes )? i have cool scene but with hud and map it`s look ugly...and i want add text to this but i can do that myself
« Last Edit: September 20, 2008, 11:16:04 AM by Seba »

Offline kaneda

  • Veteran Member
  • Posts: 2338
    • View Profile
    • @pump_upp - best crypto pumps on telegram !
SA/VC Mission Coding Troubleshooting
« Reply #25 on: September 20, 2008, 02:30:32 PM »
You can turn the hud off in your display setup. As far as creating the widescreen look - you can use cropping in your editor to achieve that, or you can to around with this line at the beginning of your scene:

Code: [Select]
02A3: toggle_widescreen  1? (on)

Offline Raining

  • Veteran Member
  • Posts: 1265
    • View Profile
SA/VC Mission Coding Troubleshooting
« Reply #26 on: September 25, 2008, 04:44:33 AM »
Quote from: kaneda
If you repeat the one model, they'll all have the same skin, yes. Like if you spawned in 20 #COP actors - they'll all be the same model with the same skin.

I'm guessing what you're asking is how to get 20 or so Tommys in, all with distinct skins, yeah?
Yea

Offline morbidxxx

  • Veteran Member
  • Posts: 4093
    • View Profile
SA/VC Mission Coding Troubleshooting
« Reply #27 on: September 26, 2008, 02:55:21 AM »

Offline kaneda

  • Veteran Member
  • Posts: 2338
    • View Profile
    • @pump_upp - best crypto pumps on telegram !
SA/VC Mission Coding Troubleshooting
« Reply #28 on: September 26, 2008, 07:23:24 PM »
Haha...that's hilarious. I don't know what the problem might be (other than a whole bunch of #NULL actors being spawned in), but I'd love to do that myself. The video doesn't explain anything about the mission script though, only the results of it.

Offline morbidxxx

  • Veteran Member
  • Posts: 4093
    • View Profile
SA/VC Mission Coding Troubleshooting
« Reply #29 on: September 27, 2008, 06:42:01 AM »
I changed something from the Neo's tutorial script and that happened.
Anyways is it possible to "unfreeze" the camera from player and move it around like in SA? I once did it but I have no idea how it happened. I lost the script too :/

EDIT: Ok, got another question. How can I make the car to follow the road?
« Last Edit: September 27, 2008, 10:34:10 AM by morbidxxx »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal