Ramadan
  • Ramadan
  • 50.25% (Neutral)
  • Private Topic Starter
3 years ago
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 ❤
Sponsor
UTD^Force
3 years ago
Simply go to scripts > new script > actions if true > player > transfer > transfer a specific unit...
This is how an example script looks like:
*** IF ***
    True.
*** THEN ***
  [???] Unit 'OverlordCHEATmap' is transferred to the command of Player 'player0'
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.
A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
Ramadan
  • Ramadan
  • 50.25% (Neutral)
  • Private Topic Starter
3 years ago
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 
https://ibb.co/YkcdQkq 

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
UTD^Force
3 years ago
Do you have waypoints for the players to start the game into?

For multiplayer maps you need to have waypoints called 'Player_X_Start' where X=1-8
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:

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'


A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
UTD^Force
3 years ago
Here is an example map, try it then check the scripts.   Missiontesttransfer.zip (3kb) downloaded 46 time(s).
A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
Ramadan
  • Ramadan
  • 50.25% (Neutral)
  • Private Topic Starter
3 years ago
thx brother thanks a lot < 3
UTD^Force
3 years ago
You are welcome. Please do not hesitate to ask for further help.
A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
bleachinmyeyes
2 years ago
um how much of this code only works in zero hour?