by date
One of Two - AI update.
One of Two - AI update.
| Name: | Phil Carlisle | ![]() |
|---|---|---|
| Date Posted: | Feb 01, 2006 | |
| Rating: | 5.0 out of 5 | |
| Public: | YES | |
| Comments: | YES | |
| RSS Feed: | or Subscribe with . | |
| Profile Page: | View profile page for Phil Carlisle |
Blog post
Warning! Image heavy!
Well, the AI pack is still rolling along. Was it last week I posted about a little epiphany I had about adding triggers to give level designers more control of how a level plays?
Well, let me explain the trigger concept a bit more and maybe give some example scenarios.
Triggers are simply objects you can put in the game (using the world editor) to control gameplay elements. They are in essence, simple logic devices which control simple but powerful functions which when added
together allow you to create some pretty funky gameplay. The big advantage here is that it is totally *without* using any scripting.
That's right, you can setup different team based gameplay, single player play, in fact a lot of interactivity in your levels without touching a single line of script!
How does it work?
Well, there are a number of triggers, each with a different set of core logic that controls when they activate. When a trigger activate it usually either activates another trigger in a chain, or changes a
property of an object or (and perhaps most usefully) causes something to be created or removed.
Triggers have been used in gameplay in half-life for years and are a pretty simple concept once you see them in use.
So lets cut to the details, here are a few example trigger icons (made by Logan Foster thanks logan!) that you will be able to place in a scene:
Basic_Trigger

This trigger is the "basic" type trigger. It can be used to activate other triggers, it can remove itself on activation, or reset itself, has options for being timer driven (so it activates every N seconds) it can
be set to only trigger N times, it can be set to activate after N other activations have happened (i.e. count up). It is the basis for the other triggers.
Volume_Trigger

The volume trigger adds to the basic_trigger the notion of volume. This means that the player can "touch" it. It can activate when players enter it, when the exit, or while they are inside. Again counters can
determine how often it activates etc.
Trigger_Multiple

This trigger is based off Basic_Trigger but adds the ability to activate multiple (up to sixteen) other triggers when it gets activated. Essentially its used to multiply the input into multiple outputs. See the example below.
Multi_Trigger

This trigger waits for multiple triggers to be activated before it activates. Think of it as a simple counter.
Spawn_Trigger

This is one of the most useful triggers. This basically acts like a "monster factory" creating the given creature by defining its mesh, brain, player class etc. This allows you to create creatures, spawn new
ones when those die, spawn new ones at a given interval, spawn up to a max count etc.
Additional Level Description Entities
Game_Team_Master
Each trigger has a "master" value, which is the id of a Game_Team_Master, which means that only players on the given team can activate that particular trigger. This is useful for team-specific doors
or switches for instance.
This trigger master, acts like a label to a trigger, it essentially says that "this team owns me".
World_Spawn
The World_spawn entity and the Game_Team_Master work in conjunction to describe (in the world spawn) the number and names of teams and (in the team masters) the names of teams and their id.
Given these objects, we can create plenty of interesting level scenarios just by combining these simple objects. Here's an example.
Say I'm working on a WW2 FPS game (heaven forbid) and I'm trying to recreate the DDay landings. Here's how I might use some triggers.
I have a trigger that is set to trigger once at the start of the level, this activates a trigger_multiple which then activates a bunch of different things. Several of those are to spawn the landing craft which are AI vehicles which are given a specific path to the beach. In addition, there are triggered another trigger multiple which starts firing explosions off on the beach. Once the players landing craft lands, it sends and event or touches another trigger which fires off a multiple which triggers all of the german defensive spawn triggers.
These spawn enemy gun units which man the gun emplacements and begin firing.
In addition to the spawning of gun emplacements we can also spawn in some enemy Stuka's which are AI Based flying vehicles which are there to basically bomb the beach.
Assume that the end condition for the level is to reach a given bunker on the top of a slope and to do that you have to destroy a door. So we add a trigger volume to the inside of the bunker that signals end of
mission (A trigger_changelevel), but in order to create the door, we have a trigger_breakable that when a particular interior is destroyed we class as destroyed, which then spawns some final enemies inside the
interior, the player fights their way past the final enemies (spawned when the door dies) which give the final element.
The point about all of this, is that there is not a single line of user-created scripting here. This is all created in the world editor.
That's not to say that its any more flexible, because scripting could easily do all this stuff, but what the trigger system provides is a way to quickly and visually setup logic based scenarios in a manner that many level designers are used to.
So I hope you'll agree that this system might be a useful addition to TGE's ease of use.
Next time, I hope to have a demo video of a typical setup based on our demo missions for the AI starter kit. It will include a simple setup showing you how easy it is to build a more interactive level using this trigger system. That coupled with our event system and it should be super-powerful for the simplicity involved.
Until next time.
Phil.
Well, the AI pack is still rolling along. Was it last week I posted about a little epiphany I had about adding triggers to give level designers more control of how a level plays?
Well, let me explain the trigger concept a bit more and maybe give some example scenarios.
Triggers are simply objects you can put in the game (using the world editor) to control gameplay elements. They are in essence, simple logic devices which control simple but powerful functions which when added
together allow you to create some pretty funky gameplay. The big advantage here is that it is totally *without* using any scripting.
That's right, you can setup different team based gameplay, single player play, in fact a lot of interactivity in your levels without touching a single line of script!
How does it work?
Well, there are a number of triggers, each with a different set of core logic that controls when they activate. When a trigger activate it usually either activates another trigger in a chain, or changes a
property of an object or (and perhaps most usefully) causes something to be created or removed.
Triggers have been used in gameplay in half-life for years and are a pretty simple concept once you see them in use.
So lets cut to the details, here are a few example trigger icons (made by Logan Foster thanks logan!) that you will be able to place in a scene:
Basic_Trigger

