Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

2 Pages V  < 1 2  
Reply to this topicStart new topic
> [Help] When run, drain SP, when not running, regen SP, when drained, disable run, However if fully drained, it no longer wants to regen :(
Taiine
post Nov 12 2010, 06:42 PM
Post #21


Level 17
Group Icon

Group: Revolutionary
Posts: 333
Type: Mapper
RM Skill: Advanced




I'm not taking off the running part of the script, the battle system has everything set just so, so I can have running animations and effect animations/frames and detect if player is running to do this yada yada.. If I remove it, I lose all of that.

IIf you'd read my post, I already started it has NOTHING to do with the running arrows. they are the SAME as if having 'if up is pressed' only called from another means so you can disable the controls if needed. I also started that the system as a whole works fine, the SP WILL regen if you stand still or walk, but if it drops to zero, something is stopping it from regenning.

I also said it works FINE if you remove the one small branch I had highlighted that sets it to disable the running key. with out it, the script to run and regen sp when you stop works 100% fine, but some reason that one branch set to disable the running key only, some how keeps sp from regenning ONLY if it drops to zero.

Did you look at the demo posted? It has the whole battle system in it and my event.


__________________________

an RMXP Game utilizing Blizz-ABS


Concept Projects: DASH! The Masters Game | Finny Adventures (temp title)
My first RMXP Script: Taiine's Solo Player Custom Menu System v0.6 (UPDATED 13th of Nov 10)

Go to the top of the page
 
+Quote Post
   
Night_Runner
post Nov 12 2010, 11:00 PM
Post #22


Level 50
Group Icon

Group: +Gold Member
Posts: 1,520
Type: Scripter
RM Skill: Undisclosed




Taiine, getting fired up!

I seriously don't know why you posted this question here, it's like asking a great white shark if it knows the directions to the fruit shop.
In the water, the shark knows everything, and would be able to sniff out blood from miles away. But you're asking it a question involving land. Shark's know nothing about land! Even if it is as simple as where to buy fruit!

Just change water to eventing, the shark to the guys that have been trying to help, blood being problems with your eventing, land being scripting, and buying fruit being solve script related problems.


If you're willing to use a switch to run that common event, it's quite responsive, but uses a switch
[Show/Hide] Approach 1 - Involves 1 switch



If you used a variable instead of @sp_rejuv_time, then you wouldn't need a switch.

The code:
CODE
$game_system.running_button =
   $game_party.actors[0].sp > 0

@sp_rejuv_time = 0 if
@sp_rejuv_time.nil?

if Input.dir8 > 0 and
   $game_player.running?
  $game_party.actors[0].sp -= 3
  @sp_rejuv_time = 0
elsif @sp_rejuv_time > 20
  $game_party.actors[0].sp += 3
  @sp_rejuv_time  = 0
else
  @sp_rejuv_time += 1
end


And approach 2 doesn't use a switch, but isn't as responsive:
[Show/Hide] Approach 2 - Sluggish



And the code:
CODE
@time_to_wait = 0
if Input.dir8 > 0 and
   $game_player.running?
  $game_party.actors[0].sp -= 3
else
  $game_party.actors[0].sp += 3
  @time_to_wait = 20
end
$game_system.running_button =
   $game_party.actors[0].sp > 0
@wait_count = @time_to_wait


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
lilcooldude69
post Nov 13 2010, 01:52 AM
Post #23


The pro-est eventer u know ;D
Group Icon

Group: Revolutionary
Posts: 297
Type: Event Designer
RM Skill: Masterful




QUOTE (Taiine @ Nov 12 2010, 06:42 PM) *
I'm not taking off the running part of the script, the battle system has everything set just so, so I can have running animations and effect animations/frames and detect if player is running to do this yada yada.. If I remove it, I lose all of that.

IIf you'd read my post, I already started it has NOTHING to do with the running arrows. they are the SAME as if having 'if up is pressed' only called from another means so you can disable the controls if needed. I also started that the system as a whole works fine, the SP WILL regen if you stand still or walk, but if it drops to zero, something is stopping it from regenning.

I also said it works FINE if you remove the one small branch I had highlighted that sets it to disable the running key. with out it, the script to run and regen sp when you stop works 100% fine, but some reason that one branch set to disable the running key only, some how keeps sp from regenning ONLY if it drops to zero.

Did you look at the demo posted? It has the whole battle system in it and my event.

i did read ur post, whats stopping it from regening is when ur sp reaches 0 nothing is telling it to regen u have to do what i did when sp reaches zero make it so u recieve 1 sp so its never actually at 0 that way u can set the next part of the event to anything above 0 will regen if standing still but seems this guy scripted/evented a sp regen thingy so that should fix it hopefully


__________________________

My Userbars


Rated pg-13 part of signiture
Scientist A: "A single sperm has 37.5MB of DNA information in it. That means a normal ejaculation represents a data transfer of 1,587.5TB."
Scientist B: Too bad ejaculate has terrible packet loss
Scientist C:but the transfer does have a lot of redundancy

Go to the top of the page
 
+Quote Post
   
Taiine
post Nov 13 2010, 05:55 PM
Post #24


Level 17
Group Icon

Group: Revolutionary
Posts: 333
Type: Mapper
RM Skill: Advanced




Yep sure am Night Runner!

And lilcooldude69, yes, there IS something that's telling it to regen, look at it. When ever you are NOT running, when you do not have the run key held, it is supiose to regen SP, and it DOES if the disable the run button is not there. It can be fully drained to zero then once you stop running it starts to regen just fine. So that would mean that it does indeed tell it to regen, where your saying nothing is.

Conditional Branch: IS PLAYER RUNNING?
Yes
Change SP -5
ELSE
Change SP +5

Yes, even if it is drained to zero, it still regens.

It's just when the one branch is added to disable running if SP is =< 5 to disable the run key until it is above that.
Some how that is preventing the SP from regening at all once drained.

So you sadly still didn't make much sense saying there is nothing telling it to go up when there is, there's four of them :3

Night Runners way works very well, someone at Chaos Productions also gave me a script call that does the very same thing as his common event as well. So thanks for trying.


__________________________

an RMXP Game utilizing Blizz-ABS


Concept Projects: DASH! The Masters Game | Finny Adventures (temp title)
My first RMXP Script: Taiine's Solo Player Custom Menu System v0.6 (UPDATED 13th of Nov 10)

Go to the top of the page
 
+Quote Post
   
lilcooldude69
post Nov 15 2010, 09:11 AM
Post #25


The pro-est eventer u know ;D
Group Icon

Group: Revolutionary
Posts: 297
Type: Event Designer
RM Skill: Masterful




QUOTE (Taiine @ Nov 13 2010, 05:55 PM) *
Yep sure am Night Runner!

And lilcooldude69, yes, there IS something that's telling it to regen, look at it. When ever you are NOT running, when you do not have the run key held, it is supiose to regen SP, and it DOES if the disable the run button is not there. It can be fully drained to zero then once you stop running it starts to regen just fine. So that would mean that it does indeed tell it to regen, where your saying nothing is.

Conditional Branch: IS PLAYER RUNNING?
Yes
Change SP -5
ELSE
Change SP +5

Yes, even if it is drained to zero, it still regens.

It's just when the one branch is added to disable running if SP is =< 5 to disable the run key until it is above that.
Some how that is preventing the SP from regening at all once drained.

So you sadly still didn't make much sense saying there is nothing telling it to go up when there is, there's four of them :3

Night Runners way works very well, someone at Chaos Productions also gave me a script call that does the very same thing as his common event as well. So thanks for trying.

u have that conditional nested inside of the input button conditional in turn meaning it will only activate if BOTH are true so if you press the up button it makes it true and if running is activated it makes it true therefore u will lose sp as u run however, you have the regen inside of the running enabled conditional statement meaning that will only regen if you are pressing the indicated arrow and running is off which is why whenever u press the indicated arrow key it regens but if u let it go it doesnt and THE SOLE REASON IT WONT REGEN AT 0 is because nothing is telling it to regen at 0 if you look at this screenshot edit i made >_>

Problem with your event


in conclusion, it only regens when u press the arrow keys because you have the Game_running on inside of a statement that needs to be true to work, second it stops regening when it reaches 0 because nothing is below 0 and nothing is above 0 therefore wont work which also explains your stop regnning at 0 problem because, it only regens if game running is off, it cant regen if its not even working am i right, sooo before you go thinking your correct look at the facts im showing you :3333!, a good attempt at trying to school somone at somthing they do on a daily basis every day haha


__________________________

My Userbars


Rated pg-13 part of signiture
Scientist A: "A single sperm has 37.5MB of DNA information in it. That means a normal ejaculation represents a data transfer of 1,587.5TB."
Scientist B: Too bad ejaculate has terrible packet loss
Scientist C:but the transfer does have a lot of redundancy

Go to the top of the page
 
+Quote Post
   
Rukiri
post Nov 15 2010, 05:15 PM
Post #26


emerge -avt awesome! Wait... it brings me.... HERE?!
Group Icon

Group: Revolutionary
Posts: 1,717
Type: Scripter
RM Skill: Advanced




Easiest way to do this.

Switches: Is_Running
Variables: Timer

if Switch[001: is_Running] ON
variable[001: Timer] add 1
if variable[001: Timer] greater than or equal to 15
$game_party.actors[0].sp -= 1
variable[001: Timer] equal 0
end
end
else
$game_party.actors[0].sp -= 1
variable[001: Timer] equal 0




__________________________
Xeilsoft
- Follow your dreams to the very end..

Kits that I'm working on.
[Unity3D 4.0] LTTP/Minish Cap - I don't have time for custom gfx like what the pze folks are doing but I will try and work on some enhanced LTTP graphics.

Main PC
Core i7 3820 overclocked @ 4.8GHZ
Galaxy: Nvidia Geforce GTX 680 GDDR5 2GB
Asrock X79 Extreme9 w' creative sound
64GB corsair platinum @ 1600MHZ
Muchkin 128GB SSD(boot), OZKIN 2TB SSD, Western Digital GREEN 1TB HDD.
Rosewill Lightning 1000W PSU
OS: Funtoo Linux, Windows 8 (Virtual Machine)

iMac (March 2013)
3.4GHz Quad-core Intel Core i7, Turbo Boost up to 3.9GHz
16GB 1600MHz DDR3 SDRAM - 2X8GB
1TB Serial ATA Drive @ 7200 rpm
NVIDIA GeForce GTX 680MX 2GB GDDR5
Go to the top of the page
 
+Quote Post
   

2 Pages V  < 1 2
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th May 2013 - 09:54 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker