![]() |
|
|
#1 |
|
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?
__________________
|
|
|
|
|
|
|
#2 |
|
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 | PlanetJailbreak | Unreal Wiki | Liandri Archives Everything you ever wanted to know about replication (but were afraid to ask) [in German] | 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!" |
|
|
|
|
|
|
#3 |
|
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?
__________________
|
|
|
|
|
|
|
#4 |
|
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 | PlanetJailbreak | Unreal Wiki | Liandri Archives Everything you ever wanted to know about replication (but were afraid to ask) [in German] | 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!" |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|