Seriously!

Go Back   Seriously! Forums > Serious Sam Series > Serious Sam Classic > Serious Sam Classic Workshop > Serious Sam Classic SDK

Serious Sam Classic SDK Discuss coding ideas & problems or show tutorials and code snippets.

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 04-10-2002, 10:26 AM   #1   Add To Ignore List  
Fluffy Teletubby
 
Iirion Claus's Avatar
 
Joined: Apr 2001
Location: Israel
 
Iirion Claus is offline
Default Preventing the player from moving backward

How can I prevent the player from ever moving backward?

I want him to be able to SLOW DOWN by pressing backward (since I set Deacceleration to 0); but I don't want him to ever MOVE backward. Therefore, preventing vTranslation(3) on ActiveActions from going below 0 won't solve my problem, since the player won't be able to slow down.

I tried fooling around with en_vCurrentTranslationAbsolute, but even if I set it to 0 whenever it goes negative, the player still has a tick to move a bit backward.

Any ideas?
  Reply With Quote
Old 04-10-2002, 11:27 AM   #2   Add To Ignore List  
Werebull
 
Ashthos's Avatar
 
Joined: Apr 2001
 
Ashthos is offline Send a message via ICQ to Ashthos
Default

I don't have the sam code with me right now, but you can work out the current speed of the player and only set the translation to be -ve when the player has positive speed..

HTHS

Ash
__________________
Ash Beeson
Coder for the secret mod
  Reply With Quote
Old 04-10-2002, 01:58 PM   #3   Add To Ignore List  
Fluffy Teletubby
 
Iirion Claus's Avatar
 
Joined: Apr 2001
Location: Israel
 
Iirion Claus is offline
Default

Problem solved; in a very sucky way, though. Since the player can't turn around in my mod, I'm looking at his absolute speed and make sure it never becomes positive. Thanks Ashthos
  Reply With Quote
Old 04-10-2002, 02:14 PM   #4   Add To Ignore List  
Special Delivery
 
Mailman's Avatar
 
Joined: Mar 2001
Location: Ft. Benning, GA
 
Mailman is offline Send a message via ICQ to Mailman
Default

you could look at ctl_composeActionPacket() In there, you can prevent the backward movement from being added into the translation variable.
__________________
Mailman
[ Instagib: SE ]
  Reply With Quote
Old 04-10-2002, 11:06 PM   #5   Add To Ignore List  
T-Mech
 
AA - 47's Avatar
 
Joined: Mar 2002
Location: Auckland, New Zealand Posts: A Serious amount
 
AA - 47 is offline Send a message via ICQ to AA - 47 Send a message via AIM to AA - 47
Default

making a racing mod are we?
nice
  Reply With Quote
Old 04-11-2002, 07:16 AM   #6   Add To Ignore List  
Fluffy Teletubby
 
Iirion Claus's Avatar
 
Joined: Apr 2001
Location: Israel
 
Iirion Claus is offline
Default

Quote:
Originally posted by Mailman
you could look at ctl_composeActionPacket() In there, you can prevent the backward movement from being added into the translation variable.
Problem is I want the player to be able to add backward to the translation in order to slow down, but I don't want him to be able to MOVE backward.

AA-47: see thread regarding mod here:
http://forums.seriouszone.com/s...threadid=12922
  Reply With Quote
Old 04-11-2002, 08:07 AM   #7   Add To Ignore List  
Kleer
 
Joined: Feb 2002
Location: Buenos Aires, Argentina
 
Turbo is offline
Default

You could clamp vDirection(3) inversely proportional to your actual speed...

vDirection(3) = ClampDn(vDirection(3), -SpeedNow*BreakFactor);

That way, the faster you're going, the faster you can break (you may clamp up that too).

You'd need to add some threshold, so you actually break. Otherwise, you'd never actually stop. Perhaps just a little en_fDeceleration would do it.
__________________
Do you think my being faster, or stronger, has anything to do with my muscles, in this place?
  Reply With Quote
Old 04-11-2002, 08:35 AM   #8   Add To Ignore List  
Fluffy Teletubby
 
Iirion Claus's Avatar
 
Joined: Apr 2001
Location: Israel
 
Iirion Claus is offline
Default

That's what I did; but I'm using the player's absolute translation (speed), so it wouldn't have worked if the player could turn.

Luckily, he can't
  Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Finzy's Frozen Asylum Finzy Showcases & Portfolios 2979 08-04-2017 03:38 PM
Mapping: Random Selection hot_sleeper Serious Sam Classic Mods 2 01-03-2003 07:12 AM
How do I keep a player from being launched off of a moving brush? GaidinTS Serious Editor 15 11-24-2002 11:32 AM
Serious Reference Redshirt Serious Editor 14 11-16-2001 06:18 PM


All times are GMT -4. The time now is 03:08 PM.