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 : Sunday, October 9, 2022 2:14:24 AM(UTC)
Ramadan
Private
Joined: 6/24/2022(UTC)
Posts: 9

Thanks: 7 times
Hello everyone, can I prevent any of the players on the map from building a building, or from human beings, a tank, a soldier, or a plane on the road? via the scripts ?


For example, I have a map of 4 players and I do not want player number 4 to use overlord can i do this?
Sponsor
Offline UTD^Force  
#2 Posted : Sunday, October 9, 2022 10:04:06 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)
It is easy to make a unit become unbuildable for all players, however, setting it as unbuildable for only one player may be tricky.

I have never tried this before so I don't know if this is how it works, but one of I^Love^Mixery's maps had certain scripts that would move the camera for each player to a different location.

I got interested in how he made it that one script moves the camera for me to one place while another script moves it to another place for another player.

Here is what I remember he did, and hang on with me:
He first checks if a player exists by having a script that would check if 'player0', for example, has units inside a certain area and, if so, spawns a unit and calls it 'player0unit'.

Then whenever he wanted to make a script affect only that player, he would use the condition "If unit 'player0unit' is owned by player '<Local Player>' THEN> and then he would specify what the script will do to affect only player0.

As I said, I have never tried this before so I'm not absolutely sure if this is really what had that effect.

The next step is the simple one, you only need to set a unit as unbuildable, either by doing what I mentioned above to affect certain players or just make a general script.

The actions section of the script are the same, nonetheless:
Actions if true> Map> Modify> adjust the tech tree of a specific object. This is how an example script looks like in the actions section:
Code:
*** THEN ***
   'AmericaJetAurora' becomes Buildable (No)
Proud Muslim

UTD^Force

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

Thanks: 7 times
thx a lot bro <3
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.