stegman 3 Posted August 6, 2007 Hi lads, I have a few questions about 'playable' units. Lets say that I have three 'playable' units; Rifleman Squad leader Officer The player will start as a rifleman and when his points reach a certain level he will be promoted to 'Squad Leader' and then to 'Officer'. How do I prevent the player from using the other units, and then force the player to be one of those units when the time is right? Also can this new playable unit retain the ammo, name and score of the last? Share this post Link to post Share on other sites
Tactician 0 Posted August 6, 2007 Don't set the squad leader and officer to playable at first, but name them. Then, when it's time to make one of the playable, use this: http://community.bistudio.com/wiki/setPlayable To force a change, use this: http://community.bistudio.com/wiki/selectPlayer Or, if you don't want them to be able to switch back, you might be able to skip the setPlayable command and just switch them, then delete the previous unit. Share this post Link to post Share on other sites
stegman 3 Posted August 6, 2007 Don't set the squad leader and officer to playable at first, but name them.Then, when it's time to make one of the playable, use this: Â http://community.bistudio.com/wiki/setPlayable To force a change, use this: Â http://community.bistudio.com/wiki/selectPlayer Or, if you don't want them to be able to switch back, you might be able to skip the setPlayable command and just switch them, then delete the previous unit. Great! Thanks for that. What about the gear. Any ideas on that? Share this post Link to post Share on other sites
KilJoy -SFG- 0 Posted August 10, 2007 Using this method the identity will not be transfered properly. Just like the sarani virus (zombie) map. Theres no simple way to transfer identity. In MP the only time a player can transfer to a new type of character with there name + face intact is during a group respawn game when they switch to another unit in there group when they die. You can not get the number of magazines in a players inventory so you can not transfer them to a new character. You could find his weapons tho. These are the reasons there are no proper career paths and inventory restoration on death in evolution btw. Share this post Link to post Share on other sites
KaRRiLLioN 0 Posted August 10, 2007 You can actually find the magazines as well. It's an array, i.e. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">magazines player will return the magazines for the weapons. You can also find the amount of ammo in each currently loaded magazine as well: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player ammo "weapon" You're correct about identity. There might be a way to work around it, but when I made Sarani Virus, I didn't really try to figure out how to transfer identity since I wanted dead players inhabiting zombie bodies. It might be possible to set the mission to group respawn. Then when the game starts, create a zombie group member for each player and set them to playable. Then when a player dies, they'll respawn into the zombie. Or you could possibly create the new zombie group member and set it to playable the second the player dies, and then the game might transfer the virtual soul into the new group member. That way you'd preserve identity. It'd take some messing around, but it might work. Share this post Link to post Share on other sites
KilJoy -SFG- 0 Posted August 10, 2007 @KaRRiLLioN thanks for the mag info ill look into that " Or you could possibly create the new zombie group member and set it to playable the second the player dies, and then the game might transfer the virtual soul into the new group member. That way you'd preserve identity. It'd take some messing around, but it might work." I tried this method but you can never add the new unit to the group fast enough even when using a killed event handler. Also in my case it messes up the whole dynamic group system to use group respawn unless you can add the new unit at the point of death. If only setIdentity worked in MP we wouldn't have to faff around with buggy tricks. Anyway As it is it works fine for Sahrani virus, I wasent knocking your lack of persistence, just using it as a reference. Great mission. Share this post Link to post Share on other sites
kronzky 5 Posted August 10, 2007 This should be discussed in the "MISSION EDITING & SCRIPTING" forum. Moving... Share this post Link to post Share on other sites
Synide 0 Posted August 11, 2007 @ Aug. 11 2007,10:24)]Using this method the identity will not be transfered properly. Just like the sarani virus (zombie) map. Theres no simple way to transfer identity. In MP the only time a player can transfer to a new type of character with there name + face intact is during a group respawn game when they switch to another unit in there group when they die.You can not get the number of magazines in a players inventory so you can not transfer them to a new character. You could find his weapons tho. These are the reasons there are no proper career paths and inventory restoration on death in evolution btw. That's not entirely accurate... i did manage to get mp player switching working at one point a month or so back, but got side tracked onto other stuff... atm i'm snowed under and for the life of me i can't quite remember verbatim what tweaks i had too do... the method was essentially 'add/removeSwitchableUnit', had some locality issue that i had to scoot around and 'selectPlayer'... give it another try... i'm sure you can get it working... if you get really stuck pm me and i can possibly revist this next weekend... Share this post Link to post Share on other sites
whisper 0 Posted August 14, 2007 @ Aug. 11 2007,10:24)]Using this method the identity will not be transfered properly. Just like the sarani virus (zombie) map. Theres no simple way to transfer identity. In MP the only time a player can transfer to a new type of character with there name + face intact is during a group respawn game when they switch to another unit in there group when they die.You can not get the number of magazines in a players inventory so you can not transfer them to a new character. You could find his weapons tho. These are the reasons there are no proper career paths and inventory restoration on death in evolution btw. That's not entirely accurate... i did manage to get mp player switching working at one point a month or so back, but got side tracked onto other stuff... atm i'm snowed under and for the life of me i can't quite remember verbatim what tweaks i had too do... the method was essentially 'add/removeSwitchableUnit', had some locality issue that i had to scoot around and 'selectPlayer'... give it another try... i'm sure you can get it working... if you get really stuck pm me and i can possibly revist this next weekend... You can change to another unit, even in MP, simply by using selectPlayer. But strangely units locality is not transfered when doing so, so caracter behavior is still controlled by the server (if the unit was not previously in your own squad). You move around, but the server replace you almost instantly to where you were before moving. To transfer locality, you'll need to first explicitly transfert it by making the target unit join player's group (thus becoming local to player's PC), then use selectPlayer to transfer player to target unit, and make the new player join the correct group again. But you'll still run into identity issues, as player will have the original target unit's identity (name, voice, etc...) If you want to re-create on the fly all the target unit's environnement (weapons, group, etc..) I guess many informations may be lost, like the current behavior and actions, the knowsAbout list for the group, things like that. OTOH it's prolly the only way to transfer identity. A matter of choice. Share this post Link to post Share on other sites
stegman 3 Posted August 14, 2007 So, it could be done in SP? If I place the rifleman, squad leader and officer and setidentity all the same, remove the players weapon before promotion, the player will notice nothing exept the model/character change? Share this post Link to post Share on other sites
stegman 3 Posted August 31, 2007 Found it. You can "saveidentiy" and "loadidentity". So I could save ID, spawn a new character, load ID, Force switch over and delete the old unit. Hoorah! Share this post Link to post Share on other sites
TeRp 1 Posted January 15, 2008 Any news regarding Identity transfer in MP games yet? I'd like to use it in a mission, but I simply can't even transfer the units name and I'm curious if somebody may have found a way to do it yet.. Share this post Link to post Share on other sites