Registration Date: December 2010
Location: Denmark
Posts: 17
Scripting skirmish mode
I know this forum is probably dead, but decided to give it a shot anyway. Been playing CWC for decades and have been read tutorials on mapping and scripting for Zero Hour the last week. One thing thats hard to find info on google about, is scripting. Lets take a random mission, i.e. Distant Thunder, would it be possible to let skirmish players enter the area, while both teams (PlyrRussia vs PlyrUSA) hammer eachother?
I´d like to let the player feel, he is entering a warzone, but when placing a script in PlyrCivilian starting the tankbattle, it wont fire..
I guess there is nothing I can do about it, is there?
Post last edited by Piranha on 15.12.2010, 20:07.
15.12.2010, 20:05
H-kon
Heroic Member
Registration Date: December 2008
Location: Oslo, Norway
Posts: 232
There shouldn't be any problem doing this, except that u have to add another player into the scripting. U need 1 player for AI USA, another for AI Soviet, and a third player for the human player. In addition u need the PlyrCivilian for everything else that is not one of the ones mentioned before (like neutral buildings etc).
If there are anything special u need to know, post it here, and I'll answer when I get the time! It's kool if u make more 1plyr missions, and I would love to see something built on maps that already exists (f.i the maps u find on moddb)
__________________ Workers of the world, Unite!
16.12.2010, 16:09
Piranha
Freshman
Registration Date: December 2010
Location: Denmark
Posts: 17
Hello and thank you for replying, Haakon
I think you misunderstood: I wanted to make a skirmishmode map with other teams involved. As an example (just for testing, I would never release a map build by others) I took the singleplayer mission Distant Thunder (where there is a tankbattle in the start) and made it a 2-player skirmish mode map! But all the units are inactive when I start in skirmishmode.
So I wanted to see, if there was any way to have the [PlyrRussia] and [PlyrUSA] hammer eachother, while you start in skirmishmode. Is there any way to do that?
16.12.2010, 16:55
Skleni
CWC Project Team Administrator
Registration Date: May 2004
Location: Wilhelmsburg / Lower Austria
Posts: 2317
H-kon was right, you need to add additional players (Edit/Edit Player List) and put their scripts for their actions in the according folders.
You might want to use the script debugger to get some hints why your scripts are not working.
Btw, it's no problem if you modify existing CWC maps (official ones created by the team). We're glad when you do it. You just need to be carefull with unofficial addons created by other players.
__________________ We turn into computers...a bit each day. - 9K32 Strela
17.12.2010, 10:28
Piranha
Freshman
Registration Date: December 2010
Location: Denmark
Posts: 17
Hehe alright, sorry then, H-kon I am quite old and knumskulled, so it´ll probably take some time to get these things right, along with lots of trial and error. As you guys are way ahead of my level, its very comforting and encouraging to know somebody are still around. I love the layout of Distant Thunder, it has that CWC-feel to it like no other map, although H-kon´s Grong and those from judgemental come very close.
Skleni, your tutorials in SDK 1.0 are very informative and makes mapping for ZH/CWC piece of cake, compared to other games. I come from the mod "Pirates of the Caribbean: New Horizons" on piratesahoy.net which is still in development, but I think at some point you also need to let go - and sad as it may be this mod is no longer in develpment, I respect you guys to do it in the right time, before everything begins to stall big time.
17.12.2010, 13:58
Skleni
CWC Project Team Administrator
Registration Date: May 2004
Location: Wilhelmsburg / Lower Austria
Posts: 2317
Thank you, it's great to see that people are still interested in CWC.
If you've got any more questions, feel free to come back and post them, as finding info and tutorials on ZH scripting is indeed quite difficult and I've had to learn most of it the hard way myself.
__________________ We turn into computers...a bit each day. - 9K32 Strela
17.12.2010, 14:32
judgemental
Elite Member
Registration Date: November 2008
Location: dublin ireland
Posts: 142
CWC's not dead! I don't have regular connection to internet so i haven't been playing online, but i still play and i have a map on the go. I was hoping to finish it for christmas, but haven't really got the time. In fact i will post it now, and if people want to add some more detail, that would be fine by me...
__________________ judgemental
21.12.2010, 14:32
Piranha
Freshman
Registration Date: December 2010
Location: Denmark
Posts: 17
Ok, can´t make it work but it does' nt matter. For now, I am just toying around a bit for now with singleplayer missions.
But if I i.e. want a enemy unit to attack a designated object named "radar", the only way I can find is to make an area and have that unit attack everything inside it. It's working fine, but I am thinking there is another way around it?
Also, can I have a civilian building to function as a military structure, i.e. a radarstation?
Registration Date: June 2005
Location: Russia, Rostov-on-Don
Posts: 431
First of all: please take my apologize if i wrote off topic.
But, if i'm understood right the fist post and you asked about how to create a multyplayer map where players(humans) will feel that they enter the war-zone realized by incoming each other type of units\vehicle? Than i can say that if new CWC update would include my new game mode type, than you will have real example how to realize that type of skirmish battle.
Sorry again if i'm wrote off topic.
Merry X-mas and happy new year to all
__________________ Life is still always be like a teacher, it always teach u and do u more and more stronger for difficulties .....so when u broken ich difficulties u may to "drinklife" & take pleasure of life
......thinking about it
Post last edited by maximka123 on 27.12.2010, 21:55.
27.12.2010, 20:52
Piranha
Freshman
Registration Date: December 2010
Location: Denmark
Posts: 17
No reason to excuse for my part, maximka/jugdemental - afterall, this thread seems to be the only one alive, so I can manage a little chatter one the side If the forum can be somehow revived by various people coming with input and their works, it would be ok with me.
27.12.2010, 22:26
Skleni
CWC Project Team Administrator
Registration Date: May 2004
Location: Wilhelmsburg / Lower Austria
Posts: 2317
There definitely is a script for making a unit attack another unit. Both units need a name, and then you should be able to find it (in the "Unit" node in the tree).
__________________ We turn into computers...a bit each day. - 9K32 Strela
28.12.2010, 11:41
Piranha
Freshman
Registration Date: December 2010
Location: Denmark
Posts: 17
Found it and it works, thank you very much Skleni
28.12.2010, 16:40
Piranha
Freshman
Registration Date: December 2010
Location: Denmark
Posts: 17
Scripting Paradrops
Actually, I must admit I´m quite stuck in another problem.
Is there any special way to script a spawning unit in CWC? I can´t even make a paradrop.
I gave the map complete skirmish AI vs human player mode.
I put a team of infantry off map, gave it a name and placed a waypoint near them to make the plane fly from here. The team template is used, checked everything in the`reinforcements` tab and indicated the flying unit and the checkfield `Attempt to load infantry in vehicle (If applicable)` does not seem to do anything. Another waypoint is placed where the drop is supposed to be and I call it all from a script [Create] [Spawn a reinforcement team].
Well, the planes/helis flyes by and the animation does seem to drop something off, but as always, no actual units is spawned. Wonder what I am doing wrong.
Do I need some kind of special genetic or multiplayer beacon to trigger a spawn in CWC?
20.01.2011, 16:51
Skleni
CWC Project Team Administrator
Registration Date: May 2004
Location: Wilhelmsburg / Lower Austria
Posts: 2317
The whole reinforcement team logic is a bit fishy and I never used it, so I'm afraid I can't really help you here. You might want to check the official worldbuilder manual though.
Another solution would be to either put a command center somewhere in the map and make it use the paradrop command button on a waypoint (make sure player has the science) or to script the whole thing yourself (spawn a team and the transport, load the team into the transport, move the transport to the target, unload it, ...). Sequential scripts are your friends here.
Good luck!
__________________ We turn into computers...a bit each day. - 9K32 Strela
21.01.2011, 12:02
Piranha
Freshman
Registration Date: December 2010
Location: Denmark
Posts: 17
Well thank you once again Skleni, got control of most of it.
Problem solved by airdrop from commandcenter, it is _very_ easy
The weird spawn-problem is still here, though, probably due to the EA skirmishfaction and I´ll leave it there.
26.01.2011, 03:53
judgemental
Elite Member
Registration Date: November 2008
Location: dublin ireland
Posts: 142
This is great that you are making maps. Please put them up for DL.
__________________ judgemental
14.02.2011, 23:09
Piranha
Freshman
Registration Date: December 2010
Location: Denmark
Posts: 17
This is what I meant, when I asked in the first place.
Side1:
Human player ( Player 1 = player0)
+ allied PlyrX (with own or no AI)
Side2:
Skirmish AI player (Player 2 = player1)
+ allied PlyrX (with own or no AI)
Dont mind the missing funfactor after about two seconds of playing and why I keep trying to achieve this - I forgot why a long time ago But now, I say it cannot be done. It is not possible. I challenge everybody to try for themselves. Should anyone succeed (in contrary to my expections) I´ll send him the Eiffel Tower by mail..or something bigger..I am that sure.
Sidenote: None of my suggestions for teamPlyr-names are recognized by the game btw. Be it done by Player or Team, or selected in the dropdown menus or entered manually in Scripts, both player0, player1, PlyrRussia, teamPlyrRussia, SkirmishUSA etc are flagged "invalid playername" by the ScriptDebugger. This means no enemies/alliances from the start between the teams. I did of course try making the two allies of the respective SkirmishPlayers as teams, but they do not seem to inherit the hostility towards eachother from their owners. Very frustrating. The enemy UAZ is paying a visit to my supposed ally PlyrUSA for a cup of coffee and everybody (except for the Skirmish teams) are kissing and shaking hands at the flagpoles = concept of warfare KIA
Maybe somebody can help explaining this phenomenon to me, and what I should do in details to make it work?
Sidenote 2: I meet problems with the order of players in the Player List if they are random, looks like they need to be:
..in this particular order, for the PlyrUSA/Russia scripts to be executed at all, and for the global scripts in PlyrResources to be executed only once.
EDIT: Then again - not. SkirmishAI won't start if it is placed last. Might be a hint - too many factions?
Sidenote 3: What's with that file tmpChunk.dat, does it mess with the scripts and should be deleted (as they say in the other forums) or can I just leave it?
Post last edited by Piranha on 12.01.2012, 00:17.
11.01.2012, 16:57
DMZ
CWC Expert
Registration Date: July 2008
Location: Torturing Skleni
Posts: 515
Damn, I wish I could help here. I'm not a coder with THAT much experience.
Fact is, it IS possible. campaign missions have it. You may want to contact someone who worked on the game as a coder?