Main Menu
  • Welcome to The RPG Maker Resource Kit.

Speed Changing Script [Resolved]

Started by fadark, April 05, 2007, 01:12:56 AM

0 Members and 1 Guest are viewing this topic.

fadark

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:
movement speed += .1
or something like that (i dont know the correct syntax)

if anyone can help, that would be great!

just so everyone knows, im 15 years old.

fadark

is this even possable? gecause nobody is saying anything

just so everyone knows, im 15 years old.

fadark

anyone there? this is a simple (i think) script. it would only take a min to help me

just so everyone knows, im 15 years old.

tSwitch

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)


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

fadark

that wont do. because i need my speed to change only a tiny bit (forever) when i talk to a spesific event

just so everyone knows, im 15 years old.

:)

it will increase forever....set move route: Player, change speed = 4
Watch out for: HaloOfTheSun

fadark

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

just so everyone knows, im 15 years old.

:)

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
Watch out for: HaloOfTheSun

fadark

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?

just so everyone knows, im 15 years old.

:)

Watch out for: HaloOfTheSun

fadark

heh. maybe now people will know what im talking about.

anyone know how to do this?

just so everyone knows, im 15 years old.

tSwitch

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?


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

fadark

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

just so everyone knows, im 15 years old.

tSwitch

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?)


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

fadark

you dont get it. you can't equip the endurance shperes. you use them, then they go away forever but your speed increases forever.

just so everyone knows, im 15 years old.

tSwitch

ok, then you'd need to make the item call a common event to increase the player's movement speed


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

fadark

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

just so everyone knows, im 15 years old.

fadark


just so everyone knows, im 15 years old.

fadark

i guess its either impossable or everyone hates me.

just so everyone knows, im 15 years old.

JustinAC

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.

Kokowam

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

fadark

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:
$game_player.move_speed =
$game_player.move_speed + .1


but when i changed it to this:

$game_player.move_speed =
$game_player.move_speed + 0.1


it worked! yay! thank you!

just so everyone knows, im 15 years old.

JustinAC


fadark


just so everyone knows, im 15 years old.