|
|
#1 |
|
Guest
Posts: n/a
|
a bit help (jumping and running)
[im not english, so please be nice with my texts ^^]
{HL2DM Mod} Hi, i am very new at c++, i follow a tutorial and do the wall jumping, works great: http://www.youtube.com/watch?v=-wgZ7wei6tY so i only need 3 more things but i have no clue how. 1. have anyone a idea where i add a "after 5 seconds do"? i want if you walk 5 seconds you are put into sprint mode else if you stop if (mv->m_nButtons & IN_FORWARD & "HERE") StartSprinting(); else StopSprinting(); What can i add for "here" to check how long IN_Forward is pressed? 2. any ideas how i do this? I want create a new trigger for edges. If you are in this trigger and press IN_USE you climb um the edge like ladder. Or can you tell me, how to use the css ladder? i hate the hl2dm ladder. 3. if you fall and press duck, you take no damage on falling |
|
|
|
#2 |
![]() Join Date: May 2008
Reputation: 169
Posts: 5,362
|
IMO you shouldn't attempt to make a mod with only basic C++ knowledge and close to no experience.
But to your problems: 1. Add a float-member, set it to gpGlobals->curtime + 5. gpGlobals->curtime is incremeted each frame so that the outcome is about +1 each second. You can then check if the float is egual to or smaller than gpGlobals->curtime. 2. func_ladder 3. Check out CGameMovement::CheckFalling in gamemeovement.cpp. |
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
Ya i know, but i have no money to buy a good c++ book-
thanks, i will take a look. |
|
|
|
#4 |
![]() Join Date: May 2008
Reputation: 169
Posts: 5,362
|
You can find tutorials teaching you at least the basics on the internet.
www.learncpp.com seemed like a good site to me so far. |
|
|
|
|
|
#5 |
![]() Join Date: Apr 2008
Reputation: 35
Posts: 923
|
There's also a free "book" that you can read online, using XPS viewer or a PDF reader:
http://msdn.microsoft.com/en-us/beginner/cc305129.aspx Btw I replied in your other thread ... |
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|