Posted by: peanuts25 - Friday, December 24, 2010 8:54:16 PM
Hey guys I'm new to WorldBuilder and come here quite often for help. Great forum, thanks all moderators and forum staff. :) Have a question here. Is it possible, by means of scripts, to grant a science and/or money to a certain player after he has captured an unmanned unit? More specifically, I'm trying to make it such that there's a neutral boss dozer on a map that once captured will activate Cash Bounty 3 (GLA Science) for whoever captured it as well as give the player additional money. Would someone please tell me if this can be done, and if so how and which script to use? Help would be greatly appreciated. :)

Posted by: Annihilationzh - Friday, December 24, 2010 10:03:42 PM
This is how it should look: [code]*** IF *** [???] Unit 'bossdozer' is owned by Player 'player0' *** THEN *** [???] Player 'player0' is granted Science 'SCIENCE_CashBounty3'. [???] Player 'player0' is granted Science 'SCIENCE_CashBounty2'. [???] Player 'player0' is granted Science 'SCIENCE_CashBounty1'.[/code] You can find this: [code]Unit '???' is owned by Player '???'[/code] in Player>owns>Player owns the specific unit. And you can find this: [code]Player 'player0' is granted Science 'SCIENCE_CashBounty3'.[/code] in Player>science>Grant a science to a given player (ignore prerequisites). You will need a script for every player if you want every player to be able to obtain the cash bounty. Player0 being the host of the game, player1 being the second player in the game, etc.

Posted by: peanuts25 - Saturday, December 25, 2010 7:42:36 AM
Thanks for the prompt reply :) I did exactly as you told but I'm facing a problem. Only GLA factions (Vanilla, Demo, Toxin and Stealth) are automatically granted Cash Bounty 3 once the boss dozer is captured. Is it possible to include the USA and China factions too? Merry Christmas!

Posted by: Annihilationzh - Sunday, December 26, 2010 11:54:52 AM
They'll need a GLA command center because that's what activates cash bounty. Once cash bounty is activated, they'll no longer need the CC because it should stay active. EDIT: On a side note, the boss generals command center will also work, because she has cash bounty.

Posted by: peanuts25 - Sunday, December 26, 2010 9:42:06 PM
That's great, you solved the problem! I included a script that spawns a GLA Command Center for whoever captured the boss dozer, and make the Command Center disappear after 0.01 seconds. It worked, thanks once again. :D

Posted by: Seb767 - Wednesday, February 9, 2011 3:25:46 AM
but onequestion: if i use this sript, could other players in multiplayer use cashbounty too?

Posted by: casparmartin01 - Wednesday, February 9, 2011 10:35:27 AM
@seb No if you use that script than only the plAyer who will take over the dozer, than he will get the science nOt the other players