[airstrike] Triggers and level ending

Eero Tamminen eero.tamminen at netsonic.fi
Wed Jul 6 14:45:49 EDT 2005


Hi,


> > > > - Proximity trigger is still missing and will/would be very nice.
> > > > I'll look into this once the other stuff is tested/ready
>
> [..]
>
> > Hm.  I thought that it could just check the object co-ordinates and
> > ignore their size/shape.   I would assume most of the proximity
> > triggers to have much longer range than the size of the objects that
> > trigger them, in which case this wouldn't be a problem (just a feature
> > :)).
>
> For some cases I think the shape is important. Maybe we can have
> something like
>
> enum trigger_type {
> TRIGGER_SPHERE,
> TRIGGER_CONE120, /* a circle sector with angle 120 */
> TRIGGER_CONE90,
> TRIGGER_CONE30,
> TRIGGER_RAY /* Just a line */
> };

I'm not sure I understand how these would be used.    Do you mean that
it would control on how large angle the trigger monitor events and in which
direction?

I was planning to have an optional keyword to specify in which direction the
trigger checks proximity, but it would be just left/right/above/below.


> #define TRIGGER_PERFECT 1 /* this is for flags */
>
> trigger_create(vector_t position, float angle, int size, enum
> trigger_type type, unsigned int flags);
>
> >  I thought that in most
> > cases it would also make sense to check position for only a subset of
> > sprites:
> > - A specific tagged sprite (single player :))
> > - A specific sprite type (e.g. plane)
> > As it might look silly if cannon would start shooting at birds & flies.
>
> Should this be programmable from the level settings file?

Most certainly. :-)


	- Eero



More information about the airstrike mailing list