Author Topic: scripting and model changing help  (Read 6330 times)

0 Members and 1 Guest are viewing this topic.

Offline Simon

  • Admin
  • Posts: 4906
  • aka Darkstar
    • View Profile
scripting and model changing help
« on: November 27, 2011, 12:02:13 PM »
Hellooooo

first of, I'm trying to test out some camera scripting in San Andreas, but when I try to compile it I get the following error: Not enough actual parameters. Expected 2 params.

Does anybody know what that means?


Second problem, I'm trying to change CJ in to a ped model. I tried changing the dff and txd, but it doesn't do anything. It just makes CJ all glitchy and spidery.

What am I doing wrong?

Offline kaneda

  • Veteran Member
  • Posts: 2338
    • View Profile
    • @pump_upp - best crypto pumps on telegram !
Re: scripting and model changing help
« Reply #1 on: November 27, 2011, 12:07:39 PM »
Post your code that gives you the error. CJ is made up of about 10 (or something like that) dffs and txds. I'm pretty sure you can't swap him out for a ped the way you can in VC.

Offline Simon

  • Admin
  • Posts: 4906
  • aka Darkstar
    • View Profile
Re: scripting and model changing help
« Reply #2 on: November 27, 2011, 12:16:44 PM »
I did it following PtRvY's tutorial.

Code: [Select]
DEFINE OBJECTS 3
DEFINE OBJECT SANNY BUILDER 3.03
DEFINE OBJECT NULL2 // Object number -1
DEFINE OBJECT DYN_ROADBARRIER_6 // Object number -2
DEFINE MISSIONS 0
DEFINE EXTERNAL_SCRIPTS 0 // Use -1 in order not to compile AAA script
DEFINE UNKNOWN_EMPTY_SEGMENT 0
DEFINE UNKNOWN_THREADS_MEMORY 0
{$VERSION 3.1.0027}
//-------------MAIN---------------
thread 'MAIN'
042C: set_total_missions_to 0
030D: set_max_progress 187
0997: set_total_respect_points_to 1339
01F0: set_max_wanted_level_to 0
set_wb_check_to 0
00C0: set_current_time_hours_to 11 minutes_to 30
fade 0 10
set_weather 1
select_interior 0
04E4: unknown_refresh_game_renderer_at 0.0 0.0
Camera.SetAtPos(0.0, 0.0, 800.0)
$PLAYER_CHAR = Player.Create(#NULL, 2495.4373, -1667.4159, 13.3437)
07AF: $PLAYER_GROUP = player $PLAYER_CHAR group
$PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)
Camera.SetBehindPlayer
Actor.Angle($PLAYER_ACTOR) = 90.0
wait 10
Player.SetClothes($PLAYER_CHAR, "SUIT1GREY", "SUIT1", Torso)
Player.SetClothes($PLAYER_CHAR, "JEANSDENIM", "JEANS", Legs)
Player.SetClothes($PLAYER_CHAR, "SNEAKERBINCBLK", "SNEAKER", Shoes)
Player.SetClothes($PLAYER_CHAR, "PLAYER_FACE", "HEAD", Head)
Player.SetClothes($PLAYER_CHAR, "CAPREDSIDE", "CAPSIDE", 16)
Player.Build($PLAYER_CHAR)
016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0
016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0
wait 500
fade 1 1000
wait 1000
0460: set_camera_transverse_delay 0.0 time <T>
015F: set_camera_position -1859.4636 945.0900 109.7111 rotation 0.0 0.0 0.0
0160: set_camera_point_at -2048.1628 901.6151 53.8009 mode 1
wait 3000
015F: set_camera_position -2043.0194 927.9124 54.7499 rotation 0.0 0.0 0.0
0160: set_camera_point_at -2048.1628 901.6151 53.8009 mode 1
wait 3000                 
015F: set_camera_position -2043.0194 927.9124 54.7499 rotation 0.0 0.0 0.0
0160: set_camera_point_at -2048.1628 901.6151 53.8009 mode 1
wait 3000
end_thread



