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, 8210 views, last view: 05/23/2024 07:06, 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.

Go to first 20 messagesGo to previous 20 messages    Board Index    Go to next 20 messagesGo to last 20 messages

#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

#21: Re: ..

by constchar* on 06/15/2008 12:51, refers to #20

Sorry, I forgot to mention that you should add that after:

dynent::reset();
fpsstate::respawn();

So your resulting code should look like:

void respawn()
{
dynent::reset();
fpsstate::respawn();
lastaction = 0;
lastattackgun = gunselect;
attacking = false;
lasttaunt = 0;
lastpickup = -1;
lastpickupmillis = 0;
superdamage = 0;
maxspeed = 100f; // < This is the newly added line
}

reply to this message

#22: Re: ..

by MovingTarget on 06/15/2008 14:07, refers to #20

lol I did the exact same things a while ago! I also added stamina (the more you jump, the lower you jump, and it slowly recharges).

reply to this message

#23: Re: ..

by Q009 on 06/15/2008 15:49, refers to #21

Don't work

reply to this message

#24: Re: ..

by constchar* on 06/15/2008 21:58, refers to #23

Do you know anything about programming?
You might be running the release build but
compiling a debug build, the default configuration, because this code works for sure since I did exactly that two days ago.

reply to this message

Go to first 20 messagesGo to previous 20 messages    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
54106617 visitors requested 71891156 pages
page created in 0.025 seconds using 9 queries
hosted by Boost Digital