Private Joined: 1/5/2020(UTC) Posts: 8
|
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?
|
|
|
|
Major Joined: 2/21/2015(UTC) Posts: 386 Thanks: 80 times Was thanked: 132 time(s) in 96 post(s)
|
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. |
|
|
|
|
Private Joined: 1/5/2020(UTC) Posts: 8
|
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! Edited by user Tuesday, January 7, 2020 4:38:56 PM(UTC)
| Reason: Not specified
|
|
|
|
Private Joined: 1/5/2020(UTC) Posts: 8
|
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?
|
|
|
|
General Joined: 3/8/2016(UTC) Posts: 1,156 Thanks: 312 times Was thanked: 185 time(s) in 149 post(s)
|
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. |
|
|
|
|
Private Joined: 1/5/2020(UTC) Posts: 8
|
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?
|
|
|
|
General Joined: 3/8/2016(UTC) Posts: 1,156 Thanks: 312 times Was thanked: 185 time(s) in 149 post(s)
|
ah you mean that script - yes it wont work on player civilian to player. if script doesnt work it just dont work. |
|
|
|
|
Colonel Joined: 10/13/2008(UTC) Posts: 782
Thanks: 7 times Was thanked: 201 time(s) in 147 post(s)
|
Originally Posted by: Endif 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? 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.
|
|
|
|
Private Joined: 1/5/2020(UTC) Posts: 8
|
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.
|
|
|
|
Colonel Joined: 10/13/2008(UTC) Posts: 782
Thanks: 7 times Was thanked: 201 time(s) in 147 post(s)
|
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. Edited by user Friday, January 10, 2020 5:20:15 PM(UTC)
| Reason: Not specified
|
|
|
|
Private Joined: 1/5/2020(UTC) Posts: 8
|
Absolutely interested. Thanks!
|
|
|
|
Colonel Joined: 10/13/2008(UTC) Posts: 782
Thanks: 7 times Was thanked: 201 time(s) in 147 post(s)
|
Will try to send you an example map later today.
|
|
|
|
Colonel Joined: 10/13/2008(UTC) Posts: 782
Thanks: 7 times Was thanked: 201 time(s) in 147 post(s)
|
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: https://www.gamereplays.org/comm...ex.php?showtopic=1031963Anyway, 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: http://www.cnclabs.com/forums/c...e-it-in-Multiplayer.aspxEdited by user Tuesday, January 14, 2020 5:02:18 AM(UTC)
| Reason: Not specified
|
|
|
|
General Joined: 3/8/2016(UTC) Posts: 1,156 Thanks: 312 times Was thanked: 185 time(s) in 149 post(s)
|
thats why i prefer testing my maps on vanilla without gentool - gentool also tends to crash maps with map.ini (reason not yet found) |
|
|
|
|
Colonel Joined: 10/13/2008(UTC) Posts: 782
Thanks: 7 times Was thanked: 201 time(s) in 147 post(s)
|
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....index.php?showforum=4335
|
|
|
|
Private Joined: 1/5/2020(UTC) Posts: 8
|
Awesome, thanks! I'll have to check it out.
|
|
|
|
Users browsing this topic |
Guest
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.