Jump to content

First mission in sanny builder


Recommended Posts

Hey there..

 

i have made a script in sanny builder with the help of the BTTF script for a custom tutorial type mission, which is the only one.

however, this is my first time with gta vc mission scripting, but have done a little of CLEO stuff.

 

what happens is that i have deleted all the missions from gta vc but kept the initial and main and intro (which is the one i have modded). it basically displays some textbox's spawns a car with a marker, marker goes away when in it, you can drive around starfish island (where spawned) with locked gates) then a checkpoint (pink circle marker thing) on radar at a point on map where you drive to etc etc...

but when i go "new game" the HUD (when i have the gta sa hud mod on, or none when sa HUD is not in the directory) and displays a black screen with no sounds, player or anything....

 

 

PLEASE HELP!!!!!

 

NOTE: LINK TO MY .SCM SCRIPT IS HERE ->->->-> MY .SCM SCRIPT (made in sanny builder 3.0)

 

(the top of the script has been taken out, just the define objects part...)

Edited by DarthGrijo
Link to comment
https://gtaforums.com/topic/434590-first-mission-in-sanny-builder/
Share on other sites

Don't post such a long script into forum message mask. It needs half an hour to copy.

Upload it as txt file by a file host like http://www.sendspace.com/

Cool, have posted it to:

 

http://www.sendspace.com/file/47oalf

 

 

and have edited my post so it is a .txt file on sendspace too.

 

what happens is that i have deleted all the missions from gta vc but kept the initial and main and intro (which is the one i have modded). it basically displays some textbox's spawns a car with a marker, marker goes away when in it, you can drive around starfish island (where spawned) with locked gates) then a checkpoint (pink circle marker thing) on radar at a point on map where you drive to etc etc...

but when i go "new game" the HUD (when i have the gta sa hud mod on, or none when sa HUD is not in the directory) and displays a black screen with no sounds, player or anything....

There is no "fade back" in the script and fourthermore you set a "fade in" in your Intro mission script instead a "fade back"

Just change it into a "fade back"

 

:INTRO

thread 'INTRO'

$ONMISSION = 0 // integer values

$13 = 0 // integer values

wait 0

fade 1 0

 

fade 1 0//---- fade 1 to fade back, second param = fadetime ( fade 1 5000 = fade back in 5000 ms )

 

 

Tommy appears then at Starfish Island and a double of Tommy appears also because you create the player a second once in your Intro mission.

 

Your Intro mission script is chaotic without a correct mission script structure

It crashes if you hold the enter key while gamestart loads

 

You must understand how to use gosub and return

Replace your whole Intro mission script with the script below and use it as template:

 

:INTRO03A4: name_thread 'INTRO'0050: gosub @INTRO_main 00D6: if 0112:   wasted_or_busted 004D: jump_if_false @INTRO_end 0050: gosub @INTRO_fail :INTRO_end0050: gosub @INTRO_cleanup 004E: end_thread :INTRO_main0317: increment_mission_attempts  0004: $ONMISSION = 1 // integer values 03E5: text_box 'INTRO' 0247: request_model #PEREN :INTRO_main_load_model0001: wait 0 msif 0248:  model #PEREN available 004D: jump_if_false @INTRO_main_load_model 0@ = Car.Create(#PEREN, -363.0, -532.2, 12.0)fade 1 5000:INTRO_main_loopwait 0if00E3:   player $PLAYER_CHAR 0 -363.0 -532.2 radius 200.0 200.0 else_jump @INTRO_fail if 00DC:   player $PLAYER_CHAR driving 0@ else_jump @INTRO_main_loop :INTRO_mission_passed01E3: text_1number_styled 'M_PASS' 20000 5000 ms 1  // MISSION PASSED! $~1~0109: player $PLAYER_CHAR money += 200000051: return:INTRO_fail00BA: text_styled 'M_FAIL' 4000 ms 1  // MISSION FAILED!0051: return :INTRO_cleanup0249: release_model #PEREN01C3: remove_references_to_car 0@ // Like turning a car into any random car 0004: $ONMISSION = 0 // integer values 00D8: mission_cleanup 0051: return

 

