Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
astr1

Trying To Make A Mission

Recommended Posts

astr1
you do not have to throw your code away ,and no one suggested it

 

Well they did say to start over, so thats kind of throwing it away

 

what u need to do is to break it down ,for example,spawn the actors and the car infront of you = break 1

when you see this works move on to the next section,and so on,that way you check your code on the fly and have much more

chances to be able to debug problems,you will know what labels are newly added, and if the code worked to certain

point and now its not, its pretty obvious where's the problem at.

Yes, I'm gonna try this after I understand smaller codes, Like what KN suggested.

Share this post


Link to post
Share on other sites
astr1

Double post....blush.gif .Ok iv been messings around with coding and I made a code: It places ken at a sertain spot, and it creates a sphere and a marker pn the map, when you walk into the sphere it will raise you money but at the same time it raises your wanted level. Now that's what I have done and now this is what I want to add to add to it though I cannot work out how ->.To keep the money you earnt from ken you must arrive at a sertain point and if you do not make it and get wasted or busted you lose the money you earnt plus and you lose $250 too. Also when you kill ken it disables the marker on the map, disables the sphere on the map and when you walk to the position you do not get any money.

 

Here's my code:

 

 

:Label031FA703BC: $53D = create_sphere  109.197 -810.519  9.482  1.502A8: $53E = create_marker  5 at  108.696 -811.667  9.482:Label031FD60006:  [email protected] =  0  \\ integer values:Label031FDD0001: wait  50 ms00D6: if  280E0:   NOT   player $PLAYER_CHAR driving004D: jump_if_false ££Label031FDD00D6: if  00039:    [email protected] ==  1  \\ integer values004D: jump_if_false ££Label0320130296: unload_special_actor  10009B: destroy_actor_instantly  [email protected]:  [email protected] =  0  \\ integer values:Label032013023C: load_special_actor  10 "IGKEN"038B: load_requested_models:Label0320210001: wait  0 ms00D6: if  0023D:   special_actor  10 loaded004D: jump_if_false ££Label032021009A:  [email protected] = create_actor  4 #SPECIAL10 at  108.696 -811.667  9.4820192: set_actor  [email protected] objective_to_stand_still0006:  [email protected] =  1  \\ integer values:Label0320580001: wait  20 ms00D6: if  21004D: jump_if_false ££Label0320580002: jump ££Label031FDD:Label03206E0001: wait  50 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label03206E0109: player $PLAYER_CHAR money +=  25010D: set_player $PLAYER_CHAR wanted_level_to  10002: jump ££Label0320B7:Label0320B70001: wait  3000 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label0320B70109: player $PLAYER_CHAR money +=  50010D: set_player $PLAYER_CHAR wanted_level_to  20002: jump ££Label032101:Label0321010001: wait  3000 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label0321010109: player $PLAYER_CHAR money +=  75010D: set_player $PLAYER_CHAR wanted_level_to  30002: jump ££Label03214B:Label03214B0001: wait  3000 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label03214B0109: player $PLAYER_CHAR money +=  100010D: set_player $PLAYER_CHAR wanted_level_to  40002: jump ££Label032195:Label0321950001: wait  4000 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label0321950109: player $PLAYER_CHAR money +=  125010D: set_player $PLAYER_CHAR wanted_level_to  50002: jump ££Label0321DF:Label0321DF0001: wait  4000 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label0321DF0109: player $PLAYER_CHAR money +=  150010D: set_player $PLAYER_CHAR wanted_level_to  60002: jump ££Label0321DF

 

 

LABELS:

 

004F: create_thread ££Label031FD6 004F: create_thread ££Label03206E 004F: create_thread ££Label031FA7

 

 

BTW: You will probably notice that I used rockstar labels.Well for some reason when I wrote in normal Labels (that I made up) and then if I exited out of mission_builder and then entered it again they were replaced with R labels.

Share this post


Link to post
Share on other sites
Freakingfreak

 

:Label0320580001: wait  20 ms00D6: if  21004D: jump_if_false ££Label0320580002: jump ££Label031FDD

 

 

whats with that again ? if you are doing the same mistakes again and again peeps will be less eager to help,pay more attention to your code m8.

 

 

