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

[General] [Request] Trigger + Region Problem

Status
Not open for further replies.
Level 2
Joined
Apr 16, 2013
Messages
7
Purpose
I am trying to trigger so that footmen can be on region 3 when entering region 2 only if there is a siege tower in region 1.

Problem
My units are suppose to end up in region 3 when they enter region 2 only if a special unit enters region 1.

Problem in more detail
I used triggers to make my footman instantly be at/on region 3 when they enter region 2 only if there was a siege tower in region 1. My footmen arrives at region 3 by entering region 2 without a siege tower present at region 1.

Trigger 1:
Events
Unit - A unit enters region 1 <gen>
Conditions
(Unit-type of (Triggering unit)) Equal to Siege Tower
Actions
Unit - Make (Triggering unit) face 90.00 over 0.00 seconds
Unit - Pause (Triggering unit)

Trigger 2
Events
Unit - a unit enters region 2
Conditions
(Unit-type of (Triggering unit)) Equal to Footman
Actions
Unit - Move (Triggering unit) instantly to (Center of region 3 <gen>)


Notes

I have no experience with JASS and variables.

If you can solve this problem, please post and be detailed; step by step and/or provide a picture showing how.

If you require additional information about the problem in order to help solve, please ask away. However, I really don't see the point because I provided as much as possible. Please don't ask stupid dumb questions like: is this "footman" a normal unit ? ref: defskull-second-post

If you can't solve this problem, please don't post. Complaining, providing little or general information is worse than not posting. e.g:
Question 1: How do I create a custom unit?
Post #1 by anon1: object editor. <--- provides little/general info = not wanted.
Post #2 by anon2: 1. Open World Editor (run as administrator). 2. Press F6 or click helmet icon located under module and this brings up object editor. 3. Under "Units"tab, right-click a folder and create custom unit. <---- provides detailed and step by step info = wanted.
 
Last edited:
To create a new variable hit the hotkey "Ctrl + B"
or you can press the Variables button.
attachment.php


The variables are named after what type they are.
  • Region 1 enter
    • Events
      • Unit - A unit enters Region 001 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Siege Engine
    • Actions
      • Set Boolean = True
      • Unit - Make (Triggering unit) face 90.00 over 0.00 seconds
      • Unit - Pause (Triggering unit)
  • Region 2 enter
    • Events
      • Unit - A unit enters Region 002 <gen>
    • Conditions
      • Boolean Equal to True
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Set Point = (Center of Region 003 <gen>)
      • Unit - Move (Triggering unit) instantly to Point
      • Custom script: call RemoveLocation(udg_Point)
You may want to learn about 'Things that leak'.
They are an important part of modding your map if you want it to be approved here!

Also please post your triggers in the [trigger][/trigger] tags. :)
 

Attachments

  • Variable button.jpg
    Variable button.jpg
    6.2 KB · Views: 201
Level 2
Joined
Apr 16, 2013
Messages
7
To create a new variable hit the hotkey "Ctrl + B"
or you can press the Variables button.
attachment.php


The variables are named after what type they are.
  • Region 1 enter
    • Events
      • Unit - A unit enters Region 001 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Siege Engine
    • Actions
      • Set Boolean = True
      • Unit - Make (Triggering unit) face 90.00 over 0.00 seconds
      • Unit - Pause (Triggering unit)
  • Region 2 enter
    • Events
      • Unit - A unit enters Region 002 <gen>
    • Conditions
      • Boolean Equal to True
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Set Point = (Center of Region 003 <gen>)
      • Unit - Move (Triggering unit) instantly to Point
      • Custom script: call RemoveLocation(udg_Point)
You may want to learn about 'Things that leak'.
They are an important part of modding your map if you want it to be approved here!

Also please post your triggers in the [trigger][/trigger] tags. :)

Will get around to posting my future trigger problems using trigger tags.

Will look into things that leak in due time.

Thanks for the detailed guide. I will get to it once I learn variables.

I should probably mention that Ctrl + B only works within or limited to Trigger Editor - Puzzled for a few seconds when nothing happened while continuously pressing the two buttons on World Editor.
 
Status
Not open for further replies.
Top