Fortress Forever

Go Back   Fortress Forever > Editing > Mapping > Lua

Reply
 
Thread Tools Display Modes
Old 03-22-2008, 08:35 PM   #1
Credge
FF Loremaster
Beta Tester
 
Join Date: Sep 2007
Posts Rated Helpful 4 Times
Doors.

This is absolutely annoying me and I'm just about ready to quit.

I can create a door just fine. I can get it to "budge" in the right direction I want to move, but it won't move more than a few inches. Even further, I can't make it so only my team can use the door.

So, really, I can't create a door just fine. Something as simple, and as required, as a door should require code that looks like this:

Quote:
blue_tri_door2 = trigger_ff_script:new({ team = Team.kBlue })

function blue_tri_door2:allowed( touch_entity )
if IsPlayer( touch_entity ) then
local player = CastToPlayer( touch_entity )
return player:GetTeamId() == self.team
end

return EVENT_DISALLOWED
end

function blue_tri_door2ntrigger( touch_entity )
if IsPlayer( touch_entity ) then
OutputEvent("blue_door_2", "Open")
end
end
Taken from blis_2fort. I mean, I can't even begin to dissect what I'm supposed to do here in order to make a similar door.

Is that even needed? I've seen that monkey doesn't even have stuff in its lua for doors.

__________________
"The nine most terrifying words in the English language are: 'I'm from the government and I'm here to help.'"

Ronald Reagan
Credge is offline   Reply With Quote


Old 03-22-2008, 09:04 PM   #2
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
are you using a trigger with your door to get it to activate? You need to make the trigger and then in the lua have it only activate when a certain team touches it.

I'll dig up a tut on door when i have a min to.
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan is offline   Reply With Quote


Old 03-22-2008, 09:15 PM   #3
Credge
FF Loremaster
Beta Tester
 
Join Date: Sep 2007
Posts Rated Helpful 4 Times
Quote:
Originally Posted by Dr.Satan
are you using a trigger with your door to get it to activate? You need to make the trigger and then in the lua have it only activate when a certain team touches it.

I'll dig up a tut on door when i have a min to.
I got it to work thanks to apone and his infinite patience and awesomeness. Still dig up that tut for me though please, I'm sure I'll need it again =P.
__________________
"The nine most terrifying words in the English language are: 'I'm from the government and I'm here to help.'"

Ronald Reagan
Credge is offline   Reply With Quote


Old 03-24-2008, 05:25 AM   #4
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
yeah I'll look for it when I'm at work tomorrow.
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan is offline   Reply With Quote


Old 03-24-2008, 08:23 AM   #5
Jester
Fortress Forever Staff
 
Jester's Avatar
 
Join Date: Sep 2007
Class/Position: O: Scout
Affiliations: {NFO} - New Family Order
Posts Rated Helpful 0 Times
http://www.sgware.be/?p=tutorials&f=view&id=17
This one? You'll have to replace the class code with team.
Jester is offline   Reply With Quote


Old 03-24-2008, 03:23 PM   #6
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
Nice jester...also a few more, don't take everything from them cause they may not apply to what your doing, but there is some helpful stuff:

http://www.snarkpit.net/editing.php?...torials&id=133
http://www.snarkpit.net/editing.php?...torials&id=154

also check Editlife for anything helpful.
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan 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 01:08 AM.


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