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

Several problems with triggering

Status
Not open for further replies.
Level 3
Joined
Jun 1, 2013
Messages
47
Good Evening,

I'm having several little problems with mapping. Im gonna start with the easiest first:

1) What I wanna do: If a player enters a certain command (e.g. -cam 2000)
the cam should go to the distance "2000". The only solution I found is:
Event -> player1(red) -> chat message
Action ->camera -> set camera field (player 1(red)) (timed)

Now I can just copy it 12 times and then change the player 24 times, but how can I do it faster?


2) Event -> time elapsed -> 0 sec
Action ->Cinematic -> letterbox mode on (all players)
Action -> disable user control (all players)

First Problem
Action -> visibility -> create visibility modifier region (PROBLEM: only works for 1 player at a time)

Action -> Camera ->Apply camera object, Camera goes to object (PROBLEM: only works for 1 player at a time)

You can imagine the rest...



3)
Event: Periodic time event (every 600 sec)

Action: A specific number of units shall spawn in a region, then walk to another region (surrounding a gold mine with creeps in front of it) and attack there

THIS WORKS SO FAR!!

Now I need a condition of course.. I tried everything but it is not working with any of my conditions.

I want the following: Periodic Event -> every time when 600 sec pass -> check if there is any player building or any player that already built a structure at that goldmine. And ONLY IF THERE IS A PLAYER, spawn the units and attack there.

I tried the condition with : boolean comparison -> If "Region" contains constructed structure = True.
It does not work!
WHY??


Thanks for helping guys :)
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
1. try this
  • init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Trigger - Add to chat <gen> the event (Player - Player 1 (Red) types a chat message containing -asd 123 as An exact match)
  • chat
    • Events
    • Conditions
    • Actions
      • Camera - Set (Triggering player)'s camera Distance to target to 2000.00 over 0.00 seconds

2. use triggering player not player 1 etc

3. try region contains unit insted
 
Last edited:
Level 3
Joined
Jun 1, 2013
Messages
47
1. try this
  • init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Trigger - Add to chat <gen> the event (Player - Player 1 (Red) types a chat message containing -asd 123 as An exact match)
  • chat
    • Events
    • Conditions
    • Actions
      • Camera - Set (Triggering player)'s camera Distance to target to 2000.00 over 0.00 seconds

2. use triggering player not player 1 etc

3. try region contains unit insted



Thanks very much for your answer and also many thanks to Hera_
I encountered problems for all 3 solutions.
I attached the map with the triggers (1 folder each question)

For the 1st and 2nd question I applied exactly what you wrote.
It does not work, maybe you can explain me why?!

The 3rd question: I wrote my exact idea in the trigger commentary inside the attached file. Maybe then it's clearer. There is also my current trigger which does not work. (only the condition does not work, the action and the event work perfectly, just like they supposed to)


Thanks again for your help
 

Attachments

  • 2.w3x
    19.2 KB · Views: 86
Level 23
Joined
Oct 20, 2012
Messages
3,075
Problem 3 isn't solved in this map. You'd need several triggers for that. It's a tad complicated and will take some time to make. Time which I really don't have. But I think managed to fix the smaller problems for you. I didn't test it though. I added a few comments on the changes.

I'm no expert but from what I observed from your triggers. You need to read a few tutorials about triggering.

EDIT: Named the map Mew2.w3x for an unknown reason but that's the map.
 

Attachments

  • Mew2.w3x
    22.2 KB · Views: 61
Level 3
Joined
Jun 1, 2013
Messages
47
I solved all of them muhaha

sorry about the wrong triggers tho, seems like I didn't read through carefully.

also I hope its ok that I improved your cam command you can type in anything now. like -cam 3567

Thanks for you help. There is still a little problem:

Q 1) -cam command still only working for red

Q 2) visibility function not working for any player. And: How can I avoid the letterbox text from disappearing when someone presses ESC?
(Ive added the letterbox mode)

Q 3) not working, units dont summon even tho someone built building there
 
Level 3
Joined
Jun 1, 2013
Messages
47
1. That is really odd im 99% sure that my trigger works unless you changed something.
2. My bad again I did not touch them
3. Will look into that since it worked when I tested it

I repaired 1) (you accidently put "Player 1 (red)" in the Init trigger instead of "Player (Integer A)")

Now I just have the little problem in 2) and 3)
 
Status
Not open for further replies.
Top