Page 1 of 1

Checkpoint [q3geoball]

Posted: Wed Apr 11, 2007 3:53 pm
by Landix
I there.... again :icon31:

Is there a way to add checkpoints to quake 3 Arena?

I thinking about of get all items armors or what else in the map are usefully for this, to make the teleporter free for the next level, or open a door....!?

So MAN or WOMAN must collect all these items before he/she can "Roll" to the next map.

Somebody can helping me out with this?

Posted: Wed Apr 11, 2007 6:25 pm
by ^misantropia^
You'll want to use triggers for this so take a look at game/g_trigger.c. In (Q3|Gtk)Radiant, create a stock trigger and change its classname in the entity window to whatever you named yours. Let me know if you run into any specific problems.

Posted: Wed Apr 11, 2007 9:35 pm
by Landix
I have this yet:

in the ent..def for gtk i add the lines:

Code: Select all

/*QUAKED trigger_collect (.5 .5 .5)
collect 3 Armors to finish map 
-------- KEYS --------
*/
in the g_trigger.c i add this yet:

Code: Select all

/*QUAKED trigger_collect (.5 .5 .5)
collect 3 Armors to finish map 
*/
void SP_trigger_once( gentity_t *ent) {

}
So what writing then?
When the 3 Armors are collected a door should be open or something like this!?

thx for help

Posted: Fri Apr 13, 2007 2:59 pm
by Landix
Hmmm....

can i use this?

Code: Select all

The target_objective entity is what makes objective driven events 

If you walk into a trigger_multiple with these keys:
checkObjective = SomeObjective
objectiveMinState = 2
objectiveMaxState = 4
and the SomeObjective target_objective entity has a state of 5.
The trigger_multiple would NOT trigger its target.
But if the state was 2, 3 or 4 it would trigger its target.
This is in EF i think

Posted: Fri Apr 13, 2007 3:11 pm
by Landix
I mean this!:

Code: Select all

void target_objective_use( gentity_t *self, gentity_t *other, gentity_t *activator )
{
	gentity_t *tent;

	tent = G_TempEntity( self->r.currentOrigin, EV_OBJECTIVE_COMPLETE );
	//Be sure to send the event to everyone
	tent->r.svFlags |= SVF_BROADCAST;
	tent->s.eventParm = self->count;
}

void SP_target_objective (gentity_t *self)
{
	if ( self->count <= 0 )
	{
		//FIXME: error msg
		G_FreeEntity( self );
		return;
	}
	if ( self->targetname )
	{
		self->use = target_objective_use;
	}
	level.numObjectives++;
}
:p

I am right?

Posted: Fri Apr 13, 2007 5:55 pm
by ^misantropia^
Yep. That'd do the trick.

Posted: Fri Apr 13, 2007 6:17 pm
by Landix
I will try this out

thx