I'm a doctor, not a mechanic

Legacy:TrapSpringer

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 20:25, 2 April 2004 by Px3wh.vc.shawcable.net (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UT :: Actor (UT) >> Inventory (UT) >> TrapSpringer

The TrapSpringer actor is used to "encourage" your bots to activate traps.

Properties[edit]

name TrapTag 
tag of trap - could be zone, mover, or a trigger which counts touches
name TriggerTag 
tag of trigger for trap
bool bShootIt 
presumably makes the bot shoot instead of walk to the springer, but it's only in the script once other than the declaration... hmmmm

Tutorial[edit]

Two examples of TrapSpringers in use are the stock UT map DM-Pressure and one of navboy's maps DM-Gravadyne7:

http://www.planetunreal.com/fragadelic/navboy/DM-Gravadyne7.htm

At any rate, firefly asked how to set these up in the RUST forums, and here was my response, which got him up and running. – Navboy.

When you look at those maps, pay particular attention to the event tags of any related movers and triggers. The deal with the TrapSpringer is that it is a subclass of an Inventory item, which is a brilliant idea since all the code for "making" bots want to "pick it up" is already there, but in this case the code tells the bots to shoot at it or try to pick it up, which in turn causes it to trigger things.

So you've got two tags specific to the TrapSpringer to set up:

The TriggerTag will grab the first trigger it finds in your level whose tag matches this parameter. This trigger should be the one that human players use to set off your trap. Your trap must be either a zone, a mover, or a trigger. So when the bot decides it "wants" the TrapSpringer (remember it's an inventory item) and either tries to pick it up or shoots at it, then the trigger that runs your trap is triggered, just as if a human player had set off the trigger.

But how does the bot decide whether it wants to acquire the TrapSpringer? That's why you must also set up your TrapTag, so it can know what traps (it can handle up to 8 traps at once) are linked to your TrapSpringer without tracing down all the potential connections through triggers and whatnot. So, once you tell it the event tag of your trap with this parameter, then every time the bot thinks about going after the TrapSpringer, it can check some real nifty things about your trap real quick in real time, like whether there are any potential victims (for a zone the victim must be in the zone, for a mover the victims must be on the mover; of course movers only remember up to 8 players standing on them i believe) to make it worth the bot's while, and even more importantly in a team game, it checks to see if the victims are on the same team as itself or not ... mighty considerate, eh?

A couple things to keep in mind when setting it up is that other bots are not considered potential victims, only human players, and also there is a blanket 1600-unit max effective distance before bots will even consider the TrapSpringer as something to investigate going after.

I'd say to start with a simple setup and get it working then you can make it more complicated. I don't even remember what all i did in DM-Gravadyne7 but i used one trapspringer in front of a wall button that triggers a glass-bottomed trap door in the floor to open, dumping players to their death by falling into the sun and exploding in flames, and the bots love triggering that

Then i used another one and some dispatchers for the alcove behind the shield belt, where there's a button with a 10-second recharge time, that when pushed or shot at will trigger a trap down on the bloody grid on the central main floor area, where a bright light flashes, and sound plays across the whole level, and any players/bots in the area are "gravitationally degaussed", meaning they have 4 seconds to live unless killed by somebody else first (which is difficult because they receive a temporary health boost to 200), and during that four seconds they grow to about 20 feet tall while getting stretched out til they look like tall insects, and they turn darker and darker until they turn black, then they explode. And if you (or a bot) kill any victims with this trap, you get credit for the frags and a confirming announcement is made over the P.A. system. Great fun.

The third one triggers the same trap and is outside the ship, where there's a distant button that players can shoot while falling to their deaths and potentially take some other players with them, and i hacked it to let bots shoot it from a great distance, but it doesn't work because when falling they're not on the network i guess and won't respond to inventory items like the TrapSpringer. Anyway, HTH.

KOOSH_BALLZ: DL for DM-Gravadyne7 plz?

Bots[edit]

Legal: Is there ANY way to make them shoot a TrapSpringer with a special gun?

Tarquin: You probably need to understand how bShootIt works – it's only once in the script & I don't see how it does what it's meant to do.

Legal: I want a (TTR) bot to "shoot" a grenade to blow the objective up. I have seen how you can restrict this somehow to just one weapon, i e grenade, but can't figure out where :(

Foxpaw: A scriptedsequence should be able to force the bot to do this. Alternatively you could use a matinee "movie" to dramatically show the grenade chucking. (complete with forcing the bot to do the actual chucking of the grenade.)

Someone: I have a piece of glass that breaks from the Making Glass Break tutorial. How do I make the bot "want" to break the glass???