Fortress Forever

Go Back   Fortress Forever > Editing > Mapping > Lua

Reply
 
Thread Tools Display Modes
Old 09-17-2010, 09:16 AM   #1
zE
Pew pew ze beams
 
zE's Avatar
 
Join Date: Jan 2008
Gametype: Gathers
Affiliations: pew pew
Posts Rated Helpful 11 Times
Display messages

So basicly I want to put 3 diferent trigers in my map, that when you pass trought displays specific messages in the center of the screen only to the player that pass trought that trigger. If anyone can help i apreciate D :
zE is offline   Reply With Quote


Old 09-17-2010, 09:20 AM   #2
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.
Code:
trigger_message_base = trigger_ff_script:new({ message="Default" })

function trigger_message_base:ontouch( touch_entity )
  if IsPlayer( touch_entity ) then
    local player = CastToPlayer( touch_entity )
    BroadCastMessageToPlayer( player, self.message )
  end
end

trigger_message1 = trigger_message_base:new({ message="Message 1" })
trigger_message2 = trigger_message_base:new({ message="Message 2" })
trigger_message3 = trigger_message_base:new({ message="Message 3" })
Alter the trigger_message1, trigger_message2, trigger_message3 names to fit your triggers' names and their messages to whatever you want. I put the things you should change in bold. Hopefully I didn't make any errors.
__________________
#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
squeek. is offline   Reply With Quote


Old 09-20-2010, 10:22 AM   #3
zE
Pew pew ze beams
 
zE's Avatar
 
Join Date: Jan 2008
Gametype: Gathers
Affiliations: pew pew
Posts Rated Helpful 11 Times
Thks skeeq, it kinda workds, but its strange sometmies messages doesnt show other times they do show lol D :
zE 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 08:19 PM.


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