06-17-2009, 09:52 PM | #1 |
Pub Allstar!
Beta Tester
Join Date: Aug 2008
Class/Position: under en kvinna Gametype: Capture the Flag Affiliations: Eternal Order, Must be h4x, Mono's happy funtime. Posts Rated Helpful 0 Times
|
bounce/jump pad question
I'm trying to create a jump pad for my latest map, and I can't seem to get it to function how I like.
I have a cylindrical brush textured with tools/trigger, and tied to a trigger_push. The brush is the full height of the jump I'd like the player to make. push direction is "up" and push force is 1000u/s Technically, it works, but not how I expect it to. I would like it to function like the pads at the entrances to the bases in ff_aardvark, where you touch it and you're off. At the moment, it requires a jump to get going, like the fan shaft in ff_bases. Can anyone point me in the right direction? Thanks. |
|
06-17-2009, 10:28 PM | #2 |
[DGAF]
Join Date: Apr 2009
Posts Rated Helpful 1 Times
|
heh, put a sign that says JUMP!!
|
|
06-17-2009, 10:43 PM | #3 |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
You could use SetVelocity rather than a trigger_push for precision pushing.
Code:
------------------------------------------ -- jump triggers ------------------------------------------ base_jump = trigger_ff_script:new({ pushx = 0, pushy = 0, pushz = 0 }) -- push people when they touch the trigger function base_jump:ontouch( trigger_entity ) if IsPlayer( trigger_entity ) then local player = CastToPlayer( trigger_entity ) player:SetVelocity( Vector( self.pushx, self.pushy, self.pushz ) ) end end -- up push jump_up = base_jump:new({ pushx = 0, pushy = 0, pushz = 1000 })
__________________
#FF.Pickup ¤ Fortress-Forever pickups My Non-official Maps Released FF_DM_Squeek - FF_2Mesa3_Classic - FF_Siege_Classic Beta FF_Myth - FF_Redlight_Greenlight Sick of the people on the internet, always moanin'. They just moan. - Karl Pilkington Last edited by squeek.; 06-17-2009 at 10:43 PM. |
|
06-18-2009, 02:07 AM | #4 |
Community Member
Server Owner
Beta Tester Forum Moderator Join Date: Mar 2007
Location: Hawthorne, California
Class/Position: Soldier/Spy/Scout Gametype: AvD Affiliations: :e0:Eternal Order Leader Posts Rated Helpful 12 Times
|
SetVelocity ftw...
__________________
|
|
06-19-2009, 02:27 PM | #5 |
Pub Allstar!
Beta Tester
Join Date: Aug 2008
Class/Position: under en kvinna Gametype: Capture the Flag Affiliations: Eternal Order, Must be h4x, Mono's happy funtime. Posts Rated Helpful 0 Times
|
Used a func_door to raise my person off the ground, at which point the push takes over!
|
|
06-20-2009, 03:58 PM | #6 |
Sniper Fodder
Join Date: May 2009
Location: Canada
Class/Position: Engineer - Defense/Medic - Offense Gametype: Capture the Flag Posts Rated Helpful 0 Times
|
Put it slightly below ground.
The player will drop onto it at which point they will get "pushed" in the direction you want. |
|
06-21-2009, 01:14 AM | #7 |
Pub Allstar!
Beta Tester
Join Date: Aug 2008
Class/Position: under en kvinna Gametype: Capture the Flag Affiliations: Eternal Order, Must be h4x, Mono's happy funtime. Posts Rated Helpful 0 Times
|
That's an interesting idea... I may have to try that!
|
|
03-06-2012, 05:48 PM | #8 |
Jay|mOfO|Mills
Beta Tester
Join Date: Feb 2009
Location: Santa Fe, NM
Gametype: Snag the flag beotches Posts Rated Helpful 8 Times
|
What if.....
What if I wanted to add a sound to this so everytime I hit the jumppad it creates the sound?
I would like to use the sound Doors.Move14 which I think comes from hl-2. Would it work if In the trigger I just put this: or does it need precached? base_jump = trigger_ff_script:new({ pushx = 0, pushy = 0, pushz = 0, touchsound = "Doors.Move14", }) |
|
03-06-2012, 06:38 PM | #9 |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
It'd probably need to be precached and it'd need a line in base_jump:ontouch to actually play the sound. But, you're most likely better off using an ambient_generic entity in the map and then making it play the sound with Lua using OutputEvent, though, as BroadCastSound plays the sound universally and doesn't factor in a player's distance from the event itself.
To play an ambient generic from Lua, use: Code:
OutputEvent( "entity_name", "PlaySound" ) Code:
------------------------------------------ -- jump triggers ------------------------------------------ base_jump = trigger_ff_script:new({ pushx = 0, pushy = 0, pushz = 0, sound_entname="base_jump_sound" }) -- push people when they touch the trigger function base_jump:ontouch( trigger_entity ) if IsPlayer( trigger_entity ) then local player = CastToPlayer( trigger_entity ) player:SetVelocity( Vector( self.pushx, self.pushy, self.pushz ) ) OutputEvent( self.sound_entname, "PlaySound" ) end end -- up push jump_up = base_jump:new({ pushx = 0, pushy = 0, pushz = 1000, sound_entname="jump_up_sound" }) jump_up_alt = base_jump:new({ pushx = 0, pushy = 0, pushz = 1000, sound_entname="jump_up_sound2"})
__________________
#FF.Pickup ¤ Fortress-Forever pickups My Non-official Maps Released FF_DM_Squeek - FF_2Mesa3_Classic - FF_Siege_Classic Beta FF_Myth - FF_Redlight_Greenlight Sick of the people on the internet, always moanin'. They just moan. - Karl Pilkington Last edited by squeek.; 03-06-2012 at 06:43 PM. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|