:Label0320B70001: wait  3000 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label0320B70109: player $PLAYER_CHAR money +=  50010D: set_player $PLAYER_CHAR wanted_level_to  20002: jump ££Label032101:Label0321010001: wait  3000 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label0321010109: player $PLAYER_CHAR money +=  75010D: set_player $PLAYER_CHAR wanted_level_to  30002: jump ££Label03214B:Label03214B

 

 

you dont need to use 0002: jump ££label if the label is the next one ahead ,the code going there anyways.

 

 

:Label03206E0001: wait  50 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label03206E0109: player $PLAYER_CHAR money +=  25010D: set_player $PLAYER_CHAR wanted_level_to  10002: jump ££Label0320B7:Label0320B70001: wait  3000 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label0320B70109: player $PLAYER_CHAR money +=  50010D: set_player $PLAYER_CHAR wanted_level_to  20002: jump ££Label032101:Label0321010001: wait  3000 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label0321010109: player $PLAYER_CHAR money +=  75010D: set_player $PLAYER_CHAR wanted_level_to  30002: jump ££Label03214B:Label03214B0001: wait  3000 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label03214B0109: player $PLAYER_CHAR money +=  100010D: set_player $PLAYER_CHAR wanted_level_to  40002: jump ££Label032195:Label0321950001: wait  4000 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label0321950109: player $PLAYER_CHAR money +=  125010D: set_player $PLAYER_CHAR wanted_level_to  50002: jump ££Label0321DF:Label0321DF0001: wait  4000 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label0321DF0109: player $PLAYER_CHAR money +=  150010D: set_player $PLAYER_CHAR wanted_level_to  60002: jump ££Label0321DF

 

 

why all this labels are for the same spot ? this way the code is locked if you are not near point 109.197 -810.519 9.482 ,

and according to what you want to do it should be (pseudo code):

 

 

:Label0320B70001: wait  250 ms <--- changed to shorter wait ,so u wouldnt have to wait 3000 ms till its activated00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label0320B7$mission1_money = 250 0109: player $PLAYER_CHAR money +=  $mission1_money 010D: set_player $PLAYER_CHAR wanted_level_to  2disable marker/sphere make new sphere in new destination :Label032101 <---- check to see if player arrived at new destination 0001: wait  500 ms00D6: if  080F6: NOT  player $PLAYER_CHAR  0 ()near_point_on_foot --->new destination <--- radius  1.4  1.8  1.5004D: jump_if_false ££continue from here :Label032102 <----- check to see if ken is dead 0001: wait  500 ms00D6: if  0 if ken dead 004D: jump_if_false ££Label032103remove reference to kendisable marker/sphere $mission1_money * -1 player money + $mission1_moneyjump whatever :Label032103 <-----check to see if player still definedwait 500 if 0 player actor defined jump if false Label032104jump 032101 <----- back to loop start :Label032104$mission1_money * -1 player money + $mission1_moneyjump whatever

 

 

thats pretty much the blueprint of what you want to do ,good luck .

 

 

BTW: You will probably notice that I used rockstar labels.Well for some reason when I wrote in normal Labels (that I made up) and then if I exited out of mission_builder and then entered it again they were replaced with R labels.

 

thats because you are working with the scm,while u should work on the source which is txt .

 

 

 

 

Share this post


Link to post
Share on other sites
astr1

 

whats with that again ? if you are doing the same mistakes again and again peeps will be less eager to help,pay more attention to your code m8.

You know this is a different code then I was doing before, right?

 

Label0320B7

0001: wait  3000 ms

00D6: if  0

00F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5

004D: jump_if_false ££Label0320B7

0109: player $PLAYER_CHAR money +=  50

010D: set_player $PLAYER_CHAR wanted_level_to  2

0002: jump ££Label032101

 

:Label032101

0001: wait  3000 ms

00D6: if  0

00F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5

004D: jump_if_false ££Label032101

0109: player $PLAYER_CHAR money +=  75

010D: set_player $PLAYER_CHAR wanted_level_to  3

0002: jump ££Label03214B

 

:Label03214B

 

you dont need to use 0002: jump ££label if the label is the next one ahead ,the code going there anyways.

 

 

