TheEnginesOfCreation / EntityPlus

EntityPlus is a mod that offers a true single player experience in the Quake III Arena videogame.
34 stars 5 forks source link

bot delete #146

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Delete a bot.

While a bot is alive and walking around, I want to be able to remove it from 
the game. Also know that when removing it, it should NOT trigger the deathspawn 
or any other surrounding logic. no Score adjustment. it should just be removed, 
or REVERTED.

When the player dies, I need a way to reset a room.

Currently I'm only able to have the player re-enter the room and he "finishes" 
damaging the Boss. But, I would prefer that the battle would RESTART with full 
health again to the bot. I need to delete bot, so that I may trigger/spawn it 
again.

If there a programmed bot index, then I would prefer it to be a REVERT rather a 
DELETE. so that no "count" or counters or logic are adjusted. It would be bot 
#1 again, not bot instance #2 -- I'm not even sure if that matters or if that 
affects me and my target/targetname logic -- perhaps it will work as 
normal/usual regardless of the instance # of the bot.

I'm ABLE to live without this, but I would be sad -- anyways, at least I 
mentioned it and ask for it.

Original issue reported on code.google.com by ryanbris...@gmail.com on 1 Oct 2011 at 12:25

GoogleCodeExporter commented 9 years ago
i really would like this.  it would help me out to setup my scenarios to allow 
for a player to resume/retry the map when player dies without map needed to 
restart.  i need a way to reset a certain scenario in my map.

is this difficult to do?  what are your thoughts, if you don't mind me asking.

Original comment by ryanbris...@gmail.com on 3 Oct 2011 at 8:32

GoogleCodeExporter commented 9 years ago
Yeah I'm looking into implementing something like this, I'm just not very sure 
how.
I might have a target_botremove entity which points towards a target_botspawn 
and, when triggered, will remove all bots that are spawned by that botspawn 
from the game.

On the other hand, what you could probably do as well is this:

- Put a trigger_multiple across the entire floor of your room where the bot is 
and make that target a target_kill entity.

- Set up a target_unlink which targets the trigger and hit the IMMEDIATELY 
spawnflag so that it removes the trigger from the game.

- Set up a target_delay which targets the target_unlink with a "wait" key of, 
say, "1"

- Set up a trigger_death entity and give it a "nobots" key with a value of "1". 
Make it target both the target_unlink and the target_delay. Give it a "count" 
key with a value of "1".

Unless I've made a mistake in my description, what should happen now is that 
when the player dies, the trigger_death is activated and it activates the 
target_unlink. The target_unlink will link the trigger into the world which 
will be triggered by the bot. The bot is killed by the target_kill and thus is 
removed from the game.
At the same time, the trigger_death has activated the target_delay which will, 
after 1 second, activate the target_unlink again which will in turn remove the 
trigger_multiple again.

This is a bit of a roundabout way of getting there but it should work, right?

I'll probably implement the target_botremove entity anyway though.

Original comment by era...@gmail.com on 5 Oct 2011 at 9:04

GoogleCodeExporter commented 9 years ago
That sounds cool, but remember that we want a "REVERT" type of effect as well.  
By "killing" the bot, i hope that does not mean that it adds score points to 
the score board, or adds # to bot count.  When player dies, the bot should be 
"UNDO" deleted, instead of "KILL" deleted. 

For example, if bots do not already provide score points upon death by default, 
then a mapper would setup score points himself by adding a target_score to a 
deathtarget of a bot.  But if we "kill" the bot with a trigger, then the 
target_score still gets activated when it should not.  Right?

Thanks for looking into this.

Original comment by ryanbris...@gmail.com on 5 Oct 2011 at 4:11

GoogleCodeExporter commented 9 years ago
I don't think you get points from a bot that dies because of a target_kill, but 
it will probably trigger any trigger_death entities.

Anyway, I've already implemented a target_botremove entity, so that will be 
included in the next release. This entity targets a target_botspawn and when 
activtated will remove any bots from the game that were spawned by the 
target_botspawn entity it targets.

So I'm setting this issue to fixed.

Original comment by era...@gmail.com on 6 Oct 2011 at 6:26