Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Ramadan  
#1 Posted : Thursday, October 6, 2022 5:58:49 PM(UTC)
Ramadan
Private
Joined: 6/24/2022(UTC)
Posts: 9

Thanks: 7 times
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

Edited by user Thursday, October 6, 2022 6:01:19 PM(UTC)  | Reason: Not specified

Sponsor
Offline UTD^Force  
#2 Posted : Thursday, October 6, 2022 7:13:48 PM(UTC)
UTD^Force
Colonel
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 8/13/2013(UTC)
Posts: 817
Jordan
Location: Middle east

Thanks: 430 times
Was thanked: 184 time(s) in 168 post(s)
Simply go to scripts > new script > actions if true > player > transfer > transfer a specific unit...
This is how an example script looks like:
Code:
*** 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.
Proud Muslim

UTD^Force

Moderator and former map reviewer
CnC Labs
thanks 1 user thanked UTD^Force for this useful post.
Ramadan on 10/7/2022(UTC)
Offline Ramadan  
#3 Posted : Friday, October 7, 2022 12:28:16 AM(UTC)
Ramadan
Private
Joined: 6/24/2022(UTC)
Posts: 9

Thanks: 7 times
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

Edited by user Friday, October 7, 2022 1:10:09 AM(UTC)  | Reason: Not specified

Offline UTD^Force  
#4 Posted : Friday, October 7, 2022 5:21:45 AM(UTC)
UTD^Force
Colonel
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 8/13/2013(UTC)
Posts: 817
Jordan
Location: Middle east

Thanks: 430 times
Was thanked: 184 time(s) in 168 post(s)
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:
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'
Proud Muslim

UTD^Force

Moderator and former map reviewer
CnC Labs
thanks 1 user thanked UTD^Force for this useful post.
Ramadan on 10/7/2022(UTC)
Offline UTD^Force  
#5 Posted : Friday, October 7, 2022 5:30:52 AM(UTC)
UTD^Force
Colonel
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 8/13/2013(UTC)
Posts: 817
Jordan
Location: Middle east

Thanks: 430 times
Was thanked: 184 time(s) in 168 post(s)
Here is an example map, try it then check the scripts.
File Attachment(s):
Missiontesttransfer.zip (3kb) downloaded 34 time(s).
Proud Muslim

UTD^Force

Moderator and former map reviewer
CnC Labs
thanks 1 user thanked UTD^Force for this useful post.
Ramadan on 10/7/2022(UTC)
Offline Ramadan  
#6 Posted : Friday, October 7, 2022 6:43:19 AM(UTC)
Ramadan
Private
Joined: 6/24/2022(UTC)
Posts: 9

Thanks: 7 times
thx brother thanks a lot < 3

Edited by user Friday, October 7, 2022 6:51:11 AM(UTC)  | Reason: Not specified

Offline UTD^Force  
#7 Posted : Friday, October 7, 2022 7:34:34 AM(UTC)
UTD^Force
Colonel
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 8/13/2013(UTC)
Posts: 817
Jordan
Location: Middle east

Thanks: 430 times
Was thanked: 184 time(s) in 168 post(s)
You are welcome. Please do not hesitate to ask for further help.
Proud Muslim

UTD^Force

Moderator and former map reviewer
CnC Labs
thanks 1 user thanked UTD^Force for this useful post.
Ramadan on 10/8/2022(UTC)
Offline bleachinmyeyes  
#8 Posted : Thursday, August 17, 2023 2:45:59 AM(UTC)
bleachinmyeyes
Private
Joined: 8/14/2023(UTC)
Posts: 13

um how much of this code only works in zero hour?
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.