• 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.

adding different unit types and changing the amount sent

Status
Not open for further replies.
Level 4
Joined
Feb 23, 2008
Messages
102
ok so i got my triggers wich send 1 unit type a time for each wave and it only sends the amount i have which is ten. so it sends 1 unit type and ten of them and next wave a different unit type and still ten. so my questions are is how can i send two or more kinds of different unit type at the same time and how can i change the amount i amount i want to send? for example for the first question how can i send ten genoisians and battle droids at the same time and how can i send like 5 genoisians. oh yeah 1 more question how can i move a unit very vague i meen like ok theres a bad guy standing some where without any1 touching him how can he just suddenly teleport somewhere els? hes a computer and so yeah.



these are my triggers

Untitled Trigger 008
Events
Map initialization
Conditions
Actions
Set unittype[1] = Genosian
Set unittype[2] = battle droid
Set unittype[3] = Super Battle Droid
Set unittype[4] = Drodieka
Set unittype[5] = Spider Droid

and

Untitled Trigger 005
Events
Time - Nextlevel expires
Conditions
Actions
Set enemylevel = (enemylevel + 1)
Unit - Create 10 unittype[enemylevel] for Player 12 (Brown) at (Center of Region 001 <gen>) facing Default building facing degrees
Unit Group - Order (Last created unit group) to Attack-Move To (Center of (Playable map area))
Unit - Create 10 unittype[enemylevel] for Player 12 (Brown) at (Center of Region 002 <gen>) facing Default building facing degrees
Unit Group - Order (Last created unit group) to Attack-Move To (Center of (Playable map area))
Unit - Create 10 unittype[enemylevel] for Player 12 (Brown) at (Center of Region 003 <gen>) facing Default building facing degrees
Unit Group - Order (Last created unit group) to Attack-Move To (Center of (Playable map area))

also umm how do i make a character hav a item and like make them swich from what kind of attack like yoda he has no weapon he is using some spell and he has a item its a light saber so how do i make him like click the item and it makes him hold a weapon and if he clicks it again the lightsaber goes away?
 
Last edited:
Level 5
Joined
Jul 11, 2007
Messages
152
Say you want to have genosians and battle droids going in at once all you need is two different actions,

  • Unit - Create 10 Genosians for Player 12 (Brown) at (Center of Region 001 <gen>) facing Default building facing degrees
  • Unit Group - Order (Last created unit group) to Attack-Move To (Center of (Playable map area))
  • Unit - Create 10 Battle Droids for Player 12 (Brown) at (Center of Region 001 <gen>) facing Default building facing degrees
  • Unit Group - Order (Last created unit group) to Attack-Move To (Center of (Playable map area))
This will cause leaks, I can help you with those if you want as well but there's the basics.

For having them move just make a periodic trigger that pokes the attackers in the right direction. I assume that all attackers are under the same player and in this case I used player 12 brown.

  • Time - Every 60 seconds of game time
  • Unit Group - Order Units of type - Units owned by (Player 12 Brown) to Attack-Move To (Center of (Playable map area))

Lightsaber questions - for lightsabers use custom models and once you get them on your map, heres a topic that is all about equipping weapons.
http://www.hiveworkshop.com/forums/showthread.php?t=52138&highlight=equip
 
Level 4
Joined
Feb 23, 2008
Messages
102
so for the first trigger if i want to send for example

1. genosians
2. droids
3. battle droids
4. genosisans and battle droids

are u saying that that trigger will do this? and what are leaks?
 
Level 5
Joined
Jul 11, 2007
Messages
152
  • Unit - Create 10 Genosians for Player 12 (Brown) at (Center of Region 001 <gen>) facing Default building facing degrees
  • Unit Group - Order (Last created unit group) to Attack-Move To (Center of (Playable map area))
  • Unit - Create 10 Droids for Player 12 (Brown) at (Center of Region 001 <gen>) facing Default building facing degrees
  • Unit Group - Order (Last created unit group) to Attack-Move To (Center of (Playable map area))
  • Unit - Create 10 Battle Droids for Player 12 (Brown) at (Center of Region 001 <gen>) facing Default building facing degrees
  • Unit Group - Order (Last created unit group) to Attack-Move To (Center of (Playable map area))
  • Unit - Create 10 Genosians for Player 12 (Brown) at (Center of Region 001 <gen>) facing Default building facing degrees
  • Unit Group - Order (Last created unit group) to Attack-Move To (Center of (Playable map area))
  • Unit - Create 10 Battle Droids for Player 12 (Brown) at (Center of Region 001 <gen>) facing Default building facing degrees
  • Unit Group - Order (Last created unit group) to Attack-Move To (Center of (Playable map area))
The only thing I'm changing is the units made. The event and order of the triggers determines when they will spawn so you could make them separate triggers based on elapsed time or put wait functions in between them.

Leaks cause lag and to fix them you would need to create variables for each region and each unit group. I don't have WE with me but I'll try to make an example for you:
  • Set BattleDroid_Spawn to [center of region 001]
  • Unit - Create 10 Battle Droids for Player 12 (Brown) at [BattleDroid_Spawn] facing Default building facing degrees
  • Set Last created unit group to BattleDroid_Group_1
  • Set BattleDroid_Attack to [region]
  • Unit Group - Order [BattleDroid_Group_1] to Attack-Move To [BattleDroid_Attack])
  • Customscript call udg_destroy Battle_Group_1
  • Customscript call udg_destroy BattleDroid_Attack
  • Customscript call udg_destroy BattleDroid_Spawn
 
Level 4
Joined
Feb 23, 2008
Messages
102
so do i keep my trigger and at the bottom i put turn of this trigger then put another trigger that says

Unit - Create 10 Genosians for Player 12 (Brown) at (Center of Region 001 <gen>) facing Default building facing degrees
Unit Group - Order (Last created unit group) to Attack-Move To (Center of (Playable map area))
Unit - Create 10 Droids for Player 12 (Brown) at (Center of Region 001 <gen>) facing Default building facing degrees
Unit Group - Order (Last created unit group) to Attack-Move To (Center of (Playable map area))
 
Level 5
Joined
Jul 11, 2007
Messages
152
Yes you can do that and turn off the trigger once it's done and turn on the next trigger or you can wait until spawning the next set of attackers.
 
Status
Not open for further replies.
Top