Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    2. Support

    3. Suggestions

Want to know if i have any hope


coin-god
 Share

Recommended Posts

Today i implemented a Save system in my TC mod.

 

Well as it is a BETA the game is running a Mission all the Time. That mission is the whole mod.

 

So i want people to be able to save their "score" induring the mission if they want. How? well with the normal SA save system, but i realize i cant do that, because the game is ONMISSION allways.

 

When i save the game everything is ok, but i cant load them, they crash.

 

Is there a way i can save games or load them if they are with a mission on?

Yl8KS.jpg
Link to comment
Share on other sites

Today i implemented a Save system in my TC mod.

 

Well as it is a BETA the game is running a Mission all the Time. That mission is the whole mod.

 

So i want people to be able to save their "score" induring the mission if they want. How? well with the normal SA save system, but i realize i cant do that, because the game is ONMISSION allways.

 

When i save the game everything is ok, but i cant load them, they crash.

 

Is there a way i can save games or load them if they are with a mission on?

Can you add your own save game function? I assume the "score" is integer and not float. Stat integers 343 and 344 are unused so you could store the score in one of those and look it up on reload.

 

JAB

Link to comment
Share on other sites

Well, i didn't think it in that way. But doing what you say i wouldn't need to do that.

 

The score is a number of Kills and the 2nd score is the SA Total number of Headshots Stat.

 

Whenever i kill one of the peds my counter (kills) go up +1, but as there are no other PEDS in the game the total number of peds i killed is the same number of peds Killed by CJ in the Stats.

The only problem is that i have a Ped that helps me in the mission, and he can kill too. So the Kills go up +1 if he kills one too, but not in the CJ Kills stats. But tehres a "people wasted by others" stat in SA.

 

So i could get the stats from thouse 2 SA Stats and then somthig like

 

Var1 = Stat1 + Stat2

 

So Var1 would be my actual game score. But if i save the game it willl be during the mission anyway. So it would crash when loading it.

Yl8KS.jpg
Link to comment
Share on other sites

 

Well, i didn't think it in that way. But doing what you say i wouldn't need to do that.

 

The score is a number of Kills and the 2nd score is the SA Total number of Headshots Stat.

 

Whenever  i kill one of the peds my counter (kills) go up +1, but as there are  no other PEDS in the game the total number of peds i killed is the same number of peds Killed by CJ in the Stats.

The only problem is that i have a Ped that helps me in the mission, and he can kill too. So the Kills go up +1 if he kills one too, but not in the CJ Kills stats. But tehres a "people wasted by others" stat in SA.

 

So i could get the stats from thouse 2 SA Stats and then somthig like

 

Var1 = Stat1 + Stat2

 

So Var1 would be my actual game score. But if i save the game it willl be during the mission anyway. So it would crash when loading it.

 

the originally save thread checks if onmission = 0 and then it set the game into onmission = 1 for saving and after save was done it set back to onmissin = 0, otherwise the game gets a bug with displaying the gangzones.

 

I think you should set your game to onmissin = 0 befor saving or whats the reason keep 1 ?

Is there running a mission script, defined in the mission table?

 

Important is that have released all your script stuff before saving

please show us one of your vars which you wonna store

Edited by ZAZ
Link to comment
Share on other sites

Well its a Global Var. Its defined at th start of the mission and used during the whole mission. The Game is Onmission allways thats why its set to 1.

 

I just remeber, didn't thirst for blood (Dem's mod) script worked as a mission? You played the mission all the time.. and i remember you could save your mission progress (score).

Yl8KS.jpg
Link to comment
Share on other sites

spaceeinstein

You can't save while an actual mission is running. You can create "missions" in the MAIN section of the main.scm and make it feel like you are on a mission while allowing you to be able to save the game.

Link to comment
Share on other sites

 

Well its a Global Var. Its defined at th start of the mission and used during the whole mission. The Game is Onmission allways thats why its set to 1.

 

I just remeber, didn't thirst for blood (Dem's mod) script worked as a mission? You played the mission all the time.. and i remember you could save your mission progress (score).

