Jump to content
  • Advertisement
Sign in to follow this  
PumpkinPieman

Triggers and Events

This topic is 4095 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm having a little trouble getting my trigger system written. One of the things that is holding me back is understanding what a trigger system really is. I know how it works to a degree, but I'm puzzled on the uses. I'm kind of just looking for a few examples, but my searching google hasn't come up with anything fully explaining uses. (More geared towards RTS's)

Share this post


Link to post
Share on other sites
Advertisement
Triggers and Events can be used to describe a wide range of solutions to problems. Can you describe the current 'problem' that you have and how you are planning on using a trigger system.

I'm currently designing an interaction system that relies completely on context sensitive triggers. Context is the environment, current state, character pose and movement directions from the player. I plan on using a fuzzy weighted system to spawn these interactions.

Share this post


Link to post
Share on other sites
That I don't know entirely.

Is the concept designed to be vague so that the system can fit to the needs of the application?

Right now I'm working on an RTS trigger system, so map events as well as maybe projectile and item events.

Share this post


Link to post
Share on other sites
I guess it depends on how far you want to take it, and how many problems you want to solve at once. Trigger systems lead onto scripting the events they create and so are really just a part of your engine.

How flexible do you want your engine and how much time are you prepared to put into your engine to make it flexible? Creating a few trigger types and response types may solve your problem of dynamic gameplay. When a unit of type x enters the area y run the attached event. Events could be: spawn x number of y units at this coordinate. These triggers and responses can be added to your map format.

So this trigger system can be extended but only so far. Eventually triggers will want to create new triggers and delete other ones. Some triggers will want more complicated logic like x precondition AND y precondition. These are harder to create but even harder to have an easy way to edit.

One of the easiest methods to create and edit triggers I've found is the starcraft map editor and/or smart playlists in iTunes. These have predefined conditions with arguments that can be AND'd together. Plus to create a new one minus to delete etc.

Anyway the system I'm looking into is more of a fuzzy match for the physical interaction of a ragdoll / character with the environment. I'm looking to setup a dynamic way to create the animations for walking, reaching and opening a door, grabbing the edge of a ledge etc. The idea is the base state of a character is ragdoll and these triggers set off actions that provide impulses that drive the legs, arms etc. A trigger is that the character is on the ground, face down. There is a good amount of fuzzyness so the character doesn't have to be exactly in the correct position. The action is that they move their arms and push off to get back onto their feet. These impulses aren't complete muscle movements otherwise I would have to deal with balancing and walking which has an entire branch of research. The impulses can cheat by forcing correct movements. In theory every impulse could be 100% which would turn this system into rigid animation like games are currently.

Anyway actions can run at the same time so triggers controlling the legs can be independent of the arms and head. I hope to use this system to map out a fluid and fun 3rd person shooter (or over the head).

Share this post


Link to post
Share on other sites
Quote:
Original post by PumpkinPieman
Is the concept designed to be vague so that the system can fit to the needs of the application?


No, it's just that you're taking an abstract term (ie. 'trigger') and assuming it has a specific and well-known meaning. :) And, it doesn't. How do you know you even need such a thing?

Don't write engines, write games. So decide what you actually need for your game, and look for information on that.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kylotan
Quote:
Original post by PumpkinPieman
Is the concept designed to be vague so that the system can fit to the needs of the application?


No, it's just that you're taking an abstract term (ie. 'trigger') and assuming it has a specific and well-known meaning. :) And, it doesn't. How do you know you even need such a thing?

Don't write engines, write games. So decide what you actually need for your game, and look for information on that.

I've done enough research to know what it does as well as the uses, just implementing one seems difficult. My whole issue is that yes, I can easily create a trigger system for a map events. But how do unit to unit triggers play in to this? Are these two different trigger systems?

It's examples I need, then I can build on grasping the full concept. Tinkering right now doesn't seem to be going anywhere.

Quote:
Original post by Umbrae
I guess it depends on how far you want to take it, and how many problems you want to solve at once. Trigger systems lead onto scripting the events they create and so are really just a part of your engine.

How flexible do you want your engine and how much time are you prepared to put into your engine to make it flexible? Creating a few trigger types and response types may solve your problem of dynamic gameplay. When a unit of type x enters the area y run the attached event. Events could be: spawn x number of y units at this coordinate. These triggers and responses can be added to your map format.

So this trigger system can be extended but only so far. Eventually triggers will want to create new triggers and delete other ones. Some triggers will want more complicated logic like x precondition AND y precondition. These are harder to create but even harder to have an easy way to edit.

One of the easiest methods to create and edit triggers I've found is the starcraft map editor and/or smart playlists in iTunes. These have predefined conditions with arguments that can be AND'd together. Plus to create a new one minus to delete etc.

Anyway the system I'm looking into is more of a fuzzy match for the physical interaction of a ragdoll / character with the environment. I'm looking to setup a dynamic way to create the animations for walking, reaching and opening a door, grabbing the edge of a ledge etc. The idea is the base state of a character is ragdoll and these triggers set off actions that provide impulses that drive the legs, arms etc. A trigger is that the character is on the ground, face down. There is a good amount of fuzzyness so the character doesn't have to be exactly in the correct position. The action is that they move their arms and push off to get back onto their feet. These impulses aren't complete muscle movements otherwise I would have to deal with balancing and walking which has an entire branch of research. The impulses can cheat by forcing correct movements. In theory every impulse could be 100% which would turn this system into rigid animation like games are currently.

Anyway actions can run at the same time so triggers controlling the legs can be independent of the arms and head. I hope to use this system to map out a fluid and fun 3rd person shooter (or over the head).

I don't need something as complex as what you're looking in to. But my end goal is to have these triggers as scripted as possible.

I took a look in to some of the triggers StarCraft\Warcraft III has on the map side and it kind of makes me wonder if its better to have all the triggers scripted. At least this way I can open up a set of global variables to the writer and let them decide how things play out. It will all be sandboxed of course. For the application, I don't think scripting it will take too much of a bite out of processing.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!