• 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] Need help with some things...

Status
Not open for further replies.
Level 11
Joined
Aug 25, 2006
Messages
971
2? Whats this?
3? Whats this?
4. Not without a jass function. Unless maybe AI command? I'm not sure.

Be more specific with 2,3, and I'll try to help you out.

I'm pretty sure a simple patrol command only makes them move to the target and attack anything on the way.
 
Level 11
Joined
Aug 25, 2006
Messages
971
@Just_Spectating why on earth would he do that?
@snebulan
Try this
  • Player - Change color of Player 1 (Red) to Teal, Changing color of existing units
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Just because I made a color trigger ill give you but hey... try something and then ask don't think we have all day and night free :wwink:

  • Color System
    • Events
      • Player - Player 1 (Red) types a chat message containing Set as A substring
      • Player - Player 2 (Blue) types a chat message containing Set as A substring
      • Player - Player 3 (Teal) types a chat message containing Set as A substring
      • Player - Player 4 (Purple) types a chat message containing Set as A substring
      • Player - Player 5 (Yellow) types a chat message containing Set as A substring
      • Player - Player 6 (Orange) types a chat message containing Set as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 3)) Equal to Set
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 5, 10)) Equal to random
        • Then - Actions
          • Animation - Change Unit[((Player number of (Triggering player)) - 1)]'s vertex coloring to ((Random real number between 0.00 and 100.00)%, (Random real number between 0.00 and 100.00)%, (Random real number between 0.00 and 100.00)%) with 0.00% transparency
        • Else - Actions
          • For each (Integer A) from 1 to 12, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Substring((Entered chat string), 5, 6)) Equal to (String((Integer A)))
                • Then - Actions
                  • Animation - Change Unit[((Player number of (Triggering player)) - 1)]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
                  • Unit - Change color of Unit[((Player number of (Triggering player)) - 1)] to (Color of (Player((Integer A))))
                • Else - Actions

This will work on this commands: Set random (random...) and Set x (1-12, 1=red , 2=blue etc.) change whatever you want to make it work for your map.



Second Question:

  • Unit - A unit comes within 256.00 of Specific Unit ON MAP
  • Trigger - Add to (This trigger) the event (Unit - A unit comes within 256.00 of Your Unit

The second one can use variables.


And a comment for wd40bomber7, he would need to use vertex colors because by "wild" he means a random color, not a player color but fully random.
 
Level 4
Joined
Dec 8, 2007
Messages
86
cant u do the killing like
  • Touch and Die
  • [events]Unit - A unit comes within 256.00 of Specific Unit ON MAP[/events]
  • [conditions](Owner of (Triggering unit)) Not equal to Player 12 (Brown)[/conditions]
  • [conditions]](Owner of (Triggering unit)) Not equal to Player 11 (Dark Green)[/conditions]
  • [actions]Unit - Kill (Triggering unit)[/actions]
 
Last edited:
Level 8
Joined
Feb 20, 2007
Messages
338
oh i didnt know how to do it :p

Open up your editor and you map, go to the trigger module.

Your window will have your trigger menu that you select the trigger you want to look at/modify. Select the trigger you want to post here.

In the area that you are working with the trigger (the main part of the window) you can either right click individual functions and you will have the option "copy as text" or you can select the whole trigger by right clicking on the name at the top of the middle part where you work on triggers, select copy as text.

Here at the form in reply to thread/message post box there is an icon of a grey cog. Click on that and you will get (in brackets)

(TRIGGER)( /TRIGGER)

I changed out the ] for ) and [ for ( so it will show here.

In between the two middle brackets past your text trigger.

When you preview or post your message all of the trigger commands will have all of their icons and be spaced and indented correctly.
 
Level 2
Joined
Oct 12, 2007
Messages
9
I don't know if you're still searching for a slide function, but this trigger from my escape map might help you.
This trigger is from a single player map, so you will have to put everything in a loop.
This trigger both slides the hero and kills the hero if he goes off the path (So you need no thousands of regions).
Should by leak free.:wgrin:

For the slide function you'll need a boolean variable "Slide".

  • Texturechecking
    • Events
      • Time - Every 0.05 seconds of game time
    • Condtitions
    • Actions
      • Set Heroposition = (Position of UnitEscaper)
      • Set Terraintype = (Terrain type at Heroposition)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Terraintype Equal to Cityscape - Grass
        • Then - Actions
          • Unit - Kill UnitEscaper
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terraintype Equal to Cityscape - Black Marble) and (Slide Equal to False)
        • Then - Actions
          • Set Slide = True
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terraintype Not equal to Cityscape - Black Marble) and (Slide Equal to True)
        • Then - Actions
          • Set Slide = False
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Slide Equal to True
        • Then - Actions
          • Unit - Move UnitEscaper instantly to (Heroposition offset by 10.00 towards (Facing of UnitEscaper) degrees), facing (Facing of UnitEscaper) degrees
        • Else - Actions
      • Custom script: call RemoveLocation(udg_Heldenposition)
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
Just incase you want a sliding with turning around use this (with your own conditions and values of course).

  • Find damage
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Unit - Make (Triggering unit) face (Target point of issued order) over 1.00 seconds
    • Else - Actions
 
