Fortress Forever

Go Back   Fortress Forever > Editing > Mapping > Lua

Reply
 
Thread Tools Display Modes
Old 02-02-2009, 05:14 PM   #1
Entigren
 
Join Date: Feb 2009
Gametype: Capture the Flag
Posts Rated Helpful 0 Times
Flag Specific Trigger

Hi, I've been helping a friend with a map for a couple of days now. We are trying to go about the flag security in a new and somewhat unique way. However I need certain outputs to take place on whether the flag is in its respawn position or not. So I was thinking making a trigger that is activated by the set team flag. I have messed with the lua a bit but dont have much knowledge on it. I got it to a point where the flag can trigger it however a player had to be present in the trigger also. I would like it to be able to trigger with just the flag in it. If anyone could help me figure this out I would appreciate it. Thanks.
Entigren is offline   Reply With Quote


Old 02-02-2009, 05:22 PM   #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.
Not possible at the moment, but it is high on the lua-priority list.
__________________
#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 02-02-2009, 06:02 PM   #3
Entigren
 
Join Date: Feb 2009
Gametype: Capture the Flag
Posts Rated Helpful 0 Times
Thanks, how about a script that would constantly check the flag origin and compare it to the location where its suppose to respawn.
Entigren is offline   Reply With Quote


Old 02-02-2009, 09:54 PM   #4
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.
Well, you can definitely check to see if it's off its origin. In base_ctf, the flag info_ff_script definitions have a status property that starts at 0 and changes to 1/2 after it gets touched initially. Detecting if it's within a certain trigger, though, is impossible.

You may be able to hack a crazy workaround using GetOrigin(), but I'd just wait until we get a real implementation of this.
__________________
#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 02-03-2009, 02:05 AM   #5
Entigren
 
Join Date: Feb 2009
Gametype: Capture the Flag
Posts Rated Helpful 0 Times
Would you have any kind of time frame for this feature. Also could you explain to me how the GetOrigin() works just in case I choose to be crazy as you put it.

Last edited by Entigren; 02-03-2009 at 02:23 AM.
Entigren is offline   Reply With Quote


Old 02-03-2009, 04:09 AM   #6
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.
Quote:
Originally Posted by Entigren View Post
Would you have any kind of time frame for this feature.
Hopefully soon, though nothing definite. It's been on our to-do list forever.

Quote:
Originally Posted by Entigren View Post
Also could you explain to me how the GetOrigin() works just in case I choose to be crazy as you put it.
I believe you can do:

Code:
local flag = GetInfoScriptByName( "flag_name" )
local pos = flag:GetOrigin()
pos will then be a vector with properties x, y, and z that you can access using:

Code:
pos.x
pos.y
pos.z
__________________
#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


Reply

Tags
flag, lua, trigger


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

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 03:58 AM.


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