RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Restoring sp pll0xx?

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 89
can somone make me a simple script that just restores sp .. like 1 every 3 steps?

*****
MANMACHINE
Rep:
Level 91
God of Dicks
You don't need a script for that... You could do it with events...

***
Rep:
Level 90
~
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

**
Rep:
Level 89
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)

*
Resident Cloud
Rep:
Level 91
timer operations maybeys

******
Rep:
Level 91
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
holy shit my sig was big!

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
Quote from: blueXx
well 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.

**
Rep:
Level 89
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 )

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
Quote from: Jakexxx
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 )
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.

**
Rep:
Level 89
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...)