Is there an alternative option on changing his skin though?, because if I use some kind of mod to change it in game it won't show up in the replay.

Offline kaneda

  • Veteran Member
  • Posts: 2338
    • View Profile
    • @pump_upp - best crypto pumps on telegram !
Re: scripting and model changing help
« Reply #3 on: November 27, 2011, 01:16:51 PM »
Well it's hard to see anything wrong with your script. This is probably pointless, but do you have Sanny set to SA? It's easy to overlook that sometimes (I'm guessing that's not the problem, but just to check it off the list).

Does Sanny specify what line of the code is giving the error? If so, which line specifically? Your cam coding looks fine at a glance, but not knowing where the script runs into problems makes it difficult to offer a solution.

I remember a mod (this was AGES ago) that allowed you to cycle through peds to use as the player in the game. Whether or not they'll show up in the rep (a previously saved rep, that is), I'm not sure. SA reps are different in that they record elements VC didn't - I'm pretty sure player skin was one of those things.

Offline Simon

  • Admin
  • Posts: 4906
  • aka Darkstar
    • View Profile
Re: scripting and model changing help
« Reply #4 on: November 27, 2011, 02:01:09 PM »
The Sanny is set to SA, it was one of the first things I checked. It doesn't give me a specific line it just says "Sanny builder compiler error: Not enough actual parameters. Expected 2 params."

I've also found that mod that you are talking about, but it didn't allow the ped to show in the replay, which is the only reason I need this. I'm not understanding this quite though, I've downloaded some models and everyone just gave me a dff and txd to replace. Are there something special with those that I'm not getting or did I only download something Lols that didn't work, I didn't bother to try them. I just wanted to check what files came with.
« Last Edit: November 27, 2011, 02:09:14 PM by Simon »

Offline PtRvY

  • WH Crew
  • Veteran Member
  • Posts: 4153
  • Wasteland Hero / BT Member
    • View Profile
Re: scripting and model changing help
« Reply #5 on: November 27, 2011, 02:47:06 PM »
0460: set_camera_transverse_delay 0.0 time <T>

Here's your problem bro. Didn't swap the <T> with 3000.

And yeah, CJ is made up of a lot of separate .dffs and .txds, i doubt it's possible to give a single dff model to cover all. (Because even at his most no-clothes state, CJ has separate head, torso and leg models).

You can only spawn an actor which has a ped model, but this actor is not directly controllable. You can only give him orders through the script but can't control him ingame.
« Last Edit: November 27, 2011, 02:54:57 PM by PtRvY »

Offline Flat Face

  • With power comes lulz
  • Administrator
  • Posts: 9243
    • View Profile
Re: scripting and model changing help
« Reply #6 on: November 27, 2011, 02:56:51 PM »
SA's different to VC, you can't just swap ped models with player models, the player model is made up of 5+ models stuck together where as the peds are just 1.

You'll need to change your script to use a ped instead of the player

----

it would be possible to make CJ just use 1 model, rigging an entire model, replacing a hat model and making the rest invisible through other ways, but yeah..

Offline kaneda

  • Veteran Member
  • Posts: 2338
    • View Profile
    • @pump_upp - best crypto pumps on telegram !