:Label03206E0001: wait  50 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label03206E0109: player $PLAYER_CHAR money +=  25010D: set_player $PLAYER_CHAR wanted_level_to  10002: jump ££Label0320B7:Label0320B70001: wait  3000 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label0320B70109: player $PLAYER_CHAR money +=  50010D: set_player $PLAYER_CHAR wanted_level_to  20002: jump ££Label032101:Label0321010001: wait  3000 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label0321010109: player $PLAYER_CHAR money +=  75010D: set_player $PLAYER_CHAR wanted_level_to  30002: jump ££Label03214B:Label03214B0001: wait  3000 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label03214B0109: player $PLAYER_CHAR money +=  100010D: set_player $PLAYER_CHAR wanted_level_to  40002: jump ££Label032195:Label0321950001: wait  4000 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label0321950109: player $PLAYER_CHAR money +=  125010D: set_player $PLAYER_CHAR wanted_level_to  50002: jump ££Label0321DF:Label0321DF0001: wait  4000 ms00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label0321DF0109: player $PLAYER_CHAR money +=  150010D: set_player $PLAYER_CHAR wanted_level_to  60002: jump ££Label0321DF

 

 

why all this labels are for the same spot ? this way the code is locked if you are not near point 109.197 -810.519 9.482 ,

and according to what you want to do it should be (pseudo code):

 

 

:Label0320B70001: wait  250 ms <--- changed to shorter wait ,so u wouldnt have to wait 3000 ms till its activated00D6: if  000F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.5004D: jump_if_false ££Label0320B7$mission1_money = 250 0109: player $PLAYER_CHAR money +=  $mission1_money 010D: set_player $PLAYER_CHAR wanted_level_to  2disable marker/sphere make new sphere in new destination :Label032101 <---- check to see if player arrived at new destination 0001: wait  500 ms00D6: if  080F6: NOT  player $PLAYER_CHAR  0 ()near_point_on_foot --->new destination <--- radius  1.4  1.8  1.5004D: jump_if_false ££continue from here :Label032102 <----- check to see if ken is dead 0001: wait  500 ms00D6: if  0 if ken dead 004D: jump_if_false ££Label032103remove reference to kendisable marker/sphere $mission1_money * -1 player money + $mission1_moneyjump whatever :Label032103 <-----check to see if player still definedwait 500 if 0 player actor defined jump if false Label032104jump 032101 <----- back to loop start :Label032104$mission1_money * -1 player money + $mission1_moneyjump whatever

 

 

thats pretty much the blueprint of what you want to do ,good luck.

I'm really lost in what your trying to say here, I'f you could please right, if not I'l just have to look carefully at it. Thanks

 

 

thats because you are working with the scm,while u should work on the source which is txt.

Well I do it all the time but its different this time

 

004F: create_thread ££INIT;; your created thread, to go with the others

 

:INIT

0006:  [email protected] =  0;; this sets our LOCAL INTEGER (aka, our "switch") to zero, so we can check if we've created an actor already. This line of code only gets run once, to ensure that the variable we'll be using ([email protected]) is properly initialized. I've read that you can do this in the create_thread opcode, but I can't find any docs on it at the moment, so we'll do this the "safe" way for now.

 

:MODEL

0001: wait  50 ms

00D6: if  2

80E0:   NOT   player $PLAYER_CHAR driving

00E1:   key_pressed  0  4; Action key (centers camera)

00E1:   key pressed  0  6; Aim/Target key

004D: jump if false ££MODEL

00D6:  if 0

0039:    [email protected] == 1;; this checks if we have already created an actor, and if not, to jump to :LOAD instead

004D: jump if false ££LOAD

0296: unload_special_actor  10;; releases the model so we can delete it

009B: destroy_actor_instantly [email protected];; this deletes the actor if created previously so we can create a new one

0006: [email protected] = 0;; this sets our LOCAL INTEGER (aka setli, or our "switch") to zero, so we can go ahead and create a new actor without trying to pile them up

 

:LOAD

023C: load_special_actor  10 "IGKEN"

038B: load_requested_models

 

:PLACE

0001: wait  0 ms

00D6: if  0

023D: special_actor  10 loaded

004D: jump_if_false ££PLACE

009A: [email protected] = create actor  4 #SPECIAL10 at  108.696 -811.667 9.482

0192: set actor [email protected] objective to stand still 

0006: [email protected] = 1;; this is setli, like above, except we're setting our switch to 1, so the code knows that the actor is created.

 

:PAUSE

0001: wait  20 ms

00D6: if  21

80E1:   NOT   key_pressed  0  4

80E1:   NOT   key pressed  0  6

