home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Walk speed | gravity var

by Q009 on 06/05/2008 16:59, 31 messages, last message: 06/23/2008 09:19, 8201 views, last view: 05/18/2024 17:27, closed on 06/23/2008 09:48

Hi!
I'm making a mod but i dont known how to make "GRAVITY" and "maxspeed" var.
I have tried: VAR(GRAVITY, 0, 200, 1000);
VAR(maxspeed, 8, 100, 320);

Please for help.

   Board Index    Go to next 20 messagesGo to last 20 messages

#1: ..

by SheeEttin on 06/05/2008 23:45

Did you also comment out any #defines?
Also, you know you have to compile, right?
http://cube.wikispaces.com/Building+and+Compiling

reply to this message

#2: Re: ..

by Q009 on 06/06/2008 14:49, refers to #1

Lol, i known how to compile because i created another c++ mods...
I just dont known how to make

reply to this message

#3: ..

by Q009 on 06/06/2008 14:50

oops... sry i wanted say:
I just dont known how to make var.

reply to this message

#4: ..

by Q009 on 06/06/2008 17:17

pls just tell me how to do it...

reply to this message

#5: Re: ..

by WahnFred on 06/06/2008 17:39, refers to #4

You're not making mod's, you're making cheats. For this reason you got a permanent ban now on the TC-Servers or better to say, you get redirected to the TC-Kindergarten Server.

reply to this message

#6: Re: ..

by Q009 on 06/06/2008 18:48, refers to #5

hmmm.... not in forum! ;P

reply to this message

#7: maps

by mafel on 06/06/2008 20:15

can u make maps on this game

reply to this message

#8: Re: maps

by demosthenes on 06/06/2008 20:18, refers to #7

Did you do anything besides going straight to the forums and asking? Read!

http://cubeengine.com/

reply to this message

#9: ..

by lionsword on 06/06/2008 21:21

Mafel, start the game and press E

reply to this message

#10: Re: ..

by Finale on 06/07/2008 03:57, refers to #5

TC-Kindergarten Server?
sounds like the server for me :P

reply to this message

#11: Jump OK | Walkspeed NOT OK

by Q009 on 06/07/2008 12:10

Lol i meant jump range not gravity! =
I don't known how to use "VAR" function so i have used "COMMAND". For jumps first i have deleted that "const" in "const float JUMPVEL = 125.0f", then i have added these lines:
void jumpboosten()
{
JUMPVEL = 512.0f;
}

void jumpboostdi()
{
JUMPVEL = 125.0f;
}

COMMAND(jumpboosten, "");
COMMAND(jumpboostdi, "");

but that metode don't works in ents.h where im going to change walk speed:

in "struct physent", "physent() : "
i have changed "maxspeed(100)," to "maxspeed(walkboost),"

Then i have added these lines out of "struct physent":
float walkboost;

void walkboosten()
{
walkboost = 320
}

void walkboostdi()
{
walkboost = 100
}

COMMAND(walkboosten, "");
COMMAND(walkboostdi, "");

When i compiled it it says something like redefinition of "int COMMAND" and is not a call to function but a reference... WTF?!?

reply to this message

#12: hmm

by fhjdskconorfhsdjk on 06/08/2008 04:23

I was trying to do this a while ago, I got it to work, but I forgot how to. I had like variables for every to allow easy changes.

reply to this message

#13: Re: ..

by blablablablablablablablabla on 06/09/2008 18:33, refers to #5

Don\'t help him, he is cheating allways around in Sauerbraten, flying, map modifieng, etc. ...

reply to this message

#14: Re: ..

by Q009 on 06/10/2008 15:12, refers to #13

Not flying!

reply to this message

#15: ..

by Hero on 06/10/2008 15:55

just jumping to heaven :)

reply to this message

#16: Re: ..

by hfgconorjhg on 06/10/2008 16:06, refers to #13

Excuse him for being curios...I hate expecting the worst from people right away :(

reply to this message

#17: Re: ..

by Q009 on 06/10/2008 17:12, refers to #15

Not exacly... 10 m higher jumps =P
http://youtube.com/watch?v=U0XR1FN-nys

reply to this message

#18: ..

by {Qs}Homicidal on 06/10/2008 19:25

no he makes hacks let him figure it out him self

reply to this message

#19: ..

by Q009 on 06/10/2008 21:44

9blah-blah-blah.......... =X

reply to this message

#20: Re: ..

by constchar* on 06/15/2008 12:49, refers to #19

I recently did this when I was adding footsteps
and the ability to "walk" instead of running.

The solution is simple really, fpsent
inherits dynent which in turn inherits
fpsent; which has a float variable called
"maxspeed".
So goto "game.h", once there look for "fpsent", around like 334, and in the fpsent::respawn function (Looks like "void respawn" in the code), around line 368,
add "maxspeed = 100f;" (100 is the default) and there you go!

reply to this message

   Board Index    Go to next 20 messagesGo to last 20 messages


Thread closed!

This thread has been closed, which is why you can't post any more messages in it.


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
54039063 visitors requested 71819704 pages
page created in 0.029 seconds using 9 queries
hosted by Boost Digital