berkbria
  • berkbria
  • 57.5% (Neutral)
  • Private Topic Starter
18 years ago
I have a nice map with full scripting added and a complex waypoint system but it is a bassic skirmish map (kill everyone else and win), I want to make the objective to be for one team to capture 4 specific buildings to win the game. Instead of killing everyone to win. how can I do this to my map. in the scripting?
Sponsor
fleetatks
18 years ago
Use scripting to do something along the lines of *If "Unit_ is captured by player_ *AND Unit_ is captured by player_ *AND Ect.." *Then (Either use "Player->ShowVictorious and end game" or activate another script so you can do custom things such as play music and show text before ending game.)

There is a USA mission where you have to capture about 5 rockets from GLA, So you can see what script they chose for the capture part.

You can also use '*If unit_ Captured *Then add 1 to counter_' in one script, and in another have '*If counter_ = 4 *Then (Either use "Player->ShowVictorious and end game" or activate another script so you can do custom things such as play music and show text before ending game.)
Email me if you ever need help (edited signature November 6th, 2014)
berkbria
  • berkbria
  • 57.5% (Neutral)
  • Private Topic Starter
18 years ago
If I had 2 players on one team would they both win if either team captures them all? or would it be single player only?
berkbria
  • berkbria
  • 57.5% (Neutral)
  • Private Topic Starter
18 years ago
on the usa 5 camp. map there is a script folder called Toxin_GLA in there is is a folder for the missle silo's and a entry for each one 1-4, each one adds to the counter but I cant find where the script is that the If counter=4 then end game is at. also it has the human player as player0001 as the ones that need capture but i have no script for a player0001 obviously, I have the scripting that is in the game directory. Do i need to make a new script folder for the human players? or would it just be player_1 and Player_2 to capture because the human players start in start spot 1-2
Me Myself and Pi
18 years ago
Working with scripts for multiplayers is rather limited. You can only refer to the host of the game in a script that calls for a player. To do this, use & make sure the script is in the PlyrCivilian folder.

You cannot anouce a win for a player & accounce a loss for another player in the same map, it just doesn't work.
berkbria
  • berkbria
  • 57.5% (Neutral)
  • Private Topic Starter
18 years ago
I want both the human teams to win when the buildings are captured
Me Myself and Pi
18 years ago
If you want the victory window to come up (which will come up for all the players & only for all the players) once the buildings are captured, then the scripts could look like one of these examples: (The action loction will be next to the respective actions below.)(Lets say you used the BikonurGroundControlCenter)

Example 1:

*** IF ***
Player 'PlyrCivilian' has Equal To 0 unit or structure of type 'BaikonurGroundControlCenter' (Player\Owns\Player has (comparison) unit type.)
*** THEN ***
Show 'Victorious' window and end game (Multiplayer\Announce victory.)



Example 2:

*** IF ***
Player '' has Equal To 5 unit or structure of type 'BaikonurGroundControlCenter' (Player\Owns\Player has (comparison) unit type.)
*** THEN ***
Show 'Victorious' window and end game (Multiplayer\Announce victory.)



These are basicly your only options. You can either have so that if any of the buildings be captured, to open the victory window. (Example 1) Or you can it, when the host captures the 5 buildings, the victory window will come up. (Example 2)

As I said, scripting this kind of stuff is limited in multiplayer.



berkbria
  • berkbria
  • 57.5% (Neutral)
  • Private Topic Starter
18 years ago
I am having a problem with the first method, I have it set to if Player 'PlyrCivilian' has Equal To 0 units or structure of type 'BaikonurGroundControlCenter' the owners of the buildings are set to TeamPlyrCivilian on the map and as soon as i start the game I win.
Me Myself and Pi
18 years ago
I just tried it so I know it works. Could you upload the map please?

Oh, one more thing, using this scripting will allow the win to accour even if any of the players capture the buildings.
berkbria
  • berkbria
  • 57.5% (Neutral)
  • Private Topic Starter
18 years ago
I really dont want to send the map to anyone untill it is done could you send one with it working?
Me Myself and Pi
18 years ago
Well, I could. But I would need to know what buildings your using. But could you at least send me the script your using so that I can check out what you're doing wrong? To do it, select the script & click on "Export" & save the file. Now, go to the place where you saved the file & put into a ZIP folder & then upload it into a reply. (Let me know if you don't know how to create a ZIP folder.)
berkbria
  • berkbria
  • 57.5% (Neutral)
  • Private Topic Starter
18 years ago
its in, plrycivilian/Shield Gen Win

Download Attachment: UserPostedImage capturewin.zip 
215.84 KB


What are the building owners set to on the map you've done it to?

[EDIT: Double Post Splice -- CommieDog]
Me Myself and Pi
18 years ago
Well, you made the script right. The problem might be in your map. Are you sure you have at least one BikonurGroundControlCenter belonging to the PlyrCivilian team? If you sure about this, I really can't help you unless I see you map.
berkbria
  • berkbria
  • 57.5% (Neutral)
  • Private Topic Starter
18 years ago
Ive been workin on this a long time I really don't want to send it out just for someone else to add the finishing touches and give it out as there own. I'm sure thats all set right anyway's I think it's something with the scripts in the skirm. players, if you could send me one with full skirm. scripting and that added in that would be all I need, if not i'll just use the second method you suggested that seems to work fine, thanks for all your help.
Me Myself and Pi
18 years ago
I could send you some working scripts, but I have a question first. When I imported your scripts, (I noticed you have the skirmish included. How come?) They weren't imported into the corrective folders. This happens when you import the originaly skirmish scripts for the first time. But the script you made was also not in the correct folder. So it wasn't in the PlyrCivilian, it was in another skirmish folder. Was it like this on your computer?
berkbria
  • berkbria
  • 57.5% (Neutral)
  • Private Topic Starter
18 years ago
I fixed it! finally, i guess there was something wrong in the civilian scripting, i just copied the map removed all the scripting then removed the civilian scprting from the old scripts and imported the rest to the copied map and added the civs. scripts back in maunally, now it works, thanks though you've been a ton of help, I had no idea how any of this crap worked b4 I came here.

no it is not like that on mine, that has been corrected on mine, when we originally imported the full scripting though it was like that for some reason with the wrong teams in the wrong folders, you have to remove everything, put all new folders in, that are in the order it places them then import. I guess the order it put the teams on basic scripting (add skirimish player's) is diffrent from the order they are in with the full scripting. i guess its wrong on yours cos it's been changed around a bit from when we fixed it, and it doesnt import the folders.
Me Myself and Pi
18 years ago
Yay! I'm glad you got it working. But I've rearranged the skirmish script so they do import into the correct folders. Just download them below.

Download Attachment: UserPostedImage Skirmish Scripts.zip 
229.85 KB
berkbria
  • berkbria
  • 57.5% (Neutral)
  • Private Topic Starter
18 years ago
thanks, i will use those scripts in later map but I cant replace the ones on here, they have been edited to make the AI do a bunch of diffrent stuff they wouldnt normally do and attack much harder, so i cant just swap em out on this one.
Users browsing this topic