Endif
  • Endif
  • 50.25% (Neutral)
  • Private Topic Starter
6 years ago
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?
Sponsor
SkyMix_RMT
6 years ago
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.
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord 
Endif
  • Endif
  • 50.25% (Neutral)
  • Private Topic Starter
6 years ago
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!
Endif
  • Endif
  • 50.25% (Neutral)
  • Private Topic Starter
6 years ago
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?
AdrianeMapMaker
6 years ago
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.
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




Endif
  • Endif
  • 50.25% (Neutral)
  • Private Topic Starter
6 years ago
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?
AdrianeMapMaker
6 years ago
ah you mean that script - yes it wont work on player civilian to player. if script doesnt work it just dont work.
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




i^love^mixery
6 years ago

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?

Originally Posted by: Endif 



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.
Endif
  • Endif
  • 50.25% (Neutral)
  • Private Topic Starter
6 years ago
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.
i^love^mixery
6 years ago
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.
Endif
  • Endif
  • 50.25% (Neutral)
  • Private Topic Starter
6 years ago
Absolutely interested. Thanks!
i^love^mixery
6 years ago
Will try to send you an example map later today.
i^love^mixery
6 years ago
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/community/index.php?showtopic=1031963 



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:

http://www.cnclabs.com/forums/cnc_postsm147801_The-logic-behind--Local-Player--explained-and-how-to-use-it-in-Multiplayer.aspx    Freeze_Unfreeze_Test2.zip (7kb) downloaded 17 time(s).
AdrianeMapMaker
6 years ago
thats why i prefer testing my maps on vanilla without gentool - gentool also tends to crash maps with map.ini (reason not yet found)
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




i^love^mixery
6 years ago
I am not interested in maps that are incompatible with gentool.

https://www.gamereplays.org/community/index.php?showforum=4335 
Endif
  • Endif
  • 50.25% (Neutral)
  • Private Topic Starter
6 years ago
Awesome, thanks! I'll have to check it out.