Jump to content


How to...


5 replies to this topic

#1 Widowmaker

    Casual

  • Member
  • 68 posts

Posted 03 March 2008 - 20:44

I am working on a sandbox map for SHW. It will have small bases for all 15 factions and a civilian city as some kind of testing zone. I made all units and gen powers availiable per script and now i want to have some kind of dummy opponent to test the weapons on. This "opponent" shall not be an actual player.
My plan is to have a specific area in which the player himself can build buildings and place units. On a specific trigger event (maybe pressing a button or moving a unit) i want all the units and buildings in that area transferred to an enemy player. The question is: is this scriptable and if it is then plz tell me how. I tried many things by now but nothing worked properly. I hope uyou ppl can help me so i could continue on making that map (i would really like to have a kind of testing ground for everything).
Welcome to Internet, where the men are men, the women are men and the little girls are FBI agents.

don't click this link...

#2 Crazykenny

    Eternal Glow

  • Project Team
  • 7683 posts

Posted 03 March 2008 - 20:47

IIRC this is scriptable trough regular AI scripts and triggers (by editing there subroutines). Unfortunely, I'm not entirely sure. So its better if you wait untill some script expert drops by.
Posted Image

#3 nip

    Grunze-Catz

  • Member
  • 608 posts

Posted 03 March 2008 - 23:28

Units or teams must be named if you want transfer them to another player.

#4 Widowmaker

    Casual

  • Member
  • 68 posts

Posted 04 March 2008 - 20:32

Would it be possible to name them temporarily per script? Or does this mean that it would be entirely impossible to transfer units in a certain area to another player without giving them all exact names before in the world builder?

If that is the case then i would like to ask if i could make enemy weapon factories which build specific units on a specific trigger event :P
Welcome to Internet, where the men are men, the women are men and the little girls are FBI agents.

don't click this link...

#5 nip

    Grunze-Catz

  • Member
  • 608 posts

Posted 04 March 2008 - 22:35

Names can't be changed by script. You can script any faction building or faction unit to use it's own commandbuttons (build or upgrade) on any trigger event. And you need to enable the respective player to build units/structures and set money and if necessary grant sciences.

*** IF ***
    True.
*** THEN ***
   Unit 'WarFactory' use Ability 'Command_ConstructAmericaTankPaladin'.
   Unit 'WarFactory' use Ability 'Command_UpgradeAmericaTOWMissile'.
   Unit 'ScudLauncher' use Ability 'Command_GLAAnthraxWarhead'.
   Player 'PlyrAmerica' is able to build buildings.
   Player 'PlyrAmerica' is able to build units.
   Set Player 'PlyrAmerica''s money to $ 50000 
   Player 'PlyrAmerica' is granted Science 'SCIENCE_PaladinTank'.




#6 Widowmaker

    Casual

  • Member
  • 68 posts

Posted 05 March 2008 - 17:24

Ahh^^ Thank you very much. This is gonna do the job...
Welcome to Internet, where the men are men, the women are men and the little girls are FBI agents.

don't click this link...



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users