Posted by: Ramadan - Thursday, October 6, 2022 6:58:49 PM
Hello everyone, I have a problem and I hope you can help me to solve it... And the problem is, When I create a spawn for any tank on the map using scripts, I cannot make it belong to a specific army.. All I want to know is how to make any tank that I download in the map through scripts is for a specific army, which I select..For example, if I have a map with 4 players and I want to put a tank in the map for a specific player, I can't do that. i hope u help me guys <3

Posted by: UTD^Force - Thursday, October 6, 2022 8:13:48 PM
Simply go to [h]scripts > new script > actions if true > player > transfer > transfer a specific unit...[/h] This is how an example script looks like: [code=csharp]*** IF *** True. *** THEN *** [???] Unit 'OverlordCHEATmap' is transferred to the command of Player 'player0'[/code] Don't worry about the question marks, as player0 is not defined in the edited multiplayer map, but will be assigned in game after applying the multiplayer/skirmish scripts. Basically, player0 is the host, and it goes from player0 to player7. If you want to spawn a unit then transfer it and the transfer doesn't work in a single script, try to set up a timer for another script to transfer ownership of the spawned unit(s). If my memory isn't betraying me, you need to place these scripts in the player 'PlyrCivilian' folder after adding skirmish players from the player list for the scripts to work in a multiplayer game... It's been ages since I last made a map so I'm not sure. Do not hesitate to ask for further assistance and welcome to our community.

Posted by: Ramadan - Friday, October 7, 2022 1:28:16 AM
thx bro but i still cant do it look i do it like this i make a waypoint like this...opne photo https://ibb.co/rZcnb5f than i make timer script like this open photo https://ibb.co/YkcdQkq and i make spwan scriptlike this open photo https://ibb.co/nzy5GLt but after i did all this when dozer is spwan He does not belong to any team sry if my eng bad <3 i hope u answer me

Posted by: UTD^Force - Friday, October 7, 2022 6:21:45 AM
Do you have waypoints for the players to start the game into? For multiplayer maps you need to have waypoints called [color=blue]'Player_X_Start'[/color] where [color=blue]X=1-8[/color] If not, then place two waypoints then use the dropdown menu from the waypoint window and choose Player_1_Start and Player_2_Start. Another thing, what I meant was, try spawning the dozer and setting up a timer in the first script, then use another script to transfer. Here the two example scripts I made: [quote]Script #1: *** IF *** True. *** THEN *** [???]Spawn Unit 'dzr' of type 'AmericaVehicleDozer' on Team 'teamPlyrCivilian' at waypoint Waypoint 'spawnhere' Set timer 'tran' to expire in 0.50 seconds. ----------------------------------------------------- Script #2: *** IF *** Timer 'tran' has expired. *** THEN *** [???] Unit 'dzr' is transferred to the command of Player 'player0'[/quote]

Posted by: UTD^Force - Friday, October 7, 2022 6:30:52 AM
Here is an example map, try it then check the scripts. [ATTACH]2352[/Attach]

Posted by: Ramadan - Friday, October 7, 2022 7:43:19 AM
thx brother thanks a lot < 3

Posted by: UTD^Force - Friday, October 7, 2022 8:34:34 AM
You are welcome. Please do not hesitate to ask for further help.

Posted by: bleachinmyeyes - Thursday, August 17, 2023 3:45:59 AM
um how much of this code only works in zero hour?