View unanswered posts | View active topics It is currently Sun Sep 29, 2024 12:45 am



Reply to topic  [ 12 posts ] 
 Buying enemy soldiers 
Author Message

Joined: Wed Mar 03, 2010 11:29 pm
Posts: 122
Reply with quote
Post 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
Profile
User avatar

Joined: Sun Oct 11, 2009 4:48 am
Posts: 133
Reply with quote
Post 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
Profile
User avatar

Joined: Mon Oct 06, 2008 2:04 am
Posts: 1559
Reply with quote
Post 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
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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
Profile
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post 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
Profile WWW
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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
Profile
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post 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
Profile WWW
DRL Developer
DRL Developer

Joined: Fri May 15, 2009 10:29 am
Posts: 4107
Location: Russia
Reply with quote
Post 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
Profile
User avatar

Joined: Sat Jun 16, 2007 2:31 am
Posts: 2982
Location: Texas
Reply with quote
Post 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
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post 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
Profile WWW
DRL Developer
DRL Developer

Joined: Fri May 15, 2009 10:29 am
Posts: 4107
Location: Russia
Reply with quote
Post Re: Buying enemy soldiers
A pinned null mosr with script attached?


Fri Apr 09, 2010 8:31 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post 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
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 12 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.048s | 13 Queries | GZIP : Off ]