Two Specific Units in Region, Spawn Third One

egomanyak

New Member
Reaction score
8
Two Specific Units in Region, Spawn Third One(need example read last post)

how?
i have two monster: :thup: and :thdown:
:thup: and :thdown: enters region = kill :thup: and :thdown: and create new monster( :D ) in region 3


how :shades:
(need example read last post)
 

jig7c

Stop reading me...-statement
Reaction score
123
event
a unit enters a region 3
condition
and condition
entering unit equal to monster1
entering unit equal to monster 2
action
kill entering unit
create 1 monster3 in center of region 3 for (whichever player) facing....
 

Seannny

Why GUI when you can Jass?
Reaction score
46
event
a unit enters a region 3
condition
entering unit equal to monster1
entering unit equal to monster 2
action
kill entering unit
create 1 monster3 in center of region 3 for (whichever player) facing....

I dont believe that will work, seeing as a single unit cannot be 2 units at once

:) give me a sec ill make you a trigger.
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
Events
:thdown: enters region
:thup:enters region​
Conditions
region contains :thdown: equal to true
region contains :thup: equal to true​
Actions
Unit - Kill :thdown:
Unit - Kill :thup:
Unit - Create 1 :D for (Owner of (Entering unit)) at center of region facing default building facing degrees​

:p
 

egomanyak

New Member
Reaction score
8
Events
:thdown: enters region
:thup:enters region​
Conditions
region contains :thdown: equal to true
region contains :thup: equal to true​
Actions
Unit - Kill :thdown:
Unit - Kill :thup:
Unit - Create 1 :D for (Owner of (Entering unit)) at center of region facing default building facing degrees​

:p

can you take screenshot? or make map(only need trigger in map) for me? please.
 

Fujiwari

Active Member
Reaction score
0
Events
:thdown: enters region
:thup:enters region​
Conditions
region contains :thdown: equal to true
region contains :thup: equal to true​
Actions
Unit - Kill :thdown:
Unit - Kill :thup:
Unit - Create 1 :D for (Owner of (Entering unit)) at center of region facing default building facing degrees​

:p

Can 2 events function at the same time? Curious. :eek:
 

DarkSonicele

New Member
Reaction score
20
You can have as many events in a trigger as you want. And here's the trigger:

Trigger:
  • Trigger
    • Events
      • Unit - A unit enters Area1
    • Conditions
      • (Your Region contains Unit1 Equal) to True
      • (Your Region contains Unit2 Equal) to True
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Your-unit-type1
          • (Unit-type of (Triggering unit)) Equal to Your-unit-type2
    • Actions
      • Unit - Kill Unit1
      • Unit - Kill Unit2
      • Unit - Create 1 Unit3 for Player 1 (Red) at Area2 facing Default building facing degrees
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
can you give simple example map ? i need see triggers in map thanks.:D

No you don't. You need to make an effort and try to figure it out. Otherwise you're never going to learn how to do it yourself. Try to recreate the trigger below. If you can't, it's because you're not trying hard enough.

This trigger should work fine if you only have one of each type of unit (otherwise you may have to do some modification, but you never specifically said how many of these units you have).

Trigger:
  • Trigger
    • Events
      • Unit - A unit enters Area1
    • Conditions
      • (Your Region contains Unit1 Equal) to True
      • (Your Region contains Unit2 Equal) to True
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Your-unit-type1
          • (Unit-type of (Triggering unit)) Equal to Your-unit-type2
    • Actions
      • Unit - Kill Unit1
      • Unit - Kill Unit2
      • Unit - Create 1 Unit3 for Player 1 (Red) at Area2 facing Default building facing degrees
 

egomanyak

New Member
Reaction score
8
No you don't. You need to make an effort and try to figure it out. Otherwise you're never going to learn how to do it yourself. Try to recreate the trigger below. If you can't, it's because you're not trying hard enough.

This trigger should work fine if you only have one of each type of unit (otherwise you may have to do some modification, but you never specifically said how many of these units you have).
i need use unit type
i cant make unit kill unit1 i need kill triggering unit etc.
i need unit type system
 

Sajberhippie

New Member
Reaction score
30
Off-topic: Do NOT doublepost within 24 hours, it's annoying and it's against the forum rules.

On topic: I won't do the trigger for you, but I would recommend using a periodic trigger.

Something like this:
Trigger:
  • KillThatDoublePoster
    • Event
      • Every 1.00 second of game-time
    • Condition
    • Action
      • Set TempUnit1 to (No Unit)
      • Set TempUnit2 to (No Unit)
      • Set TempGroup (Units in (YOUR AREA) matching (UnitType of (Matching Unit) equal to :thup<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />
      • Pick all units in unit group (TempGroup) and do:
        • Set TempUnit1 to (PickedUnit)
      • Set TempGroup (Units in (YOUR AREA) matching unit-type of (matching unit) equal to :thdown:
      • Pick all units in unit group (TempGroup) and do:
        • Set TempUnit2 to (PickedUnit)
      • If
        • TempUnit1 not equal to (no unit)
        • TempUnit2 not equal to (no unit)
      • Then
        • Remove TempUnit1
        • Remove TempUnit2
        • Set TempPoint (Center of (YOUR AREA))
        • Create <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /> at TempPoint
        • Custom Script: call RemoveLocation(udgTempPoint)
      • Custom Script: call DestroyGroup(udgTempGroup)


Something like that.

P.S: Don't doublepost within 24h. It's rude.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top