Game Development Community

Wondering about a code.

by Dustin Mullen · in Technical Issues · 09/12/2007 (6:44 pm) · 1 replies

I thought about making teams (using the team input tutorial found somewhere on this website) and then assign a car to that team. Here is what I have so far, but it doesn't work.

In game.cs there is:

// Create the player object
%car = new WheeledVehicle() {
dataBlock = Diablo;
client = %this;
};

How can I make it so it sets it for team?

&If
RedTeam
// Create the player object
%car = new WheeledVehicle() {
dataBlock = Dodgeviper;
client = %this;
};

#1
10/12/2007 (12:31 am)
Maybe something like:

if (%player.team == 1)
{
%car = new WheeledVehicle()
{
datablock = DodgeViper;
}
}
else if (%player.team == 2)
{
%car = new WheeledVehicle()
{
datablock = AstonMartin;
}
}