• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Start Location

Status
Not open for further replies.
Level 3
Joined
Aug 24, 2007
Messages
33
Is it possible for a trigger to run like:

Event: (A unit Finishes building)

Condition: (Unit type of Triggering unit)) equals XXX)

Action: (Move start location for (Owner of triggering unit) to (Triggering unit)

I know the events and conditions work, but i can't get some way to move that start location.

I'm trying to get units to spawn at a movable point, if the above won't work, is it possible?
 
Level 3
Joined
Aug 24, 2007
Messages
33
You have a unit-X, you can move onto different unit circles.
A trigger that goes on every 10 seconds giving one of those units for each player that has a X on that circle.

The unit is spawned at a location, and i'm trying to be able to move that location around, possibly by building something.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Make a Point variable (array of 12) and whenever a building is constructed of your building type make a trigger like this:

Events
Building constructed
Actions
Set "Position[player number of triggering player]" = constructed unit

In your spawntrigger, do this:
Events
Every 10 seconds of game time
Actions
For integer A from 1 to 12 (in other words: for every player do:)
Unit - create a unit of my type at Position[Integer A]

At Map initialization you set the locationvariable = position of starting location

If that's understandable
 
Level 3
Joined
Aug 24, 2007
Messages
33
Thank you eleandor, but i tried that and it doesnt work, i need to set the start location for all players, and typing this up for 130 (or pasting and editing) would kill me.

So im going with ghosts suggestion to just make a region

Event: every 10 seconds to game time

Action:
If condtions are true- owner of unit in (soldiercreation) is player 1
do-pick every unit on (soldiercreation) and do create one soldier for player 1 at (player 1 region)
otherwise do nothing

Reapeated 7 more times for each player lol
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
i need to set the start location for all players, and typing this up for 130 (or pasting and editing) would kill me.

What do you mean by 130 ?
Is your map based on cities ? (sounds like it)

If so, you know how to use loops ?

(I thought of making a short loops guide lol... seems tons of people know nothing about them, as I did like 3 weeks ago ^^)
 
Level 9
Joined
May 27, 2006
Messages
498
Event: every 10 seconds to game time

Action:
If condtions are true- owner of unit in (soldiercreation) is player 1
do-pick every unit on (soldiercreation) and do create one soldier for player 1 at (player 1 region)
otherwise do nothing

There is much easier way to do it.
  • Trigger1
    • Events:
      • Time - Every 10 seconds of game time
    • Conditions:
    • Actions:
      • Unit Group - Pick every unit in (Soldiercreation <gen>) and do unit - create 1 Soldier for (Owner of(Picked unit)) at Region[(Player number of (Owner of(Picked unit)))]
Just in another trigger set the region of players. Example:
  • TriggerSetRegions
    • Events:
      • Map initialization
    • Conditions:
    • Actions:
      • Set Region[1] = (Center of ([b]RedRegion[/b] <gen>)) / (Position of ([b]RedUnit[/b]))
      • Set Region[2] = (Center of ([b]BlueRegion[/b] <gen>)) / (Position of ([b]BlueUnit[/b]))
      • Set Region[3] = (Center of ([b]TealRegion[/b] <gen>)) / (Position of ([b]TealUnit[/b]))
      • Set etc., etc., etc....
Change the place of bolded words to your regions or units, and this will work without 130 triggers/lines...


@GhostWolf
Arh, again faster than me... And well, this Loop Guide is quite good idea for newbies in triggering :pP
 
Level 3
Joined
Aug 24, 2007
Messages
33
Quote

What do you mean by 130 ?
Is your map based on cities ? (sounds like it)

If so, you know how to use loops ?

(I thought of making a short loops guide lol... seems tons of people know nothing about them, as I did like 3 weeks ago ^^)

Yeah..a loop guide would be nice..lol

Also thanks raft, that's a ton easier than repeating it for 130+ units.

Wolf my map = in a different section where my map can be described, it was posted, but i think it's in the wrong section, i moved it to idea factory if you want to look.
 
Level 3
Joined
Aug 24, 2007
Messages
33
OK, i've been trying to do that thing you mentioned raft, but It's not working.

I can't get player numbers into the spawn trigger, how did you do that?
 
Status
Not open for further replies.
Top