Go Back   Steam Users' Forums > Steam Tool Discussions > Source Coding

Reply
 
Thread Tools Display Modes
Old 05-09-2009, 03:19 AM   #1
Pricce
 
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
 
Reply With Quote
Old 05-09-2009, 04:57 AM   #2
z33ky
 
Join Date: May 2008
Reputation: 169
Posts: 5,361
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.
z33ky is offline   Reply With Quote
Old 05-09-2009, 05:30 AM   #3
Pricce
 
Guest
Posts: n/a
Ya i know, but i have no money to buy a good c++ book-
thanks, i will take a look.
  Reply With Quote
Old 05-09-2009, 05:58 AM   #4
z33ky
 
Join Date: May 2008
Reputation: 169
Posts: 5,361
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.
z33ky is offline   Reply With Quote
Old 05-09-2009, 08:01 AM   #5
DuckSauce01
 
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 ...
DuckSauce01 is offline   Reply With Quote
Reply

Go Back   Steam Users' Forums > Steam Tool Discussions > Source Coding


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -7. The time now is 12:33 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site Content Copyright Valve Corporation 1998-2012, All Rights Reserved.