Question about bots shooting targets

Tutorials and discussions about Mapping - Introduce your own ones!
Post Reply
Raylen
Average
Posts: 51
Joined: Wed Jan 12, 2011 12:43 pm
Personal rank: BunnyTracker

Question about bots shooting targets

Post by Raylen »

Hello again :)

I had this bright idea for one of my maps that involves a shooting competition between a player and a bot. I posted something similar before, but I came to the conclusion that my previous idea was too hard (at least for me, at any rate), so I simplified it. The question comes in a few parts:

1. What type of pawn is going to be most suitable? At the moment I have a TMale1Bot, because I'd quite like people to recognise the bot as Loque :D

2. I need the bot to shoot a TT_Shoot Trigger. In testing, I have achieved this by placing a TeamCannon "inside" the trigger, and making it shoot non-damage Arrows. However, this is a very inconsistent method, particularly over the distances used in the real map (up to 2000 units) - the bot simply does not want to shoot at the cannon. A further disadvantage to using a Bot, rather than some monster, is that I don't think I can allow the bot to die, as it won't respawn on a zero bots server.


So yeah. Basically, how do I make a bot shoot a trigger?
Thanks in advance for answering the above question!
User avatar
>@tack!<
Adept
Posts: 338
Joined: Sat Apr 17, 2010 4:51 pm
Personal rank: lol?

Re: Question about bots shooting targets

Post by >@tack!< »

im also very interested in this, and if someone could make some kind of special trigger actor for this or sth id appreciate it.
User avatar
Saya-chan
Adept
Posts: 446
Joined: Mon Jun 02, 2008 10:46 am
Personal rank: Former UT99 modder
Location: Vigo, Galicia
Contact:

Re: Question about bots shooting targets

Post by Saya-chan »

Ah that. I think you could check out what's done in Bot.BaseChange() for an example on how to force them.
Image
  ~♥~ Bless the Cute Emperor ~♥~
Raylen
Average
Posts: 51
Joined: Wed Jan 12, 2011 12:43 pm
Personal rank: BunnyTracker

Re: Question about bots shooting targets

Post by Raylen »

Hmm, so I had a look at that code. I think I'm probably too inexperienced to get it working. For example, it refers to a Mover(Base), where I really need it to look at a Trigger which won't (always) cause a mover to move. I also don't really understand the purpose of all the parameters given to Trace.

I think unless some kind person can code the trigger for me (readme credits will be given), I'll think of something slightly different :)



Edit: Still no luck, but I played around with the bDamageTriggered - I'm still stuck with understanding what Mover(Base) refers to :(
Thanks in advance for answering the above question!
User avatar
Saya-chan
Adept
Posts: 446
Joined: Mon Jun 02, 2008 10:46 am
Personal rank: Former UT99 modder
Location: Vigo, Galicia
Contact:

Re: Question about bots shooting targets

Post by Saya-chan »

Well... What I meant was to do something like this:

Code: Select all

TheBot.Target = TheTrigger;
bShootSpecial = true;
TheBot.FireWeapon();
TheBot.bFire = 0;
TheBot.bAltFire = 0;
bShootSpecial = false;
The weird thing about this is that the bot shoots a pulsegun ball if he doesn't have an enforcer in its inventory.
Also, it's better if before making the bot shoot, you call its TurnToward function using the trigger as parameter, then add a delay to wait until it is facing the target.
Image
  ~♥~ Bless the Cute Emperor ~♥~
Raylen
Average
Posts: 51
Joined: Wed Jan 12, 2011 12:43 pm
Personal rank: BunnyTracker

Re: Question about bots shooting targets

Post by Raylen »

The weird thing about this is that the bot shoots a pulsegun ball if he doesn't have an enforcer in its inventory.
Ah, so I must have been doing something right...I wondered what those green things were flying around for lol. As it happens, it's probably a slightly better option for me to use a TrapSpringer (as used in DM-Pressure), which is classed as an inventory item (so the bots "want" it), and can be shot.

You know it's a little bad when the code has a comment to say //hack fix for DM-Pressure :D
Thanks in advance for answering the above question!
Post Reply