Re: scripting and model changing help
« Reply #7 on: November 27, 2011, 08:46:54 PM »
I suppose if the model change doesn't carry over to reps, then you're pretty much screwed. There may be (and that's a BIG may) a replay editor for SA (I know there was one for VC) that may (another BIG may) allow you change the model in the rep, but that's about all I can offer.

I don't know what SA Freeplay might be able to do, but it might be worth looking into it just in case.

Offline Simon

  • Admin
  • Posts: 4906
  • aka Darkstar
    • View Profile
Re: scripting and model changing help
« Reply #8 on: November 28, 2011, 01:10:18 AM »
PtRvY - Thanks, I didn't notice that  :rolleyes: And I'm not planning to script CJ, I just need some scenes that I have to do in game. Which is why I need another model than CJ.

Flat Face - Do you know how much of the script needs to be changed? it isn't just 2 or 3 lines is it? cause that would be to easy. I'm guessing it's pretty hard to do this then.

Kaneda - I'll look for it, and the only thing I know Freeplay is able to do regarding the player is make him invisible.  Not sure if that's what I want either though.


But thanks so much for all the help guys  :wub: :a-cheer:

Offline kaneda

  • Veteran Member
  • Posts: 2338
    • View Profile
    • @pump_upp - best crypto pumps on telegram !
Re: scripting and model changing help
« Reply #9 on: November 28, 2011, 01:35:34 AM »
Here are a couple of options for the ped player thing:

1. http://www.gtaforums.com/index.php?showtopic=285247&hl=ceedj

This is the mod I mentioned earlier. I don't know about the viability of GTAForums' links, but you might be able to dig it up somewhere.

2.
Code: [Select]
09C7: change_player_skin $PLAYER_CHAR to 105
You can use this at the end of the main thread of the mission script. the '105' refers to the particular ped, which is taken from the peds.ide folder. Apparently it can be buggy, so I wouldn't bank on it working, but it's probably the easiest of the three methods. I'm pretty sure this is what's triggered when you use a cheat to play as someone else, which is probably why it's buggy.

3. http://www.gtagarage.com/mods/show.php?id=1065

San An Studios apparently lets you play as peds also. The version in the link might not have the feature, so you may have to hunt up a newer version (I think 4.0 was the last update). This would involve a lot of reading to find out what to do, but it's a pretty stable mod.

Keep in mind that I haven't actually tried 2 and 3 myself, but I know the first one works.

Offline Flat Face

  • With power comes lulz
  • Administrator
  • Posts: 9243
    • View Profile
Re: scripting and model changing help
« Reply #10 on: November 28, 2011, 04:17:23 AM »
it's just certain mods that don't work in replays, as far as I'm aware, most ..uhh.. what's that san andreas external .scm mod? where you can just paste the mods into the mod folder etc? anyway that type of mod by memory didn't show up in reps..

-------------

Wait I'm a little confused? why do you need these to work in replays if you're scripting? O_O I'm a little confused..

Offline VaNilla

  • next week m9
  • Veteran Member
  • Posts: 3809
    • View Profile
    • YouTube
Re: scripting and model changing help
« Reply #11 on: November 28, 2011, 05:30:17 AM »
I suppose if the model change doesn't carry over to reps, then you're pretty much screwed. There may be (and that's a BIG may) a replay editor for SA (I know there was one for VC) that may (another BIG may) allow you change the model in the rep, but that's about all I can offer.

I don't know what SA Freeplay might be able to do, but it might be worth looking into it just in case.

Fox made one for SA about four years ago, only sent it to me and ColdDeath (not sure if he sent to him) for the VC2SA community video. Don't have it anymore but someone could ask him for it.

Offline Flat Face

  • With power comes lulz
  • Administrator
  • Posts: 9243
    • View Profile
Re: scripting and model changing help
« Reply #12 on: November 28, 2011, 06:15:33 AM »
by memory that was really REALLY buggy? or am I thinking of the one gunner did

Offline Simon

  • Admin
  • Posts: 4906
  • aka Darkstar
    • View Profile
Re: scripting and model changing help
« Reply #13 on: November 28, 2011, 06:42:34 AM »
Wait I'm a little confused? why do you need these to work in replays if you're scripting? O_O I'm a little confused..
Because there are certain scenes I can't do with scripting that I have to do, and I need it in a replay so I can have the same action all the time and use freeplay to get the angles I want.


And at Kaneda, thanks I'll try them. I'll give some more info on how it went later. And thanks for trying to help me with this  :happy:
« Last Edit: November 28, 2011, 06:48:15 AM by Simon »

Offline Flat Face

  • With power comes lulz
  • Administrator
  • Posts: 9243
    • View Profile
Re: scripting and model changing help
« Reply #14 on: November 28, 2011, 06:46:30 AM »
you COULD get tricky and use SAiVC for those parts? :P

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal