Team Switching (different than the others)
Author |
Message |
Frostilicus
Joined: Fri Jul 31, 2009 4:11 am Posts: 42
|
Team Switching (different than the others)
My idea is to work around the current problem with team switching by using an attachable (helmet, chestpiece, whatever) that forces the teamswitch. Like a mind-control helmet, neh? As the actor is killed, the "mind-control" is removed first so the team is reverted back to its creation. I would work on it now but I don't have my computer (on my phone) and I couldn't seem to get the team-switch code working correctly anyway. Just something I'll need to spend more time on, unless someone jumps on it first.
|
Sun Jun 13, 2010 7:10 am |
|
|
PhantomAGN
Joined: Mon Jun 29, 2009 2:40 am Posts: 610 Location: Deep below The Map of Mars
|
Re: Team Switching (different than the others)
When you say force, what do you even mean? I honestly fail to understand what you are trying to suggest. A replacement AI in a hat?
|
Sun Jun 13, 2010 8:11 am |
|
|
Frostilicus
Joined: Fri Jul 31, 2009 4:11 am Posts: 42
|
Re: Team Switching (different than the others)
Not a replacement AI in a hat, more of a whoever's wearing the hat is forced to the opposing team as long as the hat exists. So let's say, you fire a weapon, which hits an enemy, and a Lua script kicks in, adding the hat as an attachment to the target, and the hat has a Lua script behind it to set the enemy's team to yours for as long as it is both in existence and on the enemy's head.
|
Sun Jun 13, 2010 11:24 am |
|
|
Laraso
Joined: Sun Feb 21, 2010 10:40 pm Posts: 97
|
Re: Team Switching (different than the others)
The problem with what you just described is that for all I know, not only would this affect the MOIDs but (I have run across this problem myself when attempting to create a team switching gun) you would not be able to control the actor you converted even if his HP indicator appears to be the same color as your team, unless he was already on your team originally.
I have also found that when you make an enemy soldier (or even your own soldier) switch teams, if they (or you) select them again they switch back to their original team, unless they were already selected when they teamswitched. I do not know if this would still apply if you did this using an attachable, however. It may cause crashes for all I know, team switching is very unstable from my experiences with it.
Another problem that I would suspect would interfere with this is that when you add a function Destroy(self) to an attachable, it does not activate until the attachable itself is destroyed, which in this case would only get destroyed if the original actor it was placed on dies. This means that by the time the attachable ran the script to change the actor back to the other team, the actor would already be dead.
EDIT: The below marked out statement is invalid as I was not considering that a function Destroy(self) would fix this.
Yet another problem I foresee would be actors whose ACTUAL head (not fake attachable ones) can be blown off. I made an actor who doesn't use an invisible head with a fake head attachable, his actual head can be blown off. If you used this method and added a hat to him, and his head was blown off, the hat would be gone but he would still be alive and on the other team. You would have to make it an attachable that goes on the torso, the only thing that you truly need for an actor to live.
Also, I would not know what would happen if you shoot an actor with a weapon that adds an attachable which switches him to the green team, but then you shoot him with a weapon that adds an attachable that switches him back to the red team. Now, you have two different attachables on him telling him to be both on the red and green team. What would happen?
I'm just stating what the problems that I would foresee with this. Otherwise, if people could get this to work, this would make me very happy, as I could fix my current team switching guns.
|
Sun Jun 13, 2010 10:21 pm |
|
|
Frostilicus
Joined: Fri Jul 31, 2009 4:11 am Posts: 42
|
Re: Team Switching (different than the others)
I was thinking about it myself when I saw your posts.... It's what got me onto the idea of the attachable to do it.
What if, instead of switching the team of the actor, we did a gibless destroy, followed immediately by a copy of the actor and all the items carried, attachables worn, etc? Maybe throw on another attachable that when destroyed, does another gibless destroy and recopies the actor back to the original team?
May end up being an ugly workaround for the current team switching problems, but at least you could steal an enemy unit at full life :) Speaking of which.... I wonder what would happen if you copied a player that had lost all its limbs.... Does an actor created with no limbs bleed to death, or would you have Torso-Man, the Infraggable, who does naught but bark orders from his hidey hole of depression?
|
Mon Jun 14, 2010 12:43 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Team Switching (different than the others)
We don't have control of attachables enough to duplicate one identically.
The best you could do, with hacky workarounds, is replace the old actor with another one with the same presetname (but all of its limbs, and with no wounds) and the same health. There's inordinately hacky ways to get inventory semi-reliably, but nothing works perfect.
And even then, you've hardly accomplished the goal.
Why is team switching so important?
|
Mon Jun 14, 2010 3:04 am |
|
|
Laraso
Joined: Sun Feb 21, 2010 10:40 pm Posts: 97
|
Re: Team Switching (different than the others)
Frostilicus wrote: I was thinking about it myself when I saw your posts.... It's what got me onto the idea of the attachable to do it. What if, instead of switching the team of the actor, we did a gibless destroy, followed immediately by a copy of the actor and all the items carried, attachables worn, etc? Maybe throw on another attachable that when destroyed, does another gibless destroy and recopies the actor back to the original team? May end up being an ugly workaround for the current team switching problems, but at least you could steal an enemy unit at full life Speaking of which.... I wonder what would happen if you copied a player that had lost all its limbs.... Does an actor created with no limbs bleed to death, or would you have Torso-Man, the Infraggable, who does naught but bark orders from his hidey hole of depression? Yes, that would work, but it wouldn't really be switching the actors team. When you use the method you described, you can still copy all of the weapons and such over from the old actor, but the new actor regains full health and all limbs lost. Also, any weapons that were not fully loaded or weapons that were damaged will be repaired and reloaded. You can see this happen on witty's Brain Unit, when you press X to turn into a brain crab. And if you used that method, adding an extra attachable would not be necessary, as the method you described would not cause any crashes as the unit would have originally belonged to the team it was on when it died. Also, if you used that method on an actor that spawns with weapons (i.e. numguns Zorneous), it would copy those weapons to the next actor and spawn him with the weapons, so he would have twice of those weapons than he did before. In short, it would work, but there are limitations to it. Here is something that allows you to use enemy units on the other team, however it doesn't actually convert anything you shoot to a different team. http://forums.datarealms.com/viewtopic.php?f=61&t=14621&start=15This could help possibly in creating a team switching gun, but I do not know how much it would help, if at all. EDIT: Grif posted before I did and made some of my post redundant. @Grif: Team switching is important because its cool and would be a fun thing to have around. There should NOT have to be any other reason why some of us want to be able to switch the teams of actors.
|
Mon Jun 14, 2010 3:05 am |
|
|
Frostilicus
Joined: Fri Jul 31, 2009 4:11 am Posts: 42
|
Re: Team Switching (different than the others)
Well, the reason for the attachable would be for a multiplay situation. My guy's been hit by the pseudo-swapper, but I want him back, so I use a sniper to target the attachable and get him back. And I know it's not true team swapping, but it is a possible workaround.
Oh, and the mind control gun isn't a terrible example. Just that I'd like 'im to be red hearted and able to switch back without having to worry he'll come back to haunt me.
|
Mon Jun 14, 2010 7:25 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Team Switching (different than the others)
I still don't even understand what you're trying to say.
No one, no matter how good their grasp of lua, is going to magically create an attachable that mystically switches the team of an actor.
Not without it being crash-prone, anyways.
The mind control gun's the best you're likely to get, unless you really want the shitty alternative I already detailed.
|
Mon Jun 14, 2010 9:49 pm |
|
|
Laraso
Joined: Sun Feb 21, 2010 10:40 pm Posts: 97
|
Re: Team Switching (different than the others)
Grif wrote: I still don't even understand what you're trying to say.
No one, no matter how good their grasp of lua, is going to magically create an attachable that mystically switches the team of an actor.
Not without it being crash-prone, anyways.
The mind control gun's the best you're likely to get, unless you really want the shitty alternative I already detailed. That's why we are discussing the alternatives. We are thinking of different ideas that could help get around this problem, we aren't discussing how it isn't possible, like you are. I know I don't have the authority to tell you this, but please refrain from posting in this thread, as all you say is how this isn't possible and how any alternative is quote: "shitty".
|
Tue Jun 15, 2010 3:16 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Team Switching (different than the others)
Yes, you are certainly posting different ideas of how to get around the problem.
However, I'm posting why your ways of getting around the problem fail to get around the problem.
If you'd like to have a useless little circlejerk, though, be my guest.
Call me back if you succeed in doing anything more than, and I quote: "thinking of different ideas"
|
Tue Jun 15, 2010 3:20 am |
|
|
Frostilicus
Joined: Fri Jul 31, 2009 4:11 am Posts: 42
|
Re: Team Switching (different than the others)
Part of the reason for this topic is more to get more ideas, more people thinking about the problem, and more input into the problem and why it is a problem. Maybe they don't, but I do want to read your nay-typing. I want to know the current reasons the game doesn't want this happening and why it goes into a hissy fit before going back to its room whenever you try it. But really, I'll read your posts and try it myself, look at it crossly, and try to tweak it here and there. It's what I do at my job, and it's what I like to do. So don't stop with the saying this fails because of that or that fails because of this. I do want to see it. I would prefer people didn't flame you for it though....
|
Tue Jun 15, 2010 8:14 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Team Switching (different than the others)
Hey, alright, thanks for being pretty cool about it.
Anyways, just plain old team switching isn't going to work because of the way the game engine handles actors. I can only assume that some number of different bits of memory that the game keeps track of are set when an actor is created, and they don't get properly updated when you switch teams with lua (because the engine has no actual code to switch teams). This leads to the instability.
Working around this by duplicating actors doesn't work (mostly) because of the problems with getting all the inventory, attachables, wounds, and health synced up. Health is super easy. Inventory is possible, but a bit of a pain. Wounds are flat out impossible, although attachables are sort of possible.
So, yes, you could swap out an actor for another one. It wouldn't the most complicated lua ever created. But, if you had any bleeding wounds, they'd stop bleeding.
Hmm, actually, thinking about it, I suppose it really isn't that much of a dealbreaker.
|
Tue Jun 15, 2010 8:42 am |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: Team Switching (different than the others)
you could use a pseudo-attachable (like an antenna or something on the head) that stores what team it was and what actor it's meant to be "controlling", and forces its team to be the opposite, and have it's destroy function be reverting it to the proper team again. Could work, unless I'm missing the point of this?
|
Tue Jun 15, 2010 11:06 am |
|
|
Laraso
Joined: Sun Feb 21, 2010 10:40 pm Posts: 97
|
Re: Team Switching (different than the others)
Yes, that would work, but if the actor died before you pressed the attachables destroy key then the game would still crash.
|
Tue Jun 15, 2010 3:19 pm |
|
|
|
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
|
|