This trigger is the "basic" type trigger. It can be used to activate other triggers, it can remove itself on activation, or reset itself, has options for being timer driven (so it activates every N seconds) it can
be set to only trigger N times, it can be set to activate after N other activations have happened (i.e. count up). It is the basis for the other triggers.
Volume_Trigger

The volume trigger adds to the basic_trigger the notion of volume. This means that the player can "touch" it. It can activate when players enter it, when the exit, or while they are inside. Again counters can
determine how often it activates etc.
Trigger_Multiple

This trigger is based off Basic_Trigger but adds the ability to activate multiple (up to sixteen) other triggers when it gets activated. Essentially its used to multiply the input into multiple outputs. See the example below.
Multi_Trigger

This trigger waits for multiple triggers to be activated before it activates. Think of it as a simple counter.
Spawn_Trigger

This is one of the most useful triggers. This basically acts like a "monster factory" creating the given creature by defining its mesh, brain, player class etc. This allows you to create creatures, spawn new
ones when those die, spawn new ones at a given interval, spawn up to a max count etc.
Additional Level Description Entities
Game_Team_Master
Each trigger has a "master" value, which is the id of a Game_Team_Master, which means that only players on the given team can activate that particular trigger. This is useful for team-specific doors
or switches for instance.
This trigger master, acts like a label to a trigger, it essentially says that "this team owns me".
World_Spawn
The World_spawn entity and the Game_Team_Master work in conjunction to describe (in the world spawn) the number and names of teams and (in the team masters) the names of teams and their id.
Given these objects, we can create plenty of interesting level scenarios just by combining these simple objects. Here's an example.
Say I'm working on a WW2 FPS game (heaven forbid) and I'm trying to recreate the DDay landings. Here's how I might use some triggers.
I have a trigger that is set to trigger once at the start of the level, this activates a trigger_multiple which then activates a bunch of different things. Several of those are to spawn the landing craft which are AI vehicles which are given a specific path to the beach. In addition, there are triggered another trigger multiple which starts firing explosions off on the beach. Once the players landing craft lands, it sends and event or touches another trigger which fires off a multiple which triggers all of the german defensive spawn triggers.
These spawn enemy gun units which man the gun emplacements and begin firing.
In addition to the spawning of gun emplacements we can also spawn in some enemy Stuka's which are AI Based flying vehicles which are there to basically bomb the beach.
Assume that the end condition for the level is to reach a given bunker on the top of a slope and to do that you have to destroy a door. So we add a trigger volume to the inside of the bunker that signals end of
mission (A trigger_changelevel), but in order to create the door, we have a trigger_breakable that when a particular interior is destroyed we class as destroyed, which then spawns some final enemies inside the
interior, the player fights their way past the final enemies (spawned when the door dies) which give the final element.
The point about all of this, is that there is not a single line of user-created scripting here. This is all created in the world editor.
That's not to say that its any more flexible, because scripting could easily do all this stuff, but what the trigger system provides is a way to quickly and visually setup logic based scenarios in a manner that many level designers are used to.
So I hope you'll agree that this system might be a useful addition to TGE's ease of use.
Next time, I hope to have a demo video of a typical setup based on our demo missions for the AI starter kit. It will include a simple setup showing you how easy it is to build a more interactive level using this trigger system. That coupled with our event system and it should be super-powerful for the simplicity involved.
Until next time.
Phil.
Recent Blog Posts
| List: | 09/18/08 - Tell me I'm not going crazy!! 12/05/07 - The importance of good tools for productivity 11/17/07 - Using the way back machine. 09/21/07 - Juggling cats. 09/04/07 - End of Summer. 08/27/07 - Come work with me!! 08/14/07 - The changing nature of entertainment 07/25/07 - Someone stole my notes!! |
|---|
Submit your own resources!| Allen Turner (Feb 01, 2006 at 22:50 GMT) |
-Allen T.
| Pat Wilson (Feb 01, 2006 at 23:04 GMT) Resource Rating: 5 |
| Timothy Aste (Feb 01, 2006 at 23:13 GMT) |
| Canon (Feb 01, 2006 at 23:33 GMT) |
Christophe
www.frogames.net
| Logan Foster (Feb 01, 2006 at 23:53 GMT) |
| Treb Connell (formerlyMasterTreb (Feb 02, 2006 at 00:47 GMT) |
| Vashner (Feb 02, 2006 at 07:10 GMT) Resource Rating: 5 |
| Michael Cozzolino (Feb 02, 2006 at 13:14 GMT) |
| Chris "Tribal" (Feb 02, 2006 at 18:10 GMT) |
quote "This is all created in the world editor." , dreams do come true.
| Tom Bentz (Feb 02, 2006 at 19:00 GMT) |
| Uiriam (Feb 15, 2006 at 09:23 GMT) |
Edited on Mar 31, 2006 14:33 GMT
| Dave Young (Feb 16, 2006 at 22:42 GMT) |
| Duane Clark (Aug 19, 2006 at 02:30 GMT) |
| Edward (Mar 26, 2007 at 22:24 GMT) |
You must be a member and be logged in to either append comments or rate this resource.



5.0 out of 5


