News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Mapping

Reply
 
Thread Tools Display Modes
Old 15th Feb 2010, 06:41 AM   #1
xMurphyx
Registered User
 
xMurphyx's Avatar
 
Join Date: Jun. 2nd, 2008
Posts: 1,503
Jumppads that require the player to jump

Hi,
how can I make UC2 style jumppads that require the player to press jump before they throw him?
__________________
xMurphyx is offline   Reply With Quote
Old 15th Feb 2010, 04:37 PM   #2
Wormbo
 
Wormbo's Avatar
 
Join Date: Jun. 4th, 2001
Location: Germany
Posts: 5,752
You could make a special inventory item that monitors the owner event for jumping, like jump boots do. But instead of playing the jump boots sound, you check for whether the player touches your special jump pad and let it toss the player in the direction you want.
__________________
Wormbo's UT/UT2004/UT3 mods | YouTube channel | PlanetJailbreak/JDN | Unreal Wiki | Liandri Archives
Everything you ever wanted to know about replication| UnrealScript security considerations
<elmuerte> you shouldn't do all-nighters, it's a waste of time and effort
<TNSe> nono
<TNSe> its always funny to find code a week later you dont even remember writing
<Pfhoenix> what's worse is when you have a Star Wars moment
<Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!"
Wormbo is offline   Reply With Quote
Old 16th Feb 2010, 01:41 AM   #3
xMurphyx
Registered User
 
xMurphyx's Avatar
 
Join Date: Jun. 2nd, 2008
Posts: 1,503
I need it to work with a few different directions. Do I need an inventory item for all of them?
I can make triggered Jumppads instead (unreal wiki has a page about it), which would be much more convenient. It just would be a lot more intuitive for players if they responded to the Jump button rather than the Use button.

Can a trigger be altered to react to the Jump button instead of the Use button?
__________________
xMurphyx is offline   Reply With Quote
Old 16th Feb 2010, 03:00 AM   #4
Wormbo
 
Wormbo's Avatar
 
Join Date: Jun. 4th, 2001
Location: Germany
Posts: 5,752
No, unlike the Use feature, jumping does not notify any touching actors.

My idea would consist of a custom jumppad and a special inventory like this:
Code:
class JumpPadNotifier extends Inventory;

function OwnerEvent(name EventName)
{
  local TouchJumpPad Other;

  foreach Owner.TouchingActors(class'TouchJumpPad', Other)
    Other.PlayerJumped(Pawn(Owner));
}
Code:
class TouchJumpPad extends UTJumpPad;

function PlayerJumped(Pawn Other)
{
  PostTouch(Other); // or something like that
}

function Touch(Actor Other)
{
  local JumpPadNotifier Notifier;

  if (UnrealPawn(Other) != None && UnrealPawn(Other).IsHumanControlled()) {
    // ensure player has the inventory
    Notifier = JumpPadNotifier(UnrealPawn(Other).FindInventoryType(class'JumpPadNotifier');
    if (Notifier == None) {
      UnrealPawn(Other).CreateInventory(string(class'JumpPadNotifier'));
    }
  }
  else {
    // for bots, fall back to default logic
    Super.Touch(Other);
  }
}
__________________
Wormbo's UT/UT2004/UT3 mods | YouTube channel | PlanetJailbreak/JDN | Unreal Wiki | Liandri Archives
Everything you ever wanted to know about replication| UnrealScript security considerations
<elmuerte> you shouldn't do all-nighters, it's a waste of time and effort
<TNSe> nono
<TNSe> its always funny to find code a week later you dont even remember writing
<Pfhoenix> what's worse is when you have a Star Wars moment
<Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!"
Wormbo is offline   Reply With Quote
Reply

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

Forum Jump


All times are GMT -5. The time now is 06:05 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer