Author |
Message |
Collective
Joined: Wed Mar 03, 2010 11:29 pm Posts: 122
|
Buying enemy soldiers
I was wondering if it would be possible to set up a buy list where everything on the list was green team in-game. That is, when you buy a soldier from the list, it is on the opposite team as you. It would be funny in certain scenarios.
So anyways is this possible, and how would I do it?
|
Thu Apr 08, 2010 3:17 am |
|
|
linkfan23
Joined: Sun Oct 11, 2009 4:48 am Posts: 133
|
Re: Buying enemy soldiers
I imagine it would require an actor with a Lua script attached that would, upon entering the battlefield, change it's team to the opposing team. This may not work though because I think changing teams via Lua is pretty wonky right now.
|
Thu Apr 08, 2010 4:27 am |
|
|
LowestFormOfWit
Joined: Mon Oct 06, 2008 2:04 am Posts: 1559
|
Re: Buying enemy soldiers
All the script would have to do is destroy anything your ordered immediately and replace it with an identical order for green team entering the field.
This is actually, a very cool idea.
|
Thu Apr 08, 2010 4:49 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Buying enemy soldiers
Or, if you're less picky, luaspawn actors on the green team. Something like the Clone Tube could be modified to produce green actors, with random weapons, on demand, quite easily.
|
Thu Apr 08, 2010 4:54 am |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
Re: Buying enemy soldiers
Can't you set the team in the ini? I remember being able to. You just need to CopyOf them with an additional line to set the team if I'm correct.
|
Thu Apr 08, 2010 12:03 pm |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Buying enemy soldiers
Yes, but if you buy them regularly, it will still set the team to the team of the player.
|
Thu Apr 08, 2010 2:41 pm |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
Re: Buying enemy soldiers
Ah. Okay. If you were still determined to use .ini only, you could probably add the team set actors as gibs to a throwable bomb.
|
Thu Apr 08, 2010 3:37 pm |
|
|
Lizardheim
DRL Developer
Joined: Fri May 15, 2009 10:29 am Posts: 4107 Location: Russia
|
Re: Buying enemy soldiers
Wouldn't a bunkermodule that just takes every newly spawned object and turns them and their contents into green team work best?
|
Thu Apr 08, 2010 10:44 pm |
|
|
whitty
Joined: Sat Jun 16, 2007 2:31 am Posts: 2982 Location: Texas
|
Re: Buying enemy soldiers
You mean this? Code: AddActor = ACRocket/ACDropship CopyOf = Rocket MK1 PresetName = Rocket MK1 - Team 2 AddToGroup = Crafts AddInventory = AHuman CopyOf = Green Clone Team = 1 AddInventory = HDFirearm CopyOf = SMG
|
Thu Apr 08, 2010 10:52 pm |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: Buying enemy soldiers
couldn't you just hook any new crafts and turn them and their contents to the opposite team? ie iterate through a table full of craft pointers, and then for every craft on the map check if they exist in the list, if not add them to it and do the flip. would require smart use of the inventory handler script but would be pretty easy.
IE what lizard said, but not a bunkermodule because those are terrain and thus can't be scripted.
|
Fri Apr 09, 2010 12:36 am |
|
|
Lizardheim
DRL Developer
Joined: Fri May 15, 2009 10:29 am Posts: 4107 Location: Russia
|
Re: Buying enemy soldiers
A pinned null mosr with script attached?
|
Fri Apr 09, 2010 8:31 am |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: Buying enemy soldiers
Also possible, but you dont get the added bonus of having your controls etc handled by the engine, for aiming and the like.
|
Fri Apr 09, 2010 9:03 am |
|
|
|