004D: jump if false ££PAUSE

0002: jump ££MODEL

How do I change it to a normal ped (wMYPI), Iv been messing around alot with it but it doesn't seem to work, also how do I make it so when you walk to 109.197 -810.519 9.482 it displays a message "00BC: text_highpriority "TYPE_HERE" 10000 ms 1 "MESSAGE_HERE" and then after 4000ms it goes away. I thought the code would look some what like this

 

:CAMERA054C: use_GXT_table "TYPE_HERE"00F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.500BC: text_highpriority "TYPE_HERE"  10000 ms  1 "MESSAGE HERE"0001: wait  3000 ms03D5: remove_text "TYPE_HERE" "MESSAGE HERE"

 

but it crashes when I press "Start New Game" ,so how do I fix, Thanks smile.gif

Edited by astr1

Share this post


Link to post
Share on other sites
astr1

^^^^^. Anyone?

Share this post


Link to post
Share on other sites
Freakingfreak

 

You know this is a different code then I was doing before, right?

 

yes i know this is a different code,but in this code you made the same mistake that you did in your previous code,

more ever,it was among the first things that ceedj corrected you about ,read the first replay to this thread again .

 

 

I'm really lost in what your trying to say here, I'f you could please right, if not I'l just have to look carefully at it. Thanks

 

hmmm,in your previous post before i replayed , you wrote :

 

 

Ok iv been messings around with coding and I made a code: It places ken at a sertain spot, and it creates a sphere and a marker pn the map, when you walk into the sphere it will raise you money but at the same time it raises your wanted level. Now that's what I have done and now this is what I want to add to add to it though I cannot work out how ->.To keep the money you earnt from ken you must arrive at a sertain point and if you do not make it and get wasted or busted you lose the money you earnt plus and you lose $250 too. Also when you kill ken it disables the marker on the map, disables the sphere on the map and when you walk to the position you do not get any money.

 

then you presented your code,so i told you whats wrong with your code and gave you example of one possible way to code it ,i suggest you take a closer look at that .

 

 

How do I change it to a normal ped (wMYPI), Iv been messing around alot with it but it doesn't seem to work

 

just open your opcode.txt or sascm.ini and search for create_actor ,then open your original scm,search for the opcode you

are interested in,look how its done and imitate it ,pretty basic stuff ,shouldnt be that hard to do .

 

 

054C: use_GXT_table "TYPE_HERE"00F6:   player $PLAYER_CHAR  0 ()near_point_on_foot  109.197 -810.519  9.482 radius  1.4  1.8  1.500BC: text_highpriority "TYPE_HERE"  10000 ms  1 "MESSAGE HERE"0001: wait  3000 ms03D5: remove_text "TYPE_HERE" "MESSAGE HERE"

 

 

00F6: player $PLAYER_CHAR 0 ()near_point_on_foot 109.197 -810.519 9.482 radius 1.4 1.8 1.5

is a if conditional ,so you need if 0 before and jump if false after ,i reckon you allready know that in order

to use text you need to edit the gxt file ? , but anyways the txt is not the reason for the crash .

 

astr1 ,i hope you wont take this too harshly,we all had our bits of frustration when we started coding ,i suggest that you

go back to the tutorials and Mb/sanny's readme files and read them more carefully. open original scm and just look at it ,try to figure the basic structures of first threads and then missions . and try to understand the basics more carefully.

 

 

 

 

 

 

 

 

Share this post


Link to post
Share on other sites
astr1
so you need if 0 before and jump if false after

So is that all that I need to put in the code?

Share this post


Link to post
Share on other sites
astr1

Ok, I havn't been modding lately. But I still want to continue, So well, I kinda know the basics of placing a character, now how do I place an object, I'm NOT making a new object I want to place a previously made one, take a tree for example, all I want to do is place a tree at 109.197 -810.519 9.482.

Thanks

Share this post


Link to post
Share on other sites
ceedj

Again, look at the original code for opcodes dealing with objects. Check the VC-DB to see what they mean, or search this forum.

 

A hint: when creating objects in the SCM, there are two types: those defined in the second segment of the SCM use negative numbers (MB and Sanny convert these numbers to ide styled names, such as -1 = #DTN_STADDOORA, etc). You can also create objects from files outside of the main, by finding the ID number of the object in the various map files (opened with Notepad or MapEdit) and using that.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 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.