Spawning units that attack move No New Posts Starcraft 2 modding

Started by
TeslaTrooper

0 Members and 1 Guest are viewing this topic.

Spawning units that attack move
on: May 03, 2011, 03:34:21 PM
SC2 Category
Topic Category:
SC2 Development

Hi, I'm new to modding and this sort of stuff.
I'm looking to try and create a situation where you have 2 sets of units that spawn at 2 different points and converge on a third...
I can currently get them to spawn, but nothing else...
Any help would be appreciated...
« Last Edit: March 04, 2019, 07:46:10 AM by moyack »

Tesla Trooper fully charged!!!


Re: Spawning units that attack move
Reply #1 on: May 04, 2011, 08:21:20 PM

Hello TeslaTrooper, welcome to this site :)

Just to confirm what you need to do:

  • You respawn to groups of units
  • Each group is in a specific location (point)
  • They have to move to a third point
  • And each group attack the other?



Re: Spawning units that attack move
Reply #2 on: May 04, 2011, 11:17:53 PM

Yes, That is exactly what I would like to happen... It would also be a periodic event.
Thank you very much.

Tesla Trooper fully charged!!!


Re: Spawning units that attack move
Reply #3 on: May 05, 2011, 11:17:13 PM

Ok, then it's really simple.

  • At map initialization, set player 2 and 3 as enemy, using this code:
Code: [Select]
        Player - Make player 2 and player 3 treat each other as Enemy
    [/li]
       
  • First define the start point for the spawning process. Let's call them Point1 and Point2
  • Then in the trigger module, create a new trigger, put it a name (I called it "Test") and select a new event for it (Shortcut: CTRL+E)
  • Select in the event window, at the left, select "Timer" and in the second list at the right select "Periodic Event" and press OK
  • Then select the event and in the low part of the trigger module change the value of the timer to the one required (example 15 seconds).
  • Create 2 locals variables, of type "Unit Group", you can call them "Group1" and "Group2"
  • Do the following set of actions:

Code: Text
  1. Test
  2.     Events
  3.         Timer - Every 15.0 seconds of Real Time
  4.     Local Variables
  5.         Group1 = (Empty unit group) <Unit Group>
  6.         Group2 = (Empty unit group) <Unit Group>
  7.     Conditions
  8.     Actions
  9.         Unit - Create 5 Marine for player 2 at Point 001 facing (Position of (Triggering unit)) (No Options)
  10.         Variable - Set Group1 = (Last created units)
  11.         Unit - Create 5 Marine for player 3 at Point 002 facing (Position of (Triggering unit)) (No Options)
  12.         Variable - Set Group2 = (Last created units)
  13.         Unit - Order all units in Group1 to ( Attack targeting Point 003) (Replace Existing Orders)
  14.         Unit - Order all units in Group2 to ( Attack targeting Point 003) (Replace Existing Orders)
  15.  

I've attached a test map so you can see it in action. I hope it helps :D
« Last Edit: May 06, 2011, 08:22:38 AM by moyack »



Re: Spawning units that attack move
Reply #4 on: May 06, 2011, 01:04:53 PM

Thanks, that's exactly what I wanted!!! ;D
I probably will have other questions in the future concerning other operations and stuff in the editor...but this is a good start!

Tesla Trooper fully charged!!!


 

Vivir aprendiendo.co - A place for learning stuff, in Spanish   Chaos Realm - The world of Game modders and wc3 addicts   Diplo, a gaming community   Power of Corruption, an altered melee featuring Naga and Demon. Play it now!!!   WC3JASS.com - The JASS Vault + vJASS and Zinc   Jetcraft - A Starcraft II mod   WormTastic Clan (wTc)   Warcraft RESOURCES Reforged: Modelos, mapas, proyectos y mas...