Easy ways to simulate spacesuit, helmet, low O2 effects

dissembly

Warper
Member
Joined
Nov 9, 2016
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Hi all,


I've had this for a week and am learning by building a space-based game.

One of the features I'm trying to simulate is zero-oxygen conditions.



I think that I can probably do this with a common event that checks for two items:
- Set up two items, a spacesuit and a space helmet
- Set a common event that checks to see if a player is wearing these two items


- Have the event deal some amount of damage per unit time if they are not wearing both
- Have the event stop if they are
- Set up events that call this common event at the entrances of specific rooms that have no air, or when something happens that sucks the air out of a room

However, I can see it getting difficult to manage when you start consider, what if the player takes their helmet off while in a room (i.e. after the event has already stopped because they passed it's check already), what if they are injured and the helmet or suit is damaged (this is actually a feature that I wanted to include; they would have to find a new suit or repair it, and it could be a way to pace progress through the game without seeming contrived).



(The other complication I can foresee is that I need to make it look like they are wearing those items when they are, and not when they're not. However I assume it can't be too hard to do that as I am sure people have made games where characters take off and put back on helmets etc before)

Then I thought, maybe there is some way to make this effect part of the properties of a map or room. Surely people have tried to create water levels before, where if the player is in a particular underwater map, they have a limited time before they run out of oxygen, or they need scuba gear or a magic cap or something in order to survive there. This would basically work the same way, and it seems common enough, so I thought I would ask before starting on the common event plan. For example, would Region IDs let you do something like this, with less potentially bulky or tedious common-event-writing?

Would this be more efficient if, say, I used a switch attached to the player, so "ON" means there's no oxygen and "OFF" means there is, and could I then set up a common event that runs whenever the switch comes on (is that even possible? To save processing resources could it be written such that it was only called when, say, character takes their helmet off, and it then checks to see if the switch is ON, and vice versa, when the switch comes on, it automatically checks to see if their helmet is)? And then my room entrances could alter that switch instead of being responsible for calling the common event?

Have people tried to make maps with, say, poison gas or magic area effects before? What's the most efficient way to do it?


(I just spent an entire day creating an airlock system, and it was verrrry tedious and time-consuming for a final product that is quite buggy, so now I'm finally taking the advice every tutorial seems to give and trying to plan in advance instead of building it up as I go!)
 
Last edited by a moderator:

VicWhite

Star rover
Veteran
Joined
Sep 22, 2014
Messages
261
Reaction score
186
First Language
Spanish
Primarily Uses
N/A
I am working on a similar project, altho there is no oxygen 0 areas. For the equipment upgrade, I found this script by @Jeneeus Guruman





However, I can see it getting difficult to manage when you start consider, what if the player takes their helmet off while in a room (i.e. after the event has already stopped because they passed it's check already), what if they are injured and the helmet or suit is damaged (this is actually a feature that I wanted to include; they would have to find a new suit or repair it, and it could be a way to pace progress through the game without seeming contrived)


About this, can't simply work like that? :


An event on each room set as parallel process. Checks for the common event (ie: Helmet wearing) Which is: 


conditional branch/ is the player wearing helmet?


[Yes]


Nothing


[No]


Inflict state: Drowning (similar to poison)
 

dissembly

Warper
Member
Joined
Nov 9, 2016
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Ok, that sounds fairly straightforward, thanks. Is there a way to make an event run just when you're in a particular room, as opposed to having the player walk on a specific tile to trigger it?
 

VicWhite

Star rover
Veteran
Joined
Sep 22, 2014
Messages
261
Reaction score
186
First Language
Spanish
Primarily Uses
N/A
Yes. You need to change the trigger from "Action button/Player Touch" to "Parallel Process". 


I highly recommend reading some Event Tutorial because it will save you a lot of headaches in the near future. Anyways, you can always ask for help in the forums.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
The best event tutorial that I know of is Dreadshow's playable tutorial, which you can find here


You will also find a ton of useful stuff in Andar's compilation of info for new users here.


Spending a bit of time on this now will save you a huge amount of time and frustration in the future.
 

dissembly

Warper
Member
Joined
Nov 9, 2016
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Ah thank you VicWhite. Sorry, while I wasn't confused about the parralel process I was confused about confining the event to a single room, I must have been imagining a common event.


And thanks for the links ksjp17, I'm downloading the playable tutorial now.
 

dissembly

Warper
Member
Joined
Nov 9, 2016
Messages
4
Reaction score
0
First Language
English
Primarily Uses
For the record, what I've tried just over the last hour is to set up three events in the room I am depressurising, all parralel process.


I made a state called "Depressurised".


The first event inflicts the state "Depressurised" if they are not wearing a spacesuit, and removes that state if they are.


The second event uses a conditional branch to see if they have the state "depressurised", and tints the room gray if they are, and tints it back to normal if they aren't.


The third event uses another conditional branch to see if they have the state "depressurised", and if they do, waits 90 seconds ("Wait 900" pasted six times), then checks again if they still have that state, then displays a message saying they've suffocated and goes to "Game Over" if they do still have it. (I can already see a bug... if I put on the spacesuit before the 90 seconds is up, then take it off again in that timeframe, it will kill me once the original 90 seconds ends rather than starting from 90 again. But actually maybe that's not really unrealistic anyway.)


Anyway I was just playing around and I know I probably haven't done it a great way, but I wanted to try it that way first just to see. The reason I did it this way (with conditional branches instead of just having the state itself eventually kill the player) is that the state I set up seems to get them to 1 HP and then doesn't seem to do anything. It also takes a long time to inflict harm. I couldn't really figure out how states are intended to work, hence coming up with a probably-convoluted workaround instead. Anyway I'll try to learn more for now and see how I go. Thanks guys.
 
Last edited by a moderator:

wolfpak692

Veteran
Veteran
Joined
May 18, 2016
Messages
127
Reaction score
32
First Language
English
Primarily Uses
great starting point...  also, Dreadshadows Event tut is awesome...
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Are we allowed to post about non-RPG Maker games?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:

Forum statistics

Threads
105,884
Messages
1,017,238
Members
137,608
Latest member
Arm9
Top