Start a Game With Script Disabled

Cbrounsley

Villager
Member
Joined
Apr 6, 2014
Messages
12
Reaction score
0
First Language
English
Primarily Uses
This may be a dumb question that's been answered somewhere on the forums, but since I couldn't find it I figured I'd post about it.

Is it possible to start your game with a script inactive? I have made a regional based battle system, but need to have a health bar. However, I don't want the health bar visible except when in battle. Finding a health bar script isn't hard, i just need to know how to hide it at the start of the game.
 

Solo

Veteran
Veteran
Joined
Jul 26, 2013
Messages
1,104
Reaction score
154
First Language
English
Primarily Uses
RMVXA
I modified this section of Game_Actor to add a sound effect to slip damage outside of battle:

def perform_map_damage_effect $game_map.screen.start_flash_for_damage if not $game_party.in_battle Audio.se_play("Audio/SE/Poison") #TAG, SE added to slip damage endend 
Try using "if $game_party.in_battle" as the condition for the health bar to appear (basically the opposite of what I did).
 
Last edited by a moderator:

Cbrounsley

Villager
Member
Joined
Apr 6, 2014
Messages
12
Reaction score
0
First Language
English
Primarily Uses
I modified this section of Game_Actor to add a sound effect to slip damage outside of battle:

def perform_map_damage_effect $game_map.screen.start_flash_for_damage if not $game_party.in_battle Audio.se_play("Audio/SE/Poison") #TAG, SE added to slip damage endendTry using "if $game_party.in_battle" as the condition for the health bar to appear (basically the opposite of what I did).
The problem with that is my regional battle system is no different than if the player was outside of battle processing. Basically my battles use regions and player location to determine who gets hit. I used an ABS a while back that had a hide code, I'm just wonder if I could have it hidden at the beginning of the game.Then again, I might not understand what you are saying and you might be right
 

Solo

Veteran
Veteran
Joined
Jul 26, 2013
Messages
1,104
Reaction score
154
First Language
English
Primarily Uses
RMVXA
Okay, is there any way you can use a script to trigger a switch whenever your battles start?

$game_switches[x] == trueWhen your special battle processing ends, you'll want to turn the switch off if possible.
Use the scripted switch trigger as the condition for the health bar then. Will that work?


EDIT: Ack, maybe you only need one equal sign to set the switch in the script. I think two equal signs is more of an evaluation procedure, but you can pretty easily test it for yourself and see.
 
Last edited by a moderator:

Venka

Veteran
Veteran
Joined
Jun 20, 2012
Messages
945
Reaction score
365
First Language
English
Primarily Uses
are you battles scripted or evented? A sample of your process would be helpful on where to hook the health meter showing. Of course there are HUDs that are activated with a switch. Here's one that is highly customizable and relies on a switch to be shown/hidden

http://www.rpgmakervxace.net/topic/347-reinorpg-hud/
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
Is it possible to start your game with a script inactive?
Only if the script itself has that function.
There are some scripts out there that are programmed in a way to check for a switch to activate or deactivate themselves.


Most of the scripts however are written to be permanently active, and then they can't start as "inactive" at all.


It is possible to rewrite a script so that it can be activated or deactivated, but that is NOT easy, it depends on the script and how it is organised.


If you post links to the scripts you want to be able to deactivate, then someone can check them and tell you how to rewrite them or if that is impossible to rewrite.


Or if it could be made to just "appear" to be deactivated, for example by switching the pictures for the bar between the real pictures and empty, transparent pictures.
 

Solo

Veteran
Veteran
Joined
Jul 26, 2013
Messages
1,104
Reaction score
154
First Language
English
Primarily Uses
RMVXA
Or if it could be made to just "appear" to be deactivated, for example by switching the pictures for the bar between the real pictures and empty, transparent pictures.
Ingenious. The old standby - outsmart the engine!
 
Last edited by a moderator:

Cbrounsley

Villager
Member
Joined
Apr 6, 2014
Messages
12
Reaction score
0
First Language
English
Primarily Uses
Only if the script itself has that function.

There are some scripts out there that are programmed in a way to check for a switch to activate or deactivate themselves.

Most of the scripts however are written to be permanently active, and then they can't start as "inactive" at all.

It is possible to rewrite a script so that it can be activated or deactivated, but that is NOT easy, it depends on the script and how it is organised.

If you post links to the scripts you want to be able to deactivate, then someone can check them and tell you how to rewrite them or if that is impossible to rewrite.

Or if it could be made to just "appear" to be deactivated, for example by switching the pictures for the bar between the real pictures and empty, transparent pictures.
Would that be possible with this HP Bar script?

http://www.rpgmakervxace.net/topic/347-reinorpg-hud/
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
Would that be possible with this HP Bar script?


http://www.rpgmakervxace.net/topic/347-reinorpg-hud/
Why didn't you read the configuration part of that script?
It already has a switch to activate/deactivate the HUD, no change needed.


But take this really IMPORTANT lesson:


Whenever you add a script, you MUST check the script's configuration section to see if it uses switches or variables, and then reserve and name those switches and variables to prevent bugs and incompatibilities in your game.


Most scripts that use variables or switches default to ID=1, and you need to change that to make sure that every script reacts to different switches and variables, and that none of those switches or variables are used ANYWHERE else in your game.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


When you are asking for help with ANYTHING related to a custom script, please post your question in the RGSSx Script Support forum, but most importantly TELL us what scripts you're using AND include links to them.


It's taken 9 posts (and 16 hours) to reach a solution, when the answer could have been given to you in the first reply if you had provided all the information initially ;)
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,015
Members
137,563
Latest member
MinyakaAeon
Top