Jump to content

Coding issues


BEGINit

Recommended Posts

Hello smile.gif

I've been making a mod for a while. It's still in the early development stages but I already face some coding problems. These I'm facing for the first time and since I'm just an amateur I hoped someone could give me suggestions how to fix them. I'm going to give a list of illustrated issues I'm facing in one topic.

Before starting you should know three things:

1. My projects is aimed for GTA:Liberty City mod on VC engine. So keep in mind it's GTA:LC we're talking about smile.gif

2. This is the first time I'm using SB instead of BW builder so I may not know some details about it.

3. I'm not using CLEO and please, don't offer to.

So lets begin:

 

SPECIFIC PROBLEMS.

1. Out of turret.

In one mission the player is on turret mode in a heli:

user posted image

But after some time the player is kicked out of the turret:

user posted image

It's not exactly that you are off turret mod but. You still control the pointer, its just you are visible in 3d point of view, frozen:

user posted image

No specific opcode is executed at that moment but it always happens at almost the same time (look at the picture). Also there are several missions with player on turret mode but this is the only one having the issue. Note: this mission has enemies on turret too.

 

2. Invisible wall.

user posted image

The truck should go the direction the arrow shows, but as soon as it reaches the point indicated by the red line it starts doing weird stuff. It starts driving somewhere else. With more testing I learned he tries to use some kind of other route:

user posted image

As the arrow shows he turns around follows other road and then jumps of the road to the point he has to drive originally. I tried various traffic_behavior and driver_behavior variations but nothing. Is it possible to make him drive straight?

 

3. Straight trough water.

In one mission I create a boat with drivers on water. But instead of appearing on water it perishes straight trough it and is spawned somewhere else on the ground:

user posted image

Again there are more missions with boats but this is the only with the issue. Code:

user posted image

Is it possible to fix it?

 

GENERAL PROBLEMS.

 

1. No collision with collision.

When I create an object with collision_detection and moving_list both set True it works fine when player collide with them. But when the object is moved via command (for example magnet script) it goes straight trough walls and objects. Can I make it still collide with obstacles?

 

2. Wild angle.

Another problem is that I cannot control the players angle while not frozen. To be more specific imagine that I want to set the players angle after the cutscene during which the player is in frozen state. With BW I set players angle and unfroze him. Player the stands in that angle until I start walking or move camera. Yet now even if I set the angle of the player as soon as I unfreeze him he turns into a completely random angle. So can I make him face any angle I want while not frozen?

 

3. Ghost opcodes, artefacts and other SB issues.

As I said this is the first time I'm using SB and I have several questions. SB is sometimes doing really weird stuff.

A: I always have to go RUN>Compile and copy to compile the scm. Now I have 95 copies of the script. The thing is that if I just compile mostly nothing happens - no changes whatsoever. Why?

B: Look at this picture:

user posted image

The red shape shows the strange line that appears out of nowhere, usually after decompiling the script. It happens quite often and I don't know why. Each time just delete the line and carry on but check the question marks. Each question marked line indicates the defined object that I didn't define. They came out of nowhere and were not present when I began coding. Note: These in the blue box are ok, I put them there myself.

C: The other thing is a phenomena I call ghost opcodes (because of a similar medical condition biggrin.gif ). It's when the game executes the code that doesn't exist anymore. For example I want an actor to walk somewhere so I put walk_to code. Compile, run, test. Doesn't look good so I remove the walk_to code. Compile, run, test. The actor STILL walks. I exit the game, compile scm again (maybe I just forgot to do that) and run again. Still walks confused.gif It's usually fixed after putting some new code below but it is still weird.

 

So these are the issues. I really hope you guys could help me to solve them smile.gif

Link to comment
Share on other sites

 

2. Invisible wall.

 

3. Straight through water.

 

4. Wild angle.

 

5. SCM stuff about ghosts

2. There is no path for him to follow. You'll have to either make your own path or have him individually drive to and stop in spheres one unit apart. It'll be annoying but it might work.

 

3. Set the spawn height to 35.70 in the z coordinate.

 

4. Change the angle from an integer to a float and try again.

 

5. "Compile, copy and run GTA"- that's what you want, not just "compile". Make sure it's editing the correct main.scm and not one in a different folder or something.

pkmTc.gif

Link to comment
Share on other sites

4. I always use float. I thought only that you can use.

5. Command 'Compile, copy and run GTA' ALWAYS crashes my game. It's correct scm I'm using and its correct exe since thaths the only game I have on pc.

Link to comment
Share on other sites

4. Then change it into an integer 0-360.

5. Did you install SB correctly?

pkmTc.gif

Link to comment
Share on other sites

5. Well I don't know. No error messages showed up while installing confused.gif

 

One more thing I forgot to mention. Aside the issues above every mission works perfectly as stand alone. But when I try to put them together another problem appears. When I play several mission in a row the city stops loading up. It doesn't matter which missions you play but if I pass several in a row I always end up falling trough roads of failed to load city confused.gif Note: I haven't used opcodes set_streaming or rubbish_visible in the whole script not even once.

Link to comment
Share on other sites

1. This happens when you set an "incorrect" offset. The player is not "colliding" with the ground and that's what happens.

 

2. Try the opcode set car animation.

Link to comment
Share on other sites

 

Set the spawn height to 35.70 in the z coordinate.

 

I don't know what I was expecting but happened what was supposed to happen. The boat appeared high in the sky... fell down... trough water... spawned somewhere else confused.gif

 

Invisible wall.

The set animation didn't do good, but I kinda fixed it in my own way.

Link to comment
Share on other sites

Well, I'm not familiar with VC coding, so all I can suggest you, is that "Compile, Copy and run GTA" crashes, because GTA: LC uses it's own EXE, and Sanny executes gta-vc instead tounge.gif

 

Edit:

Also, "ghost opcodes" may be related to fact, that you possibly compile your script from main[XX].txt, which makes main[XX].scm file instead. Check it tounge.gif

DEFINE OBJECT #RCBOMB may be related to small typo - you've probably typed something like "request_model ##RCBOMB" somewhere.

 

Well, weapons & cars in this part may be related to modified .ide files. Sanny adds an entry here if #MODELNAME is used, and it can't find it in any of IDE files (only default.ide in III/VC). Check if names are correct.

Edited by SilentPL
Link to comment
Share on other sites

spaceeinstein

566, -1087 refers to a point underground. What version of LC are you using?

Link to comment
Share on other sites

I'm using the latest version 3.1 with your stripped scm.

This coordinate is near that small wooden peer in Portland.

 

 

DEFINE OBJECT #RCBOMB may be related to small typo - you've probably typed something like "request_model ##RCBOMB" somewhere.

 

Oh hell. You are right. When you mentioned it I took a better look at the new definitions and only now I noticed that these new objects have a misspelled names. So I started to look for them in the script. A revelation came biggrin.gif Appearanlty I either misspelled a model name somewhere in the script (ex. instead of #MAVERICK I wrote #MAVERIC) or I made a wrong assumption that LC still uses some VC model names (ex. I wrote #M4 though it's actually #M16).

 

Thanks for giving me a hint, SilentPL smile.gif

Edited by BEGINit
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.