capturetheflag
capturetheflag copied to clipboard
Make stealing from enemy teamchest(s) possible while they are open
Issue: #1058
I'm working on it. Currently the algorithm is as such:
- Keep a list of players who have opened the teamchest in
openers(inmods/ctf/ctf_modes/ctf_modes_classic/init.lua) - Remove the player on death or leave
- Check every 2 seconds using
minetest.after(), if more than 5 seconds has been elasped, remove the player fromopeners - if length of
openersis zero, the chest is closed
Meanwhile I'm working on it, you can check if the sound clip I've used for stealing alarm is good.
It's ready. Please someone tell me how to make luacheck happy :)
Global functions must go in their mod's namespace table
Global functions must go in their mod's namespace table
May you give an example how?
The ctf_teams namespace table is ctf_teams, global functions in that mod's code are put in that table (ctf_teams.get_team(), etc)
You commited changes to the map submodule again.
Try
cd capturetheflag/mods/ctf/ctf_map/maps/
git remote update
git checkout origin/master
cd ../../../..
git status
and showing the output of that last git status (You will need to edit the cd command's path for it to work)
You commited changes to the map submodule again.
Try
cd capturetheflag/mods/ctf/ctf_map/maps/ git remote update git checkout origin/master cd ../../../.. git statusand showing the output of that last
git status(You will need to edit the cd command's path for it to work)
I will do it when I have the stealing feature done.
I think it should be easier than that to steal from the enemy chest. I think if you can get all the way into the enemy base you should be able to take whatever you want from the team chest even if no one is currently in it.
I think it should be easier than that to steal from the enemy chest. I think if you can get all the way into the enemy base you should be able to take whatever you want from the team chest even if no one is currently in it.
I disagree. As a player I know that getting to enemy teamchest is not that hard.
Edit: On most maps, getting to enemy base is easy as a pie if you don't want to get to there fast.
To make it even more challenging I propose this:
- An enemy must hit the teamchest to steal something from it
- Upon hitting, the game chooses a slot randomly and adds its item to the hitter inventory. The chosen slot might be possibly empty
- The teamchest screams anyway even if it's closed or no item was stolen(or in other words, an empty slot was randomly chosen).
Opinions?
I think it should be easier than that to steal from the enemy chest. I think if you can get all the way into the enemy base you should be able to take whatever you want from the team chest even if no one is currently in it.
yes
To make it even more challenging I propose this:
* An enemy must hit the teamchest to steal something from it * Upon hitting, the game chooses a slot randomly and adds its item to the hitter inventory. The chosen slot might be possibly empty * The teamchest screams anyway even if it's closed or no item was stolen(or in other words, an empty slot was randomly chosen).Opinions?
no if a player has made it into the enemies base they should be able to quickly take their loot (else they will just take the flag and leave)
I still disagree. Getting to enemy base unnoticed is usually very easy if you spend enough time.
Closing in favor of https://github.com/MT-CTF/capturetheflag/pull/1321