The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: fadark on April 05, 2007, 01:12:56 AM

Title: Speed Changing Script [Resolved]
Post by: fadark on April 05, 2007, 01:12:56 AM
i need a script that i can use with "call script" in an event that increases your hero's speed of movement by little.

i dont want to use "move event" and then choose "change move speed" because that only goes up by big intervols. i only need him to speed up a little bit. something like:
Code: [Select]
movement speed += .1
or something like that (i dont know the correct syntax)

if anyone can help, that would be great!
Title: Re: Speed Changing Script [Request]
Post by: fadark on April 05, 2007, 11:32:19 AM
is this even possable? gecause nobody is saying anything
Title: Re: Speed Changing Script [Request]
Post by: fadark on April 05, 2007, 10:49:04 PM
anyone there? this is a simple (i think) script. it would only take a min to help me
Title: Re: Speed Changing Script [Request]
Post by: tSwitch on April 05, 2007, 11:11:29 PM
use a paralell common event to detect a key change, if the key is pressed, increase move event (player) increase move speed.
that should work
(I just came up with that off the top of my head so if it dosen't sorry)
Title: Re: Speed Changing Script [Request]
Post by: fadark on April 05, 2007, 11:36:04 PM
that wont do. because i need my speed to change only a tiny bit (forever) when i talk to a spesific event
Title: Re: Speed Changing Script [Request]
Post by: :) on April 05, 2007, 11:38:27 PM
it will increase forever....set move route: Player, change speed = 4
Title: Re: Speed Changing Script [Request]
Post by: fadark on April 06, 2007, 12:28:15 AM
i know, but i only want his speed to increase a tiny bit (not one whole speed count. just .1 or something) which is why i think i need a script..... and why this is in the "script" section of the forum. not to be rude, but can anyone here script that for me?

i need it to be able to function in "call event" in an event
Title: Re: Speed Changing Script [Request]
Post by: :) on April 06, 2007, 12:31:55 AM
have you ever tried speed 4? it's EXACATLLY what you want. If there was anything less then it , it would be 3 which is normal speed. 4 is a small small gain
Title: Re: Speed Changing Script [Request]
Post by: fadark on April 06, 2007, 12:53:20 AM
dood, i already told everyone here: the 1-2-3-4-5-6 speed settings are too big intervols for what i want. this is what im doing, maybe then you will understand:

im making a sphere grid by (like in ff10) using events. when i have a sphere, i can activate a sphere node which increases one of my stats by a set amount (hp, sp, agi, dex, int, etc.). i have about 25 "endurance nodes" which increase my hero's movement speed by a tiny bit. there are 25 of these nodes, so i obviousley cant use those large increments of 1-2-3-4-5-6 because i would get to fast after using just 2 or 3 nodes. i need a "call script" script that increases my movement speed by a tint tiny tiny bit. (like, .1 insdead of 1)

now do you see what i mean?
Title: Re: Speed Changing Script [Request]
Post by: :) on April 06, 2007, 01:47:59 AM
that's ATON better.
Title: Re: Speed Changing Script [Request]
Post by: fadark on April 06, 2007, 02:35:45 AM
heh. maybe now people will know what im talking about.

anyone know how to do this?
Title: Re: Speed Changing Script [Request]
Post by: tSwitch on April 06, 2007, 02:21:17 PM
now see, if you said that in the first place then it would have been a lot easier to help you.

I'm guessing that(this is pseudocode here)
you'd need to have it check to see how many endurance nodes are added, then
find the character's speed variables, then increment them by .4 * number of nodes or something.

also, are you doing your sphere grid system with events or scripts?
Title: Re: Speed Changing Script [Request]
Post by: fadark on April 06, 2007, 02:50:43 PM
okay, but i dont know the correct syntax, so i need someone to make me the script.

and im using the sphere grid system with events. not the script
Title: Re: Speed Changing Script [Request]
Post by: tSwitch on April 06, 2007, 03:09:32 PM
then you'd still need a paralell common event so that it always checks how many you have
you'd also need to make it so that when you equip or un-equip an endurance sphere, an enduranceVariable increases or decreases to keep the paralell event working properly

also (why 25?)
Title: Re: Speed Changing Script [Request]
Post by: fadark on April 06, 2007, 06:10:57 PM
you dont get it. you can't equip the endurance shperes. you use them, then they go away forever but your speed increases forever.
Title: Re: Speed Changing Script [Request]
Post by: tSwitch on April 06, 2007, 07:31:13 PM
ok, then you'd need to make the item call a common event to increase the player's movement speed
Title: Re: Speed Changing Script [Request]
Post by: fadark on April 07, 2007, 12:11:13 AM
you dont get them and then use them from the item menu. you use a sphere on the endurance node that is on the map and your speed increases
Title: Re: Speed Changing Script [Request]
Post by: fadark on April 07, 2007, 03:48:32 PM
can someone do this?
Title: Re: Speed Changing Script [Request]
Post by: fadark on April 08, 2007, 10:27:34 PM
i guess its either impossable or everyone hates me.
Title: Re: Speed Changing Script [Request]
Post by: JustinAC on April 08, 2007, 10:39:14 PM
Try going into game character and right underneath
  attr_reader   :through                  # ????
  attr_accessor :animation_id             # ??????? ID
  attr_accessor :transparent              # ????
near the top, stick this on the next line
  attr_accessor :move_speed

Then... in the event, for your script call, try
$game_player.move_speed = $game_player.move_speed + .1

That's the only way I can think of doing it.  That's assuming that the game can even process a move speed with a decimal value.  I'm not sure if the game does movement in integers or not, but try that out.
Title: Re: Speed Changing Script [Request]
Post by: Kokowam on April 08, 2007, 10:41:37 PM
Well, I'd just like to bring up the topic of "3 Strikes and You're Out." Also, this is just a thought that appeared while reading through this. What if the game didn't allow you to change speed by just a tiny interval? I'm not sure, but you can choose to look through the scipt :P Also, if speed increased forever, in a couple of seconds, wouldn't you be able to just zip through from one end of the map to another in one press of the key?

EDIT: DANG! He beat me to my thought XD
Title: Re: Speed Changing Script [Request]
Post by: fadark on April 08, 2007, 11:25:03 PM
it freaking worked! Sweet! You rock! do you know how much you rock? You rock like a boulder! (lol). at first i didnt think it could work with decimals because i got a syntax error. but thats because it looked like this:
Code: [Select]
$game_player.move_speed =
$game_player.move_speed + .1

but when i changed it to this:
Code: [Select]
$game_player.move_speed =
$game_player.move_speed + 0.1

it worked! yay! thank you!
Title: Re: Speed Changing Script [Resolved]
Post by: JustinAC on April 09, 2007, 01:49:47 AM
Cool, glad to hear it, good luck
Title: Re: Speed Changing Script [Resolved]
Post by: fadark on April 09, 2007, 01:59:18 AM
thanks! You too!  ;D