10-27-2013, 05:10 AM | #101 |
internet user
Fortress Forever Staff
Join Date: Jun 2007
Posts Rated Helpful 42 Times
|
The code is right but it didnt fore until I set flags to "Everything" in hammer on the detpack_trigger, try that. it defaults to clients and a detpack isnt a client
__________________
9:17 PM - DEXTER: can you teach me how to play o 9:17 PM - squeek.: you jump a lot 9:18 PM - squeek.: and do sweet moves 8:55 PM - FDA: fart in you fridge and blame it on wild animals |
1 members found this post helpful. |
10-28-2013, 03:03 AM | #102 |
Jay|mOfO|Mills
Beta Tester
Join Date: Feb 2009
Location: Santa Fe, NM
Gametype: Snag the flag beotches Posts Rated Helpful 8 Times
|
That did not fix my problem however this one little line did, not sure why....
renaming the function to something else and voila.... doesnt make sense to me but I dont know wtf I'm doing anyway. Thanks for the help dex detpack_easter_egg = detpack_trigger:new({}) |
|
11-01-2013, 12:54 AM | #103 |
internet user
Fortress Forever Staff
Join Date: Jun 2007
Posts Rated Helpful 42 Times
|
weird, i have no idea then, i have never had to set flags before either .. so maybe a conflict or halloween spoooky ghosts spooky
__________________
9:17 PM - DEXTER: can you teach me how to play o 9:17 PM - squeek.: you jump a lot 9:18 PM - squeek.: and do sweet moves 8:55 PM - FDA: fart in you fridge and blame it on wild animals |
|
11-06-2013, 07:08 PM | #104 |
Jay|mOfO|Mills
Beta Tester
Join Date: Feb 2009
Location: Santa Fe, NM
Gametype: Snag the flag beotches Posts Rated Helpful 8 Times
|
Gravity?
Hey peeps, Is there a way I can reset the gravity to normal on spawn? I have a special place in the map that triggers a low gravity change but if you die and respawn you keep the low gravity..... Can I put it in my player_spawn function? It will be easier than setting a trigger_gravity brush on every spawn in the map.
|
|
11-06-2013, 11:05 PM | #105 |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Can do it all through Lua:
Code:
trigger_name = trigger_ff_script:new({}) function trigger_name:ontouch( touch_entity ) if IsPlayer( touch_entity ) then local player = CastToPlayer( touch_entity ) player:SetGravity( 0.5 ) -- number > 0 and <= 1 end end function trigger_name:onendtouch( touch_entity ) if IsPlayer( touch_entity ) then local player = CastToPlayer( touch_entity ) player:SetGravity( 1 ) -- back to normal end end function player_spawn( player ) player:SetGravity( 1 ) end
__________________
#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 |
|
05-09-2014, 08:06 PM | #106 | |
worst ff player eu
Join Date: Jun 2012
Location: South Yorks., England
Class/Position: o - no, d - scout Gametype: IvDZ Posts Rated Helpful 18 Times
|
Quote:
EDIT 2: NOPE. host_map is a client variable, that is set to 0 on the server. Therefore, Lua can't actually use it. Brilliant.
__________________
gg ff not ded ff very much alive Last edited by ddm999; 05-10-2014 at 06:09 PM. Reason: god damn it |
|
|
05-09-2014, 08:28 PM | #107 |
Nade Whore
Server Owner
Beta Tester Join Date: Sep 2007
Location: Oklahoma
Class/Position: Scout/Soldier Gametype: CTF/TDM Affiliations: blunt. Moto Posts Rated Helpful 128 Times
|
Please just make it where it won't stop you from switching weapons when you vote, but not make it like the current alternative where you must hit Escape to even see the vote.
|
|
05-10-2014, 03:38 PM | #108 |
worst ff player eu
Join Date: Jun 2012
Location: South Yorks., England
Class/Position: o - no, d - scout Gametype: IvDZ Posts Rated Helpful 18 Times
|
Unfortunately Lua in FF has no access to actual keypresses, so the only real system I can use is the menu system in game.
( Which is the same as the one that mods use - the one that blocks weapon switching - if I remember correctly. :P ) I'll look into an alternative system where rather than using the menu system it uses chat messages. ( I'll probably introduce it with a custom HUD display, say, think of the voting system in Garry's Mod. - Except you can't click the buttons. D: ) Say for instance, you write: !vote1 !vote2 !vote3 Potentially, the messages can be bound to keys ( say, numpad ) so that you can vote with a single keypress and it doesn't interrupt weapon switching. I'll look into it further, but the current focus of my system is rating maps more than voting for the next map.
__________________
gg ff not ded ff very much alive Last edited by ddm999; 05-10-2014 at 06:08 PM. |
|
05-10-2014, 05:34 PM | #109 |
Nade Whore
Server Owner
Beta Tester Join Date: Sep 2007
Location: Oklahoma
Class/Position: Scout/Soldier Gametype: CTF/TDM Affiliations: blunt. Moto Posts Rated Helpful 128 Times
|
Look at CS:GO's vote system. I believe they have found a way to get around that whole mess.
|
|
05-10-2014, 06:06 PM | #110 |
worst ff player eu
Join Date: Jun 2012
Location: South Yorks., England
Class/Position: o - no, d - scout Gametype: IvDZ Posts Rated Helpful 18 Times
|
The majority of Dota 2 and CS:GO uses Flash for HUD and menu elements.
If you dig around in the files, you'll notice that map overlays use Flash, the main menu is purely written in Flash, etc. FF doesn't have this support. Plus, that's Valve. Not like they completely wrote it from scratch in C++ or anything.
__________________
gg ff not ded ff very much alive Last edited by ddm999; 05-10-2014 at 06:07 PM. |
|
09-29-2015, 05:10 AM | #111 |
Join Date: Jul 2012
Location: Killeen, Tx, USA
Class/Position: Demo Defense Gametype: Capture the Flag Affiliations: [TALOS] Posts Rated Helpful 3 Times
|
I have a trigger_ff_script that I need to only be *ahem* triggered by an emp. Here is what I have so far, not 100% sure it's correct
<quote>highvolt_trigger = trigger_ff_script:new({ team = Team.kUnassigned, team_name = "neutral" }) function highvolt_triggernexplode( explode_entity ) if grenade:Type() == Grenade.kEmp then local grenade = CastToGrenade( explode_entity ) OpenDoor( self.team_name .. "_light_doorhack" ) end return EVENT_ALLOWED end red_highvolt_trigger = highvolt_trigger:new({ team = Team.kBlue }) blue_highvolt_trigger = highvolt_trigger:new({ team = Team.kRed })</quote> Last edited by [TALOS]Smoke; 09-29-2015 at 05:11 AM. |
|
09-29-2015, 08:29 AM | #112 |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
You mixed up the order of the if and the variable definition, and you might want to check that the cast succeeded. Those lines should be:
Code:
local grenade = CastToGrenade( explode_entity ) if grenade ~= nil and grenade:Type() == Grenade.kEmp then
__________________
#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 |
|
10-03-2015, 05:01 PM | #113 |
Join Date: Jul 2012
Location: Killeen, Tx, USA
Class/Position: Demo Defense Gametype: Capture the Flag Affiliations: [TALOS] Posts Rated Helpful 3 Times
|
It's probably best for me to just explain what I have in mind and maybe one of ya'll nice people can write me a function for it?
Here is what I need: A trigger_ff_script, that is only triggered by an enemy emp, after being triggered it will open a doorhack which will disable some lights. To close out the function I also need it to have another trigger_ff_script that is very similar to dropdown in that it takes a few hits from the teams engineer with the spanner to restore. I reworked the code from my previous post and I cannot seem to get it to work at all, so I'm giving up on it and asking for help. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|