BF-style Packs?
by Okashira · in Torque Game Engine · 07/16/2006 (9:21 am) · 6 replies
How hard would it be to implement Battlefield-style 'packs' to the FPS Starter Kit? Like everytime you spawn you choose one of the (let's say 5) 'packs'. Depending on which pack you choose you will start with a different weapon and you will have a different character model.
Thanks,
Okashira
PS : I am currently working with the TGE Demo.
Thanks,
Okashira
PS : I am currently working with the TGE Demo.
About the author
#2
Thanks alot. I am assuming that you could do the same thing (as you said with mounting a weapon) only have it change the model to change it to a different model(duh)?
Thanks,
Okashira
07/16/2006 (10:53 am)
@MattThanks alot. I am assuming that you could do the same thing (as you said with mounting a weapon) only have it change the model to change it to a different model(duh)?
Thanks,
Okashira
#3
That all is added on player spawn.
Exodus's team resource would be worth looking at. It does something very similar to this.
07/16/2006 (10:56 am)
Yes. Just having 1 character spawn with a different weapon would be highly recommended for a quick prototype. From game.cs gameconnection:createPlayer()%player.setInventory(Crossbow,1); %player.setInventory(CrossbowAmmo,10); %player.mountImage(CrossbowImage,0);
That all is added on player spawn.
Exodus's team resource would be worth looking at. It does something very similar to this.
#4
Thanks for the code, but what about changing the character model?
Thanks,
Okashira
07/17/2006 (1:50 pm)
@MattThanks for the code, but what about changing the character model?
Thanks,
Okashira
#6
which player model, weapon, sidearm, and 'special item' that they chose to spawn with from the GUI.
This code is not complete, you will definitely want to make sure the player does not choose anything you
don't want them choosing (tankTurretImage, etc).
function serverCmdChooseLoadout(%client, %weapon, %sidearm, %specItem, %playerModel)
{
%client.weapon = %weapon;
%client.sidearm = %sidearm;
%client.specItem = %specItem;
%client.playerModel = %playerModel;
}
then in createPlayer just use those values to assign the appropriate weapon, player model, etc.
07/17/2006 (2:59 pm)
I use a commandToServer to send the player's loadout choices to the server, then I assign them to dynamic values in the server's gameConnection object for that player. When the player spawns, it just checks to seewhich player model, weapon, sidearm, and 'special item' that they chose to spawn with from the GUI.
This code is not complete, you will definitely want to make sure the player does not choose anything you
don't want them choosing (tankTurretImage, etc).
function serverCmdChooseLoadout(%client, %weapon, %sidearm, %specItem, %playerModel)
{
%client.weapon = %weapon;
%client.sidearm = %sidearm;
%client.specItem = %specItem;
%client.playerModel = %playerModel;
}
then in createPlayer just use those values to assign the appropriate weapon, player model, etc.
Torque Owner Matt Vitelli