The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Jakexxx on February 08, 2006, 03:39:50 AM

Title: Restoring sp pll0xx?
Post by: Jakexxx on February 08, 2006, 03:39:50 AM
can somone make me a simple script that just restores sp .. like 1 every 3 steps?
Title: Restoring sp pll0xx?
Post by: GilgameshRO on February 08, 2006, 08:15:33 AM
You don't need a script for that... You could do it with events...
Title: Restoring sp pll0xx?
Post by: Dalton on February 08, 2006, 12:19:47 PM
Actually, I was looking at that... It would be kind of hard...  Conditional branches don't allow stuff like that

And yeah I was looking at it to help out Jakexxx
Title: Restoring sp pll0xx?
Post by: Jakexxx on February 08, 2006, 12:44:42 PM
yeah even if i could get it to run with conditional branches, it would still take a event on every map. Its much easier just to make a script for it. (believe me I hate scripts too, but in this case its so much easier)
Title: Restoring sp pll0xx?
Post by: ahref on February 08, 2006, 05:25:03 PM
timer operations maybeys
Title: Restoring sp pll0xx?
Post by: blueXx on February 08, 2006, 06:04:21 PM
well zeriab.. you can't possibly say it's basic if no one knows it..

ok people to solve the need to put it on every map:
use a common event and choose parallel as trigger, then turn on the switch to make the common event run

now if you want it by time you do:
wait 60frames (3sec)
change sp: entire party: +1 (or something)

if by steps

if button left is pushed then
-variable(steps) +1
if button right is pushed then
-variable(steps) +1
if button up is pushed then
-variable(steps) +1
if button down is pushed then
-variable(steps) +1
if variable(steps) >= 3 then
-variable(steps)= 0
change sp: entire party: +1
Title: Restoring sp pll0xx?
Post by: Zeriab on February 08, 2006, 07:18:03 PM
Quote from: blueXxwell zeriab.. you can't possibly say it's basic if no one knows it..
That seems to be out of context... :shock:

Anyway there's a problem with the solution you've entered as parallel event will register the keys several times per second and will keep counting if you for example try to step into a wall.

I have a solution that avoids this, but it is pretty. Anyway here ya go:

Thanks to blueXx for the 2 frames wait fix.
Title: Restoring sp pll0xx?
Post by: Jakexxx on February 08, 2006, 09:50:43 PM
would it be possible that someone could put a script together so i dont have to put a event in every map? just asking, it would be easier in my opinion (I would do it myself, but I'm still learning how to script :P )
Title: I feel stupid
Post by: Zeriab on February 08, 2006, 10:03:29 PM
Quote from: Jakexxxwould it be possible that someone could put a script together so i dont have to put a event in every map? just asking, it would be easier in my opinion (I would do it myself, but I'm still learning how to script :P )
I feel stupid for not making this clear enough. I thought making it bigger would confuse... My mistake. :oops:
Here's a bigger portion of the picture:

Just turn whatever switch you choose to be common events Condition Switch ON and it will work.
1 event. No more no less.
You can turn it on and off by turning your chosen switch on and off.
Very simple.

Easier to understand what to do than a scripted solution if you need to disable and enable it.
Title: Restoring sp pll0xx?
Post by: Jakexxx on February 08, 2006, 10:08:15 PM
finee finee. I'll use events. ( I would still like to use a scipt if anyone would like to make one :p, I have events down with it now though...)