Fortress Forever

Go Back   Fortress Forever > Editing > Mapping

Reply
 
Thread Tools Display Modes
Old 10-17-2007, 01:11 PM   #1
sir_frags
 
Join Date: Sep 2007
Posts Rated Helpful 0 Times
LUA stuff

Can any one give me a lua for a hammer teleporter

Last edited by sir_frags; 11-06-2007 at 04:23 PM.
sir_frags is offline   Reply With Quote


Old 10-17-2007, 03:23 PM   #2
Desyphur
OHH! OHHH NOOO!
Wiki Team
Beta Tester
 
Desyphur's Avatar
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
Why would you want this? More info would help, then I could try to find out.
__________________
What was left of my sanity implored me not to enter...but that voice was just a whisper now.
Desyphur is offline   Reply With Quote


Old 10-17-2007, 04:10 PM   #3
A1win
Nutcracker
 
A1win's Avatar
 
Join Date: Sep 2007
Location: Kuopio, Finland
Posts Rated Helpful 0 Times
Send a message via MSN to A1win
Code:
classteleport = trigger_teleport:new({ })
hwguyteleport = classteleport:new({ class = Player.kHwguy }

function classteleport:allowed( allowed_entity )
  if IsPlayer( allowed_entity ) then
    local player = CastToPlayer( allowed_entity )
    if player:GetClass() == self.class then
      return true
    end
    return false
  end
end
A1win is offline   Reply With Quote


Old 10-17-2007, 10:37 PM   #4
A1win
Nutcracker
 
A1win's Avatar
 
Join Date: Sep 2007
Location: Kuopio, Finland
Posts Rated Helpful 0 Times
Send a message via MSN to A1win
Code:
weirdteleport = trigger_teleport:new({ })

function weirdteleport:allowed( allowed_entity )
  if IsPlayer( allowed_entity ) then
    local player = CastToPlayer( allowed_entity )
    if player:GetClass() == Player.kScout or player:GetClass() == Player.kSniper or player:GetClass() == Player.kMedic then
      return false
    end
    return true
  end
end
No more complicated than that...
A1win is offline   Reply With Quote


Old 10-18-2007, 12:23 AM   #5
A1win
Nutcracker
 
A1win's Avatar
 
Join Date: Sep 2007
Location: Kuopio, Finland
Posts Rated Helpful 0 Times
Send a message via MSN to A1win
I've been programming small stuff since I was 12 or something. All I need to do is learn the syntax of the language and I can do the basic stuff with it. I actually know why the code does what you needed, not just what it does
A1win is offline   Reply With Quote


Old 10-19-2007, 10:55 AM   #6
stino
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
a little more then only the syntax
all the custom ff commands and constants are required knowledge if you want to code fast and efficiently, but therefore i like to have a doc page where they explain the parameters for all the functions, becouse the errors you get ingame are quite difficult to understand: for ex: player:GetTeamId() will cast an error that the parameter required is nil, why becouse i didn't declarate the "player" var, while other languages just say that player is unknown to the interpreter.
stino is offline   Reply With Quote


Old 10-19-2007, 03:00 PM   #7
McManCSU
 
Join Date: Oct 2007
Posts Rated Helpful 0 Times
Is there some API for the game that you can use? You mentioned something about some documentation, do you have a link?
McManCSU is offline   Reply With Quote


Old 10-19-2007, 03:05 PM   #8
public_slots_free
 
Join Date: Sep 2007
Posts Rated Helpful 0 Times
I would guess, that could only come from the FF team
public_slots_free is offline   Reply With Quote


Old 10-19-2007, 03:42 PM   #9
stino
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
Quote:
Originally Posted by McManCSU
Is there some API for the game that you can use? You mentioned something about some documentation, do you have a link?
i mentioned something about some documentation ... yeah, i said documentation could be a lot more helpfull than just a plain list of functions.
stino is offline   Reply With Quote


Old 10-20-2007, 10:06 AM   #10
A1win
Nutcracker
 
A1win's Avatar
 
Join Date: Sep 2007
Location: Kuopio, Finland
Posts Rated Helpful 0 Times
Send a message via MSN to A1win
I'm sure they're working on it... be patient
A1win 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:02 PM.


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