Fortress Forever

Go Back   Fortress Forever > Search Forums

Showing results 1 to 25 of 32
Search took 0.00 seconds.
Search: Posts Made By: squeek.
Forum: Lua 09-29-2015, 07:29 AM
Replies: 112
Views: 42,278
Posted By squeek.
You mixed up the order of the if and the variable...

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:


local grenade = CastToGrenade( explode_entity )
if...
Forum: Lua 11-06-2013, 10:05 PM
Replies: 112
Views: 42,278
Posted By squeek.
Can do it all through Lua: trigger_name =...

Can do it all through Lua:


trigger_name = trigger_ff_script:new({})

function trigger_name:ontouch( touch_entity )
if IsPlayer( touch_entity ) then
local player = CastToPlayer(...
Forum: Lua 02-16-2013, 11:36 AM
Replies: 112
Views: 42,278
Posted By squeek.
-- save all the functions in a table -- so we...

-- save all the functions in a table
-- so we don't accidentally overwrite any saved functions in other files
local saved_functions = {}

-- save the function in the table...
Forum: Lua 09-07-2012, 12:33 AM
Replies: 112
Views: 42,278
Posted By squeek.
Not actually sure if Lua can give players health...

Not actually sure if Lua can give players health above 100%. If it doesn't, it'd be easy to add that functionality.
Forum: Lua 09-06-2012, 11:36 PM
Replies: 112
Views: 42,278
Posted By squeek.
Not sure what you mean by "usually get from the...

Not sure what you mean by "usually get from the medic," but it sounds possible.
Forum: Lua 08-20-2012, 07:24 AM
Replies: 112
Views: 42,278
Posted By squeek.
No problem.

No problem.
Forum: Lua 08-20-2012, 07:04 AM
Replies: 112
Views: 42,278
Posted By squeek.
Here's a working version: ...

Here's a working version:

IncludeScript("base_teamplay")

-----------------------------------------------------------------------------
-- set class limits...
Forum: Lua 08-20-2012, 06:32 AM
Replies: 112
Views: 42,278
Posted By squeek.
Not sure where that error is coming from, but...

Not sure where that error is coming from, but it's not the Lua (Lua errors/messages are all prefixed with [SCRIPT]). I just tested the resupply script I posted and it seems to work for me.

Could...
Forum: Lua 08-20-2012, 05:10 AM
Replies: 112
Views: 42,278
Posted By squeek.
When you run a local server, Lua errors show up...

When you run a local server, Lua errors show up in the console. They are usually extremely helpful.

EDIT: Also, those team limits are already set in base_teamplay, you don't actually need that...
Forum: Lua 08-19-2012, 09:49 PM
Replies: 112
Views: 42,278
Posted By squeek.
That depends on what else you want in the map. As...

That depends on what else you want in the map. As moosh said, team/class settings, bags, and locations are the most common.

I'd suggest using http://notepad-plus-plus.org/. It has syntax...
Forum: Lua 08-19-2012, 05:56 AM
Replies: 112
Views: 42,278
Posted By squeek.
Everytime someone asks for a continuous resupply...

Everytime someone asks for a continuous resupply script I come up with a different way to do it. Here's what I came up with this time. It's completely untested:

resupply_settings = {...
Forum: Lua 10-28-2010, 01:12 AM
Replies: 112
Views: 42,278
Posted By squeek.
It might have to do with the space in the...

It might have to do with the space in the schedule name ("Re-Enable Scoring"). Never tried that, so I'm not sure if it works. Try taking it out and testing it again.

Personally, I'd stay away from...
Forum: Lua 10-24-2010, 09:21 PM
Replies: 112
Views: 42,278
Posted By squeek.
What's wrong with it? This line determines...

What's wrong with it?

This line determines how long the trigger is disabled for:
AddSchedule("Reenable Scoring", 1, reallowscoring)

I'd change it to:
AddSchedule("reenablescoring",...
Forum: Lua 12-31-2009, 06:48 AM
Replies: 112
Views: 42,278
Posted By squeek.
Also, the console will report lua errors (if...

Also, the console will report lua errors (if you're on a local server). If the 4-teams-of-death show up, the console will almost always have some sort of lua error near where it loads the lua files.
Forum: Lua 12-31-2009, 06:46 AM
Replies: 112
Views: 42,278
Posted By squeek.
"||" is not an operator in lua. It's "or". ...

"||" is not an operator in lua. It's "or".

function IsNotProjectile( allowed_entity )
return IsPlayer(allowed_entity) or IsGrenade(allowed_entity) or IsTurret(allowed_entity) or...
Forum: Lua 12-31-2009, 06:32 AM
Replies: 112
Views: 42,278
Posted By squeek.
Good news! It's not possible (it was actually bad...

Good news! It's not possible (it was actually bad news).

Having info_ff_scripts trigger triggers is something that has always been planned but never actually done. Not really sure of its status...
Forum: Lua 03-03-2008, 09:19 PM
Replies: 112
Views: 42,278
Posted By squeek.
Yeah, it's possible. Give me a bit. I'll edit...

Yeah, it's possible. Give me a bit. I'll edit this post when I get it ready.
Forum: Lua 03-03-2008, 08:53 PM
Replies: 112
Views: 42,278
Posted By squeek.
Will try it out now. What exactly do you want to...

Will try it out now. What exactly do you want to happen? It's been so long since I was gassed in rock2.

How much damage per second? Length? Etc?
Forum: Lua 03-03-2008, 01:53 AM
Replies: 112
Views: 42,278
Posted By squeek.
Oops. Add this at the top: playerStateTable =...

Oops. Add this at the top:
playerStateTable = {}
Knew I was gonna forget it, and I did.

Edited the other post with this change.
Forum: Lua 03-02-2008, 10:32 PM
Replies: 112
Views: 42,278
Posted By squeek.
Add this to startup(): AddScheduleRepeating(...

Add this to startup():
AddScheduleRepeating( "Restock", RESTOCK_ITERATION_TIME, restock )
And then here's the bulk of the code:

playerStateTable = {}
RESTOCK_ITERATION_TIME = 1

function...
Forum: Lua 03-02-2008, 10:10 PM
Replies: 112
Views: 42,278
Posted By squeek.
function player_onconc(player_entity,...

function player_onconc(player_entity, effector_entity)

if IsPlayer( player_entity ) and IsPlayer( effector_entity ) then
local player = CastToPlayer( player_entity )
local playerEffector =...
Forum: Lua 03-02-2008, 09:16 PM
Replies: 112
Views: 42,278
Posted By squeek.
Rockets/Pipes would be rather easy... grenades as...

Rockets/Pipes would be rather easy... grenades as well (I think). Concs I'm not totally sure about.
Forum: Lua 03-02-2008, 08:41 PM
Replies: 112
Views: 42,278
Posted By squeek.
Yeah, give me a bit. Not totally sure if the...

Yeah, give me a bit. Not totally sure if the tick() function is working or not.
Forum: Lua 03-01-2008, 11:45 PM
Replies: 112
Views: 42,278
Posted By squeek.
He wants team and class specific. My code was...

He wants team and class specific. My code was untested, I might have gotten something wrong. I'll test it and see what's wrong.
Forum: Lua 02-26-2008, 12:24 AM
Replies: 112
Views: 42,278
Posted By squeek.
What's a #2 rock?

What's a #2 rock?
Showing results 1 to 25 of 32

 
Forum Jump

All times are GMT. The time now is 01:31 AM.


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