Level 4
Joined
Dec 8, 2007
Messages
86
Do you think this trigger will work??

  • IceSlide THE TRIGGER
    • Events
      • Time - Every 0.60 seconds of game time
    • Conditions
    • Actions
      • -------- Makes a loop action that will run itself once for each player that is playing --------
      • For each (Integer A) from 1 to (Number of players in players), do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • slide[(Integer A)] Equal to True
            • Then - Actions
              • -------- Sets the first point varaible to the position of the sliding unit. --------
              • Set tempPointA[(Integer A)] = (Position of slideUnit[(Integer A)])
              • -------- Sets the second point varaible to the first point offset by the speed specified towards the angle that the unit is facing. --------
              • Set tempPointB[(Integer A)] = (tempPointA[(Integer A)] offset by slideSpeed[(Integer A)] towards (Facing of slideUnit[(Integer A)]) degrees)
              • -------- Moves the sliding unit to the second point --------
              • Unit - Move slideUnit[(Integer A)] instantly to tempPointB[(Integer A)]
              • -------- Remove Memory leaks :p --------
              • Custom script: call RemoveLocation(udg_tempPointA[GetForLoopIndexA()])
              • -------- Remove Memory leaks :p --------
              • Custom script: call RemoveLocation(udg_tempPointA[GetForLoopIndexB()])
            • Else - Actions
  • IceSlide Turn ON
    • Events
      • Unit - A unit enters SLIDE <gen>
    • Conditions
      • slideUnit[(Player number of (Owner of (Triggering unit)))] Equal to No unit
    • Actions
      • -------- Sets the slide unit to the unit that is entering --------
      • Set slideUnit[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • -------- Turns on the sliding trigger for the owner of the entering unit --------
      • Set slide[(Player number of (Owner of (Triggering unit)))] = True
      • -------- Sets a random slide speed - be creative here ^^ --------
      • Set slideSpeed[(Player number of (Owner of (Triggering unit)))] = (Random real number between 5.00 and 20.00)
  • IceSlide Turn OFF
    • Events
      • Unit - A unit leaves SLIDE <gen>
    • Conditions
      • slideUnit[(Player number of (Owner of (Triggering unit)))] Equal to (Triggering unit)
    • Actions
      • -------- Sets the sliding unit varaible to no unit so that it can be reassigned to the next unit owned by that player that enters --------
      • Set slideUnit[(Player number of (Owner of (Triggering unit)))] = No unit
      • -------- Turns off the sliding trigger for the owner of the leaving unit. --------
      • Set slide[(Player number of (Owner of (Triggering unit)))] = False
 
Level 2
Joined
Oct 12, 2007
Messages
9
The trigger looks good.
I just have one question: How do you want to set slide = true? It is difficult to create a region and use "Unit leaves region ..." because a hero could walk the way back and so he leaves the region when he still is on the normal path.
This is the main reason why I used in my trigger the "Terraintype = ..." conditions.
And, as I said, you'll need thousands of regions with "Unit enters region ...", to kill the hero when he walks off the path.

And I noticed one thing:
As far as I remember, you had 11 player slots.
An example: Slots 1 to 7 are full, 8 is empty and 9 to 11 are full.
So you get 10 players. You set the array for players 1 to 10. Now you have a problem. You forgot player 11 and used player 8, which is not used.
I don't know, how you are setting the array, but this problem could occur if every player (unused or not) has a slot.
 
Last edited:
Level 4
Joined
Dec 8, 2007
Messages
86
lol i have one whole trigger that kills units when entering regions and at the sides of the slide part they'll die (if not on the sliding part that is...)

and the players are
1-8 = players
11-12 = computers (god/death)
 
Level 2
Joined
Oct 12, 2007
Messages
9
You're right, you can put everything in one trigger with multiple events, but you have to create thousands of regions. Like I said, it is better to check it in one trigger and you won't need any regions. This saved me very much time when creating my map. But that's your decision, your time and your problem.

Anyway, good to know that there will be another escape map hosted on battle.net soon. :wgrin:
 
Level 4
Joined
Dec 8, 2007
Messages
86
okey the thing i need to learn is "variables" (omg i hate them sooo much)

cuz i have created a variable called "die1", "die2" and "die3" as "terrain type" variables and now my question is what more i need to do (the variable says)

Variable Name: Die1
Variable Type: Terrain Type
[v]Array Size: [1]
Initial Value: Dungeon - Brick

(is this correct???)
 
Level 2
Joined
Oct 12, 2007
Messages
9
Yes, that's correct. You can now check the terrain type with "If Terraintype at Position of Unit X gleich var".

One more thing to improve: Make a array (die[1], die[2], die[3]), so you only need one variable and not three.
 
Status
Not open for further replies.
Top