The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: punishermark13 on May 14, 2007, 09:28:02 PM

Title: LIves
Post by: punishermark13 on May 14, 2007, 09:28:02 PM
i wqant a lives script like mario so when die you can have like three new chances and can gain lives after having like three coins
Title: Re: LIves
Post by: ChaosSpartan28 on May 14, 2007, 09:35:04 PM
Script wouldnt be necessary. Just use variable in a common event.

Example (doesnt really work but close to the concept)

For instance Variable Lives = 3
Conditional Branch for Variable Lives (Player Death, Player Gain)
if Player Death:  Variable Lives -1
if PLayer Gain: Variable Lives +1

Its not all that hard, eventing can do many things this easy but you just have to be very good add making if statements XD
Title: Re: LIves
Post by: WcW on May 14, 2007, 09:55:07 PM
I'll post how to do this soon, so don't worry about figuring it out yourself.  I should have it up soon.
Title: Re: LIves
Post by: WcW on May 14, 2007, 10:46:05 PM
Here's how you get it too work, but only the basics.  If you need to see how to make it restart the level, post it.

Here's how to make it work:  simple.  When you walk into a coin, have it increase num_coin by 1.  Of course, you will need to have num_coin and life as variables.  Also, replace [] with the actors name.  It should now work.  If it doesn't, post what its doing.

-TGWP
Title: Re: LIves
Post by: Zeriab on May 15, 2007, 12:29:54 AM
I suggest you write when the common event Lives should be called. Or do you want it as a parallel process?
Either way implementing the lives system with events and event commands alone so that it works with every combat (random included) would be a bitch.
I naturally mean the random battles.

I personally suggest you want for someone to cook you up a script.
Title: Re: LIves
Post by: WcW on May 15, 2007, 02:19:06 AM
My bad... Yep, parallel process.   That should work on anything, really, I don't see what the problem is.  Anyway, to set up the Parallel Process:

Switch trigger to parallel process, and switch the switch thingy to a switch just ofr this, and activate the switch at the beginning of the game.  I think that should work...
Title: Re: LIves
Post by: Zeriab on May 15, 2007, 08:59:22 AM
The problem would be that parallel common events do not run during combat.
If you die in a random encounter combat you go directly to game over. The common events set to parallel will not be run.
Title: Re: LIves
Post by: WcW on May 15, 2007, 10:52:15 PM
Hmm... good point... That could be easily fixed, but first, to punishermark13, are you going to use random encounters?
Title: Re: LIves
Post by: punishermark13 on May 15, 2007, 11:23:07 PM
Well i want is wen my guy touches a enemy he loses a live and at 0 gameover.no random encounters!
Title: Re: LIves
Post by: Kokowam on May 15, 2007, 11:38:21 PM
Hero touch-

Subtract 1 from variable "Life"

Common event, Parallel process-

If "Life" = 0, Game over. :P
Title: Re: LIves
Post by: WcW on May 16, 2007, 01:24:50 AM
Ah!  Just use mine before, but make the hero touch add KO to your status, it will take you less work.  Pluss, it makes me seem more useful  :o