@move_speed(Resolved)

Started by chaucer, August 07, 2014, 01:33:41 am

Previous topic - Next topic

chaucer

August 07, 2014, 01:33:41 am Last Edit: August 07, 2014, 02:23:32 am by chaucer
Hello all, I was messing around with RMXP and while playing with @move_speed, I realized I can't call it like other objects, I.E

$game_player.move_speed

I was wondering if it's possible to call @move_speed from another scene and if so how, I'm probably missing something simple I'm sure.

Zexion

Hmm, $game_player.move_speed works for me. What are you trying to do?

chaucer

when I call it I get
'undefined method move_speed for #<Game_Player:0x2ffbe98>'
also I was planning to create a state that causes a slower move speed for blizz abs.

Zexion

I think blizz-abs uses a different move_speed. Use normal_speed instead? idk really, I asked kk20

KK20

http://forum.chaos-project.com/index.php/topic,106.msg175785.html#msg175785

@move_speed is a Game_Character variable. I do believe it is not readable nor writable initially. You have to do

class Game_Character
 attr_accessor :move_speed
end

to be able to call it from other classes or on the map. But since you are using BlizzABS, I suggest using @normal_speed (as posted in the above link) instead since the Game_Player's move_speed updates each frame, thereby revoking your script call.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

chaucer

thanks : ) for the help very appreciated, I figured move_speed would have already been added but I guess not. D:
Also the link explained why i couldn't rewrite move_speed last time I tried.

MetalZelda

You could do better, you can shortcut it to be much more faster and efficient, you can for example do

speed = $game_player.move_speed

So in your eventing page you can script call

speed(whatevervalue)
I need to search for the script I customized for dat

:naughty: :naughty: :naughty:

KK20

You're still calling the same amount of code in the long run. There's no way that would make it "faster and efficient". Just lazier.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

MetalZelda

Quote from: KK20 on August 24, 2014, 04:06:22 pm
You're still calling the same amount of code in the long run. There's no way that would make it "faster and efficient". Just lazier.


That's a great plus if you make a lot of cutscene / event that alter game_player speed ^^