Page 1 of 1

[RPG mode] Modify maxspeed?

Posted: September 26th, 2012, 10:02 am
by kddekadenz
Exist any command or hack to modify the maxspeed via script?
I know that there is a command r_get_maxspeed.
I do need to know this to toggle the movespeed using a key.

Again, there is a list with all RPG commands missing.

Re: [RPG mode] Modify maxspeed?

Posted: September 29th, 2012, 2:14 pm
by kddekadenz
Hirato, please reply, I want to include it in the next monthly release of Kelgar.

Re: [RPG mode] Modify maxspeed?

Posted: September 29th, 2012, 9:36 pm
by Hirato
You can only run, there is no walking or sneaking yet.
Your speed and jump height is determined by your stats, modifying these will increase them. In addition you can set bonus values for these via r_char_base_maxspeed and r_char_base_jumpvel

Re: [RPG mode] Modify maxspeed?

Posted: October 1st, 2012, 1:22 pm
by kddekadenz
Hirato wrote:You can only run, there is no walking or sneaking yet.
Thank you. I do know that this isn't implemented yet, I want to implement it myself. Sorry if that was unclear.
Hirato wrote:In addition you can set bonus values for these via r_char_base_maxspeed and r_char_base_jumpvel
This is actually the answer to my question. Thank you again :)

Re: [RPG mode] Modify maxspeed?

Posted: October 2nd, 2012, 2:03 pm
by kddekadenz
Does not work..
Does it need any reference (player)? Does it work only under specific circumstances (only for items,etc.)?
I'm not sure how to use it. r_char_base_maxspeed player 50?

Re: [RPG mode] Modify maxspeed?

Posted: October 4th, 2012, 11:04 am
by kddekadenz
Here is my code (does not work properly):

defaults.cfg (executed in cfg of my game)

Code: Select all

bind Q [
if ( < (r_global_get $speed) 1) [ //running?
	r_global_set $speed 1 //start running
	r_char_base_maxspeed self 100

	echo (concat "fast - " (r_get_maxspeed player))] [
		r_global_set $speed 0 //normal speed
		r_char_base_maxspeed self 0
		echo (concat "normal - " (r_get_maxspeed player))] 
]
I did use a global variable to have the bonus persistent over sessions. I think the mistake is in how I called r_char_base_maxspeed, but I'm not sure what it is.

Re: [RPG mode] Modify maxspeed?

Posted: October 22nd, 2012, 11:21 am
by northstar
all i did (since i dont care for jump) was put into my game cfg...

bind SPACE [gamespeed 300; onrelease [gamespeed 100]]

works like a charm... set the bind key and speeds to whatever you want...

Re: [RPG mode] Modify maxspeed?

Posted: October 26th, 2012, 1:20 am
by Sircameron

Code: Select all

r_select_char actor [
r_char_base_maxspeed (+ (r_char_base_maxspeed_get) 50)
]
use that to add +50 maxspeed. Then just reverse it for regular speed.. -50

Re: [RPG mode] Modify maxspeed?

Posted: October 26th, 2012, 10:26 am
by kddekadenz
Thank you, works fine :D
Does anyone know how to modify the initial maxspeed (47.5)?

EDIT: Ok, forget it. I figured it out myself - via movespeed.