Fortress Forever

Go Back   Fortress Forever > Editing > Mapping

Reply
 
Thread Tools Display Modes
Old 06-17-2009, 09:52 PM   #1
MonoXideAtWork
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.
MonoXideAtWork is offline   Reply With Quote


Old 06-17-2009, 10:28 PM   #2
mentalERROR
[DGAF]
 
mentalERROR's Avatar
 
Join Date: Apr 2009
Posts Rated Helpful 1 Times
heh, put a sign that says JUMP!!
mentalERROR is offline   Reply With Quote


Old 06-17-2009, 10:43 PM   #3
squeek.
Stuff Do-er
Lua Team
Wiki Team
Fortress Forever Staff
 
squeek.'s Avatar
 
Join Date: Mar 2007
Location: Northern California
Class/Position: Rallygun Shooter
Gametype: Conc tag (you just wait)
Affiliations: Mustache Brigade
Posts Rated Helpful 352 Times
Send a message via AIM to squeek.
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 })
You could alter it to make it work similarily to a trigger_push as well, or just put one of these at the very bottom and lower the push so that it just gets you off the ground and then the trigger_push takes over.
__________________
#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.
squeek. is offline   Reply With Quote


Old 06-18-2009, 02:07 AM   #4
GeoKill----->
Community Member
Server Owner
Beta Tester
Forum Moderator
 
GeoKill----->'s Avatar
 
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...
__________________

:e0: Will live on Forever
Support FF:
GeoKill-----> is offline   Reply With Quote


Old 06-19-2009, 02:27 PM   #5
MonoXideAtWork
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!
MonoXideAtWork is offline   Reply With Quote


Old 06-20-2009, 03:58 PM   #6
Cyanyde
Sniper Fodder
 
Cyanyde's Avatar
 
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.
Cyanyde is offline   Reply With Quote


Old 06-21-2009, 01:14 AM   #7
MonoXideAtWork
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!
MonoXideAtWork is offline   Reply With Quote


Old 03-06-2012, 05:48 PM   #8
Jay Mofo Mills
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", })
Jay Mofo Mills is offline   Reply With Quote


Old 03-06-2012, 06:38 PM   #9
squeek.
Stuff Do-er
Lua Team
Wiki Team
Fortress Forever Staff
 
squeek.'s Avatar
 
Join Date: Mar 2007
Location: Northern California
Class/Position: Rallygun Shooter
Gametype: Conc tag (you just wait)
Affiliations: Mustache Brigade
Posts Rated Helpful 352 Times
Send a message via AIM to squeek.
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" )
To add this to the trigger code while making it easy to have jump triggers with different sounds, you would do this:
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.
squeek. is offline   Reply With Quote


Reply


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

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. The time now is 11:45 PM.


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