Fortress Forever

Fortress Forever (https://forums.fortress-forever.com/index.php)
-   Mapping (https://forums.fortress-forever.com/forumdisplay.php?f=13)
-   -   Next patch Lua stuff (https://forums.fortress-forever.com/showthread.php?t=11935)

Mulchman MM 09-29-2007 02:04 AM

Next patch Lua stuff
 
Just making a note of these now - will possibly update this thread if more stuff is added/changed

The fix to :SetDamage() that DrEvil made will be in

And i've added two callbacks:
player_connected & player_disconnected

player_connected is a global function and takes 3 parameters - name, ip, player index - and returns true/false based on if you want the player to be allowed to join the server or not.

player_disconnected is a global function and takes 1 parameter - an actual player object [ie. CFFPlayer *] - and returns nothing

with these two functions you should be able to track players joining/leaving through their entity indices (ie. the player index from player_connected and player:GetId() from player_disconnected)

AltPluzF4 09-29-2007 02:08 AM

Quote:

Originally Posted by Mulchman MM
And i've added two callbacks:
player_connected & player_disconnected

...and that's why we love Mulchman!

Mulchman MM 09-30-2007 01:20 AM

Also adding a "DropToFloor" method. The parameter is just a CBaseEntity *.

So like:

Code:

DropToFloor(flag_entity) -- where flag_entity is an actual flag object or something

[P]Infidel 09-30-2007 01:50 AM

Quote:

Originally Posted by Mulchman MM
The fix to :SetDamage() that DrEvil made will be in

:-D

Does this include :GetDamageType()?

sir_frags 09-30-2007 12:00 PM

Posting this here because of the subject line. I think it would be good to have a Patch sticky so we can build anticipation and keep informed :)

Anyway, DrEvil just posted this in one of my other threads. He said they be fixin the setdamge for lua and he was even nice enough to give me the lua code :) This below turns off falldamage . . . . well, set it to zero. Dont work now, but it will with next patch.


Code:
function player_ondamage( player_entity, damageinfo )
if damageinfo:GetDamageType() == Damage.kFall then
damageinfo:SetDamage(0)
end
end

stino 09-30-2007 06:55 PM

is there a way to disable flags in 4ctf when there are no players in one of the teams, becouse the flag whould be ungarderd and easy to take

Mulchman MM 09-30-2007 07:46 PM

Quote:

Originally Posted by [P]Infidel
:-D

Does this include :GetDamageType()?

Yeah, DrEvil has exposed the damage types.

Adam-g1 09-30-2007 10:07 PM

So... any hints on when this patch is coming? ;) I have some maps I'm just itching to make..

AltPluzF4 09-30-2007 10:48 PM

Quote:

Originally Posted by Adam-g1
So... any hints on when this patch is coming? ;) I have some maps I'm just itching to make..

<3 Make them, then when the patch is out, you can add the lua snippet and test / adjust the jumps.
It's not like quadrocket_adam was ever meant to be easy, now was it? ;D

Adam-g1 10-01-2007 12:00 AM

Haha this is true.. I've already re-textured and re-made everything for adam3, now to do adam1, 2, 4, and quadpipe_adam.. haha


All times are GMT. The time now is 08:08 PM.

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