Jump to content

HELP WITH KEYS IN MISSION BUILDER SA BW'S


matyassv12

Recommended Posts

matyassv12

hello , can somebody help me with generating a PACKER truck by pressing some keys please. (i would love with right click and y)

Link to comment
Share on other sites

Show us what you've got so far, and we'd be happy to help. Otherwise, this goes in Recruits and Requests.

Link to comment
Share on other sites

Look at the source code for my Car Spawn mods for GTAIII. Syntax will be different because different MB, but the approach and concept are the same. Spawning a car and keypress checks are both basic things and shouldn't be difficult to pull off. The thing to remember is when you're done with the model, release it; when you're done spawning the Packer, remove references to it; be sure to use a key release check so it's not spawning a whole bunch.
Link to comment
Share on other sites

I'VE GOT THIS

 

:PACKER

00D6: if 0

80DF: NOT actor $PLAYER_ACTOR driving

00D6: if 1

00E1: key_pressed 0 9

00E1: key_pressed 0 1

077E: $ACTIVE_INTERIOR = active_interior

00D6: if 0

0038: $ACTIVE_INTERIOR == 0 ;; integer values

0172: @4 = actor $PLAYER_ACTOR z_angle

04C4: create_coordinate @1 @2 @3 from_actor $PLAYER_ACTOR offset 8.0 -8.0 -8.0

0247: request_model #PACKER

038B: load_requested_models

 

:PACKER

0001: wait 0 ms

00D6: if 0

0248: model #PACKER available

00A5: @0 = create_vehicle #PACKER at @1 @2 @3 ;; Load the vehicle model before using this

0249: release_model #PACKER

01C3: remove_references_to_car @0 ;; Like turning a car into any random car

 

IS IT OK??? (I DONT WANT THE PLAYER TO GET IN THE CAR)

Link to comment
Share on other sites

That's an excellent first try!

 

Look at original code. Two things you'll notice and need that you don't have: 1) An is player defined check. You can't ask the game if the player is driving until you first make sure the player exists. 2) None of your if checks have jump_if_false (JF) lines. Which means they won't actually work as if checks if at all. Also, your code doesn't loop back, so it will just run into whatever code comes next. This can cause all sorts of problems. You have no main wait, so when you do jump back, you're likely to crash. And since you just tell it to spawn a Packer without an actual trigger, you're going to be running around and it will be raining Packers forevermore.

 

Keep at it. Don't give up. You can do this.

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.