RV55
  • RV55
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
Hello. My first post here.

OK, so I'm making a map, where I'd like the enemy ai team, in skirmish, have their pre-deployed Chinese hackers hack automatically. So basically when the map starts, have the enemy team automatically put their hackers to work.

I'd also like to know how to pre-place buildings and assign them to the human player team.

I'd like the skirmish to start with pre-deployed units and buildings (2 teams, one human, one ai). I know where to find the buildings and units, just don't know how to 'assign' them to human and player 2.

Sorry for these questions, I followed the CNC Labs tutorial but I couldn't find this in the tutorial.

Also, I did a search on these forums, but couldn't click to the next search results page. Might be broken?

Thanks, regards!
Sponsor
UTD^Force
8 years ago
Do you know to script?
If you do, this is how to assign the (units/buildings) to a player:
*** IF ***
    True.
*** THEN ***
  Unit 'Unit/Building Name' is transferred to the command of Player 'playerX'
X: number of player between 0 and 7.
Where player0 is the host.
To assign the unit to another player or an AI, the player must be in the right number every time.

Ex: to transfer a unit to the third player in the skirmish menu in game, X=2 and so on.
If you aren't familiar with scripting, this  will help.
After that, go to Player>Transfer.
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
8 years ago
To make the hackers hack :3 you'll need to make a team of hackers, and create a team and call it whatever you want (in this example it's Hackers):
Script #1:

*** IF ***
True.
*** THEN ***
Control of Team 'Hackers' transfers to Player 'player0'
Set timer 'Hack' to expire in 1.00 seconds.


Through Team folder.

Script #2:

*** IF ***
Timer 'Hack' has expired.
*** THEN ***
Team 'Hackers' use Ability 'Command_ChinaInfantryHackerInternetHack'.


Team>CommandButton.
A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
RV55
  • RV55
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
Hello, thanks for your reply.

Well, I found out how to add a script, but I can't find the units/buildings. I go to Scripts > Click on PlyrCivilian > Then i click on New script > Actions if true tab > Click on New > After this I'm kinda lost, because I can't find this command; 'Unit/Building Name' is transferred to the command of Player 'playerX'.

Also, I'm planning to pre-deploy buildings and units, without starting with the command centers and a worker/dozer. Is it possible to start a skirmish game without setting a player starting position? I noticed you can place a camera start position instead.

P.S. I wanted to assign the hackers to the enemy ai. And buildings to player. How do I create that team? A new folder in the Scripts menu?

I also have trouble finding the commands. Where do you find those unit and building specific commands? I'm browsing through all the commands but can't find those you mentioned.

Another thing though. I tried manually entering 'player0' but I get an error below the script that the player doesn't exist?

Thanks for your help.
RV55
  • RV55
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
OK, so an addition to my post. Sorry if it's repetitive but I just wanted to make an overview.

I found the script to transfer objects. But I'm sooo confused right now.

All I want is to have a human player have a specific set of buildings to start with that the player will own. So NOT the standard setup, main base and a worker/dozer. But for example only a barracks and war factory.

Secondly, I'd like the enemy AI to have those Chinese hackers. They will start hacking once the map starts. Again, the AI will not have a base or anything.

Now I finally know how to script it, but don't know to which faction to assign the hacker team to.. do I add it to Neutral, PlyrCivilian or a specific General? Also to which faction do I add the script?

Same for the player buildings. To which faction do I add the script?

And do I still need to add Player/AI starting positions?

I also get a weird control bar bug. See attachment. I don't know what's causing this. Any ideas?

Thanks.
ControlBarBug.jpg

Click to View Image42 View(s)

AdrianeMapMaker
8 years ago
You need to add the start positions of course... They are connected to the scrip ts eh.
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




RV55
  • RV55
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
Hi,

allright thank you. I added the start positions, but then me and the enemy player still starts with a base. And neither do the transfer scripts work for me.

If you would be so kind, could you perhaps read my last post and tell me the required steps? I'd be grateful.

Thanks. :)

P.S. The control bar bug resolved itself... for some reason.

i^love^mixery
8 years ago
RV55 it sounds like you want to create a mission map, not a map with start positions.

It is hard to understand but those two are fundamentally different in how to script.


Please start off with a map without start positions. That's way easier to learn. Just delete all players (you can keep PlyrCivilian), all start positions, add some new players of whatever faction (NOT skirmish players), make one of them player-controlled, place some buildings on the map that belong to these players and work from there.


Once you stumble across a problem, upload the map and ask one or few very specific questions.
RV55
  • RV55
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
Hello,

Thank you for your reply. Yes, I guess it's a mission map. I just want to mess around with some stuff and make a video of it. Just for the funs of it.

Reason I ask so many questions I guess, is because I have so many of them!

Ok so I did the following;

- Delete all players (except neutral & PlyrCivilian)
- Delete starting positions
- Added 2 new players, one computer controlled.
- I placed buildings and units, and used 'Team' in the properties panel to set the owner.

OK. Some questions.

1) Do I need to set enemies for each added player?
2) How do i test the map then? If it's a mission and not skirmish.
3) Do I need to set it somewhere that it's a mission map?
4) Why do I get that control bar bug (see attachment in a previous post) when I remove start positions.
5) Am I setting the owner of buildings and units correctly? Through 'Team' in the properties panel?

This stuff is more complicated than I thought, but I'm dedicated to make it work.

Thanks!
RV55
  • RV55
  • 50.25% (Neutral)
  • Private Topic Starter
8 years ago
Well, here's some EXCITING news!

I got EVERYTHING to work!

I downloaded a mission map from this site, named 'Secret Weapons Test'.

So I looked around how he set things up.

So here's the summary to get it to work:

First place the GLA and China buildings and units.

Go to Edit > Edit player list.
I deleted all the skirmish players (if any), and left the Neutral and PlyrCivilian in place.
Created two new players, one named PlyrGLA and the other PlyrChina.
Set PlyrCivilian to computer controlled by ticking the box.
Set PlyrChina to computer controlled as well. I wanted human player to be PlyrGLA so I left that box unticked.
Set the enemies for both PlyrChina and PlyrGLA with eachother as enemy.

Now go to Edit > Edit Teams.
Click on PlyrGLA. Create team called GLABuildings.
Click on PlyrChina. Create team called ChinaHackers.

Next click on the GLA buildings. Hold shift to selected multiple. In properties panel, selected team GLABuildings.
Same for China units, select them and select the team ChinaHackers.

The buildings for GLA will automatically belong to human player now.

Now to Edit > Scripts.

I revealed the entire map for player. Click on Neutral folder. New script. Then go to Map > Shroud or Reveal > Reveal the entire map permanently for a player. Select PlyrGLA.

As for the hackers, make them hack. All I needed to do was click on PlyrChina folder in Scripts. New script. Then go to Team > Commandbutton > Use commandbutton ability. Select team ChinaHackers. Use Ability Command_ChinaInfantryHackerInternetHack.

Then to test the map, I started up Zero Hour, Skirmish > Unofficial maps. My map was at the top of the list because it doesn't have any selectable player spots.

Also, the control bar bug resolved itself once again!

Thanks for the help!!