The mission script from above can be completed if Tommy is in the car 0@ (#peren)

 

 

gosub to read a subscript

 

The gosub command leads the reading process to an excluded subscript.

Excluded means the codes of the subscript are not binded in code following of our thread.

 

0050: gosub @INTRO_cleanup

 

 

The subscript must end with return

 

0051: return

 

 

If the subscript ends with 0051: return, our thread then continues with reading the codes after the 0050: gosub command

 

 

 

 

the mission mode

 

$ONMISSION is not only a variable to check if a mission script is running or not.

Set $ONMISSION to 1 activates a special mission mode if some important conditions are accomplished.

R*s mission scripts run allways in a subroutine which will be cancled from the exe if player is wasted or busted like reading a return code in the script.

 

1. At first it needs to set $ONMISSION equal to on_mission_flag

 

0180: set_on_mission_flag_to $ONMISSION// Note: your missions have to use the variable defined here

 

 

This code is set by default in the main part of the original main.scm

 

2. By starting the mission script must sended the reading precess with a gosub command into a subroutine for the main part of the mission script.

It must be the first gosub of the mission script.

 

0050: gosub @INTRO_main

 

 

 

3. By starting the mission script must be activated the onmission mode with

 

0004: $ONMISSION =  10317: increment_mission_attempts//here starts the missionscript

 

 

 

Then the mission is running in a subroutine and dont needs to check if player is defined or dead or busted.

If player dies or get busted, the exe cancels the subroutine as like as a return code of our script is readed

 

The rest of the mission script is just a cunning gosub construct.

 

In the template will be read then as next the conditional check if player is wasted or busted

and if yes it reads then the gosub to the fail subscript

and if not it skips the gosub to the fail subscript

 

and at last it reads the gosub to the cleanup subscript

and at very last it reads the end_thread

with end_thread ends then the mission script, its over.

 

 

 

hey,

 

sorry, i uploaded the wrong script, which is why the screen went black and other stuff.

 

here's my actual script but the issue is when i click new game it loads all the way, then just plays the 'duonk' type of sound, you know windows's sound when something wrong happens?

 

it basically does that, and this script i suppose is simpler in ways but yeah, it's the real one....

And all i have have done in this one is taken the TUT1 intro mission from the BTTF 0.2e script and taken out chunks that i don't need and edited it to my liking.

 

If this one can't be 'fixed' in a way.. i'll keep editing the template.

 

Thanks again smile.gif

 

oh yea the real script.... it's here -> REAL ONE IS HERE!

 

hey,

 

sorry, i uploaded the wrong script, which is why the screen went black and other stuff.

 

here's my actual script but the issue is when i click new game it loads all the way, then just plays the 'duonk' type of sound, you know windows's sound when something wrong happens?

 

it basically does that, and this script i suppose is simpler in ways but yeah, it's the real one....

And all i have have done in this one is taken the TUT1 intro mission from the BTTF 0.2e script and taken out chunks that i don't need and edited it to my liking.

 

If this one can't be 'fixed' in a way.. i'll keep editing the template.

 

Thanks again smile.gif

 

oh yea the real script.... it's here -> REAL ONE IS HERE!

Yes, edit the template.

I tried your second main.scm but I had no crash or windows sound, Tommy appeared normal.

I added the start_mission opcode to start mission script TUT1 but nothing happend.

The failure in the mission script is a wrong load check

This is wrong:

:TUT1_330

wait 0

if

Model.Load(#SABRE)

Model.Load(#SABRETUR)

Model.Load(#BANSHEE)

Model.Load(#BAGGAGE)

else_jump @TUT1_330

 

it should be this:

 

:TUT1_330wait 0 if  and0248:  model #SABRE available0248:  model #SABRETUR available0248:  model #BANSHEE available0248:  model #BAGGAGE availableelse_jump @TUT1_330

 

 

or this(in the variation to write classes instead opcodes):

 

:TUT1_345wait 0 if and  Model.Available(#SABRE)  Model.Available(#SABRETUR)  Model.Available(#BANSHEE)  Model.Available(#BAGGAGE)jf @TUT1_345

 

Cool, Thanks ZAZ.

 

as to editing the template where would i put the text boxes and checkpoint stuff? would it be under a new subsection part of INTRO thread or under INTRO_Main for example.

 

 

Thansk for all your help.

DarthGrijo

 

Cool, Thanks ZAZ.

 

as to editing the template where would i put the text boxes and checkpoint stuff? would it be under a new subsection part of INTRO thread or under INTRO_Main for example.

 

 

Thansk for all your help.

DarthGrijo

you can add it in the mission, if a mission starts you can do a lot of stuff

you can write a loop in the mission mainpart

 

:INTRO_main0317: increment_mission_attempts  0004: $ONMISSION = 1 // integer values do a lot of stuffLoop

 

I don't know what you want with your text boxes and checkpoints. I tested the tut1 mission script

and just some cars spawned at same place

I don't know what you want with your text boxes and checkpoints. I tested the tut1 mission script

and just some cars spawned at same place

nah, thats cool, was just unsure where to put all the other stuff.

as to the text boxes and checkpoints i just wanted a few text boxes to come up, display a marker over a car, another few text boxes saying to go here, *long pause* make that point with a checkpoint then mission passed type of thing.

 

but thats awesome, thats cleared it up for me!

 

Thanks again smile.gif

 

Have a few cookies! cookie.gifcookie.gifcookie.gifcookie.gif

sorry for double posting, but i have edited the template so under the " :INTRO_main " part all i have added is :

 

03E5: text_box 'INTRO'wait 500003E5: text_box 'INTRO1'wait 500003E5: text_box 'INTRO2'

 

 

but left the rest the same... and when i load it up the baggage car doesn't appear (i have now actually changed it to the sandking, diff mod now) and neither do the textboxes. i also added in a new thread which is taken from GTA VC LC mod to display the players coords to make sure it was the right script i was using and they didn't come up either..i have defined the mission and the player coords thread and nothing.

 

Oh but when i die after loading a new game it says mission failed. so i'm guessing that part of the script is working?

So is there anything i could do to get it to work?

 

Also i tried making a mission in bw's missionbuilder and i added in the Devil mod script (Iron man models ingame, part of new mod) and that seemed to work fine..

so should i use bw's mission builder vicescm.ini for sanny builder (making a backup first though) and trying it through that or something?

 

thanks icon14.gif

Edited by DarthGrijo

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
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

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