Fortress Forever

Fortress Forever (https://forums.fortress-forever.com/index.php)
-   Lua (https://forums.fortress-forever.com/forumdisplay.php?f=44)
-   -   More callbacks than listed? (https://forums.fortress-forever.com/showthread.php?t=19448)

hlstriker 04-10-2009 06:57 AM

More callbacks than listed?
 
Are there other callbacks than the ones Mulchman listed in the sticky post?

Edit:
Is there a COMPLETE list of functions too?

This post has some but not all:
http://forums.fortress-forever.com/s...89&postcount=4

squeek. 04-10-2009 07:50 AM

Thanks for bringing this up. Searching through the code I've come up with these:

Code:

player_onprimegren1( player_entity )
player_onprimegren2( player_entity )
buildable_ondamage( buildable_entity, damage_info )

As an aside, some very strange variables were added to func_button:ondamage() without any documentation.

Code:

info_damage (int)
info_attacker (base entity/player)
info_classname (string weapon name)

Here's an example code from a dev map I found:
Code:

bob = func_button:new({})
function bob:ondamage()
    if IsPlayer( info_attacker ) then
        local player = CastToPlayer( info_attacker )
        ConsoleToAll(player:GetName().." shot button with a "..info_classname.." for "..info_damage.." damage")
        if info_classname == "ff_weapon_spanner" then
                PressButton(entname)
        end
    end
end

As for functions... no, there isn't... yet.

hlstriker 04-10-2009 05:48 PM

Alright, I was just wondering about the functions too because I remember you posting the SetVelocity() in the feature request forum and didn't see it in the function list.

Also, now I don't have to ask how to concatenate strings (who would have guessed 2 dots)!

squeek. 04-10-2009 07:57 PM

Quote:

Originally Posted by hlstriker (Post 434958)
Alright, I was just wondering about the functions too because I remember you posting the SetVelocity() in the feature request forum and didn't see it in the function list.

Also, now I don't have to ask how to concatenate strings (who would have guessed 2 dots)!

Yeah... I think there are quite a few undocumented functions. I'll try to get a list of them sometime.


All times are GMT. The time now is 02:23 PM.

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