Posted by: Endif - Tuesday, January 7, 2020 4:57:17 AM
I am making a multiplayer only map (no Skirmish or singleplayer) How do I go about having one script's 'Transfer all assets' action only effect one player and not the other? How do I determine which player it is?

Posted by: SkyMix_RMT - Tuesday, January 7, 2020 4:10:31 PM
If you want to transfer assets to a human player you have to use playerX, replace X with the number of the player in the lobby and subtract one. The host is player0 the second person is player1, etc. last player in lobby (if 8 player game) will be player7. World builder will say "playerX" does not exist but it's normal and should work.

Posted by: Endif - Tuesday, January 7, 2020 4:38:25 PM
Thank you for that information! I also can't seem to figure out the folders in the script window. How come only scripts under PlyrCivilian run for the human players? I tried creating new human players in the players list, but they do nothing when I put a script in the folder. Any guidance would be helpful, thank you!

Posted by: Endif - Wednesday, January 8, 2020 4:51:38 AM
So I can get the units to transfer from player0 control to PlyrCivilian, but I can't get them to transfer back? PlyrCivilian transferred to player0. Why will it not transfer back?

Posted by: AdrianeMapMaker - Thursday, January 9, 2020 1:47:12 AM
you can transfer a individual unit to any player - PlyrCivilian can transfer unit to Player0 and vice versa. Theres a transfer a team script but it doesnt work on PlyrCivilian to any player only player to player, if i may recall correctly.

Posted by: Endif - Thursday, January 9, 2020 2:21:50 AM
I've gotten "Transfer all assets to PlyrCivilian" to work. It transfers all units and buildings to PlyrCivilian, but it doesn't work vice versa. I've tried creating my own CPU controlled player in the player list, still works only the one way, not the other. Any ideas?

Posted by: AdrianeMapMaker - Thursday, January 9, 2020 6:34:19 AM
ah you mean that script - yes it wont work on player civilian to player. if script doesnt work it just dont work.

Posted by: i^love^mixery - Thursday, January 9, 2020 12:54:15 PM
[quote=Endif;149396]I've gotten "Transfer all assets to PlyrCivilian" to work. It transfers all units and buildings to PlyrCivilian, but it doesn't work vice versa. I've tried creating my own CPU controlled player in the player list, still works only the one way, not the other. Any ideas?[/quote] Why do you want to transfer stuff to PlyrCivilian? What exactly are you trying to do? You cannot create a new, fully capable Player in the Player List and use it. It will have a lot less functionality than an actual player. For this use-case you should create and use a CPU slot. So put another start position somewhere off-border, create for example SkirmishGLA, then add scripts for SkirmishGLA and host the map with SkirmishGLA aswell. Like this you can transfer any stuff you want to player SkirmishGLA.

Posted by: Endif - Friday, January 10, 2020 3:37:13 PM
So I'm trying to effectively create a turn based map. I can't pause the game or freeze it, so I was thinking to just transfer all assets from the player who's turn it is not and have the CPU do absolutely nothing with the units. That way, the player is unable to control their units while it's the other players turn. I appreciate the information, I'll have to check it out when I get back to the computron.

Posted by: i^love^mixery - Friday, January 10, 2020 5:19:40 PM
You cannot transfer all of a humans stuff to a different player because that will instantly have him lose the game, as he owns no buildings. However, there is a 100% failsafe method to prevent any player(s) from being able to do anything. Disabled players will still be finishing to produce all the units in their factorie's queues tho. Let me know if you are interested.

Posted by: Endif - Friday, January 10, 2020 7:48:50 PM
Absolutely interested. Thanks!

Posted by: i^love^mixery - Monday, January 13, 2020 8:39:10 AM
Will try to send you an example map later today.

Posted by: i^love^mixery - Monday, January 13, 2020 8:40:47 PM
This took way longer than I would like to admit because while creating a test map for this issue I stumbled across the most hardcore, most annoying, most inconsistent game bug that turned out to be caused by gentool in the end and not by the scripts that do the very thing that this bug breaks, the odds for that happening are astronomically, unimagenably low. Can't even put this into words. Whatever. Full story for anybody who cares: [url]https://www.gamereplays.org/community/index.php?showtopic=1031963[/url] Anyway, in the attachement you will find what you seek. If one player moves his dozer into zone "1", the other player will be deactivated. If he moves his dozer into zone "2", the other player will be activated again. As I said earlier, production queue will still be executed. If you don't understand how and why the scripts are working the way they do and really want to understand, read this topic: [url]http://www.cnclabs.com/forums/cnc_postsm147801_The-logic-behind--Local-Player--explained-and-how-to-use-it-in-Multiplayer.aspx[/url] [ATTACH]2289[/Attach]

Posted by: AdrianeMapMaker - Tuesday, January 14, 2020 7:31:27 AM
thats why i prefer testing my maps on vanilla without gentool - gentool also tends to crash maps with map.ini (reason not yet found)

Posted by: i^love^mixery - Tuesday, January 14, 2020 10:27:41 AM
I am not interested in maps that are incompatible with gentool. And we already played maps with the most complicated ini files imaginable without any problems using Gentool. If you really have issues with certain ini files, I'd advice you report problems to Xezon here: https://www.gamereplays.org/community/index.php?showforum=4335

Posted by: Endif - Tuesday, January 14, 2020 4:37:48 PM
Awesome, thanks! I'll have to check it out.