Forget thirst for blood (Dem's mod), lets talk about your main, is it for Biohazard?

Anyway, please clarify if there is running a real mission which is defined in the mission list.

If not, explain why you set the game to onmission = 1

 

And make shure that you have this code in your main section:

 

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

 

Link to comment
Share on other sites

Well, yes it is for Biohazard. And yes there is a REAL mission running (Defined in the mission list) and yes again i have 0180 defined at the main section.

 

There are 2 Defined Missions

 

Number 1: Player Selector

Number 2: Zombie Spawning System // The 90% mod

 

 

This is the Mission "loader" thread:

 

:R3thread 'R3':R3_11wait 0if$ONMISSION == 0else_jump @R3_11if Player.Defined($PLAYER_CHAR)else_jump @R3_11:R3_125if and Actor.Stopped($PLAYER_ACTOR) not Actor.Dead($PLAYER_ACTOR) not Actor.Driving($PLAYER_ACTOR)else_jump @R3_11if $PLAYER_SELECTED >= 1else_jump @R3_11_Bwait 0start_mission 1  // Zombie System$HELP_TOGGLE_ODDJOB_SHOWN = 0jump @R3_11:R3_11_Bwait 0start_mission 0  // Player Selector$HELP_TOGGLE_ODDJOB_SHOWN = 0jump @R3_11

 

 

$Player_Selected is 0 when you first start a new game, after you select it (end of Mission 0) the var is set to 1 so you will never be able to load Mission 0 (Select the Player) again.

Yl8KS.jpg
Link to comment
Share on other sites

 

Well, yes it is for Biohazard. And yes there is a REAL mission running (Defined in the mission list) and yes again i have 0180 defined at the main section.

 

There are 2 Defined Missions

 

Number 1: Player Selector

Number 2: Zombie Spawning System // The 90% mod

 

 

This is the Mission "loader" thread:

 

:R3thread 'R3':R3_11wait 0if$ONMISSION == 0else_jump @R3_11if Player.Defined($PLAYER_CHAR)else_jump @R3_11:R3_125if and Actor.Stopped($PLAYER_ACTOR) not Actor.Dead($PLAYER_ACTOR) not Actor.Driving($PLAYER_ACTOR)else_jump @R3_11if $PLAYER_SELECTED >= 1else_jump @R3_11_Bwait 0start_mission 1  // Zombie System$HELP_TOGGLE_ODDJOB_SHOWN = 0jump @R3_11:R3_11_Bwait 0start_mission 0  // Player Selector$HELP_TOGGLE_ODDJOB_SHOWN = 0jump @R3_11

 

 

$Player_Selected is 0 when you first start a new game, after you select it (end of Mission 0) the var is set to 1 so you will never be able to load Mission 0 (Select the Player) again.

Ok, then you have running your zombie mission all time.

You must add a check with a global var in your mission to cancle it and release your actors and end the mission with

00D8: mission_cleanup

0004: $ONMISSION = 0

 

Add also a check with that global var in the mission starter to prevent a mission start

if and

$ONMISSION == 0

$savebreake1 == 0

else_jump @R3_11

 

Use this global var if you wonna save

0004: $savebreake1 = 1

and give then the game a little wait time before saving

 

 

:SAVE_14if and0038:   $ONMISSION ==  0  // integer values0038:   $savebreake1  ==  1  // integer values004D: jump_if_false @SAVE_170001: wait  500 ms0004: $ONMISSION =  1  // integer values01B4: set_player $PLAYER_CHAR frozen_state  0 (frozen)0001: wait  350 ms03D8: show_SAVE_screen:SAVE_1500D6: if  083D9:   NOT   save_done004D: jump_if_false @SAVE_160001: wait  0 ms0002: jump @SAVE_15:SAVE_16//00A1: put_actor $PLAYER_ACTOR at 2493.03 -1701.17 1014.801B4: set_player $PLAYER_CHAR frozen_state  1 (unfrozen)0004: $ONMISSION =  1  // integer values0001: wait  350 ms0004: $ONMISSION =  0  // integer values:SAVE_170051: return

 

 

BTW. I could not open the biohazard main (GTA_BioHazard_Alert_OLD_B5.rar)

Did you protect it or something?

Link to comment
Share on other sites

Well, it is "locked" but it is not really impossible to open. One of my little trys to lock it. But now im not doing that anymore. As the New main of the new version is a complete remake.

 

If you still want to open the Beta 0.5 Main select IGNORE_UNKNOWN in the Debug Options of SB.

 

The zombie code is almost the same (the new one is a hardly modified version).

 

But you will see theres a mission_cleanup and stuff.

 

When you die the mission is over, everything goes back to 0 and the mission restarts.

 

About your code:

It still checks if the mission is not running, so it wont save the actual score.

Maybe i should give up with that idea of the saving for a while, the mission will be running at the time you would want to save anything.

 

Edit: In the 0.5 there is no Player Selector. (As well as many other improvements i made for the new version)

Edited by goin-god
Yl8KS.jpg
Link to comment
Share on other sites

What about pausing the zombie mission between saving and loading, and storing the score to a global and save that? Or have you already tried that?

 

Link to comment
Share on other sites

What about pausing the zombie mission between saving and loading, and storing the score to a global and save that? Or have you already tried that?

How to "pause" the mission?

Yl8KS.jpg
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
 Share

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