Page 1 of 1

Make kits pickable by only one team

Posted: Mon Nov 27, 2017 6:48 am
by Diamondback
So I've tried making kits that can only be picked by one team.

The basic goal is to have the kit spawn a PCO which surrounds it at all times. One team has a deathbubble add templated to them at all times allowing them to destroy the protective PCO that the kit spawns in order to pick it up. The other team has no deathbubble add templated to their soldiers so they cannot have access to the kit.

This has been tried in practice. The result is a CTD when picking up the kit with an add templated PCO.

So it seems PCOs themselves cannot be added to the kit directly but to kit parts rather.

Does anyone have a solution to add an object that would block the access to one team only?

Re: Make kits pickable by only one team

Posted: Wed Nov 29, 2017 2:46 am
by Swaffy
Make a chair (visible mesh) into a PCO and use teamOnVehicle on its spawner to set the team, human player enters PCO and "fires". The projectile contains an object spawner that spawns the weapon kit. Profit?
You can add other FireArms with different keys for setInputFire so you can spawn other kits, if you want that. You can even use PIMenuSelect1 (through 6).

Maybe give the chair a texture that is unique so you can tell it is meant to spawn kits.

Re: Make kits pickable by only one team

Posted: Wed Nov 29, 2017 6:19 pm
by Diamondback
Swaffy wrote:Make a chair (visible mesh) into a PCO and use teamOnVehicle on its spawner to set the team, human player enters PCO and "fires". The projectile contains an object spawner that spawns the weapon kit. Profit?
You can add other FireArms with different keys for setInputFire so you can spawn other kits, if you want that. You can even use PIMenuSelect1 (through 6).

Maybe give the chair a texture that is unique so you can tell it is meant to spawn kits.
Good idea but when the kit is spawned from the projectile, it can still be picked up by both teams right?

Re: Make kits pickable by only one team

Posted: Fri Dec 01, 2017 1:21 am
by freddy
First if you block the kit with some object (building) that stop every team from reaching it.

Then you can use a vehicle (dummy) that only one team can enter.

Then you can set the
"ObjectTemplate.setSoldierExitLocation -1.5/0/-0.8 0/0/0" to match the coordinates where the kit is

Dunno what you need it for, but that was all i could come up with right now.

Re: Make kits pickable by only one team

Posted: Fri Dec 01, 2017 4:52 am
by Diamondback
freddy wrote:First if you block the kit with some object (building) that stop every team from reaching it.

Then you can use a vehicle (dummy) that only one team can enter.

Then you can set the
"ObjectTemplate.setSoldierExitLocation -1.5/0/-0.8 0/0/0" to match the coordinates where the kit i
Dunno what you need it for, but that was all i could come up with right now.
Again, when the soldier from the team that gets the kit dies after having picked up the kit, the kit can still be picked up by the opposite team. I think the only solution is to add template a death bubble to a kit part that affects only one team, but this is a bit extreme IMO.

Re: Make kits pickable by only one team

Posted: Fri Dec 01, 2017 11:55 pm
by Swaffy
Maybe you can use the Hold command on the spawner? I never tried that. Then have the kit fall through the world. My BGA program isn't starting (until I restart my PC then it will run) but I can provide the line that causes kits to fall through map

Re: Make kits pickable by only one team

Posted: Sat Dec 02, 2017 11:24 pm
by Diamondback
Swaffy wrote:Maybe you can use the Hold command on the spawner? I never tried that. Then have the kit fall through the world. My BGA program isn't starting (until I restart my PC then it will run) but I can provide the line that causes kits to fall through map
There is a command that causes kits to fall through the map? Interesting. I'd like to know what it is!

Re: Make kits pickable by only one team

Posted: Sun Dec 03, 2017 6:49 am
by freddy
Apache Thunder discovered it, i think it was "ObjectTemplate.hasCollisionPhysics 0" or "ObjectTemplate.hasResponsePhysics 0"

It is mentioned in some thread on this forum.