• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Peasants go to the gold mine despite I dont order them?

Status
Not open for further replies.
Level 4
Joined
Aug 26, 2015
Messages
71
Hello. I'm having trouble because:

* I do the cinematic, ok. When the cinematic ends, i order 5 peasants to go to lumber and 5 peasants to go to the gold mine but the first 5 peasants disobey me and go to the gold mine automatically and it ends being 10 peasants in gold mine. What's the problem? I don't really understand ._.

The important trigger:

  • Actions
    • Unit - Create 1 Mina de oro for Jugador 7 (verde) at (Center of Mina <gen>) facing (Position of Pared de árboles verano 0773 <gen>)
    • Set Mina = (Last created unit)
    • Unit Group - Order (Units in Rojos <gen>) to Harvest Pared de Árboles verano 0015 <gen>
    • Unit Group - Order (Units in Campesinos Mina <gen>) to Harvest Mina
 
Level 4
Joined
Aug 26, 2015
Messages
71
Mm i translated it but i left the less important names in my language so.. if you want them in english i can translate now:

  • Actions
    • Unit - Create 1 Gold Mine for Player 7 (green) at (Center of Mina <gen>) facing (Position of Trees 0773 <gen>)
    • Set Mina = (Last created unit)
    • Unit Group - Order (Units in Rojos <gen>) to Harvest Trees 0015 <gen>
    • Unit Group - Order (Units in Campesinos Mina <gen>) to Harvest Mina
When i start the game the 5 peasants i want to harvest lumber go to the gold mine without ordering them to do that.
 
Level 4
Joined
Aug 26, 2015
Messages
71
Checking out some tutorials? If you send me because there are a lot of tutorials..

I've tried to put them in unit groups (being them in regions) and treating them as a single unit because of the variable but i just simply couldn't so i used the regions.

PD : My script leaks because i have only put that? My script is x10 more text than that, but i have put the most important part, if you want i put in entire, but it's just so big.
 

sentrywiz

S

sentrywiz

I think you should post the entire trigger. what you think is the problem isn't necessarily the problem.
 
Level 4
Joined
Aug 26, 2015
Messages
71
Update: I've tried to put a mine and 5 peasants in other created map (with no triggers) and they go to the gold mine too, so i think it isn't an issue of my map :S. You should try too in another map with no triggers to see I'm not crazy or something. Put a gold mine, 5 peasants and then.

No matter how far they are, they'll go to the mine.
 

sentrywiz

S

sentrywiz

Update: I've tried to put a mine and 5 peasants in other created map (with no triggers) and they go to the gold mine too, so i think it isn't an issue of my map :S. You should try too in another map with no triggers to see I'm not crazy or something. Put a gold mine, 5 peasants and then.

No matter how far they are, they'll go to the mine.

I think like @DEE-BOO, you're ordering them to harvest which i believe is the behavior where they will scour resources on their own constantly, no matter how far it is, as long as they see it or are ordered to it.

You should try "right click once" order instead, see how that goes
 
Level 4
Joined
Aug 26, 2015
Messages
71
Ok. I see what you say. But the main problem is that, in spite of I don't order them ANYTHING (for example, delete all triggers) they go to the gold mine by their own, so , at the start of the cinematic they run to the gold mine.

I want them to hold position because in the cinematic they should be still, not running to the gold mine. I hope you understand me . Thats the main problem i have with this.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
Ok. I see what you say. But the main problem is that, in spite of I don't order them ANYTHING (for example, delete all triggers) they go to the gold mine by their own, so , at the start of the cinematic they run to the gold mine.

I want them to hold position because in the cinematic they should be still, not running to the gold mine. I hope you understand me . Thats the main problem i have with this.

Can you post the map? Need to look at the entire thing.
 
Level 4
Joined
Aug 26, 2015
Messages
71
Glavion, is the player owning those peasants controlled by a Computer?

Yes, it's controlled by a computer.

I can't post the trigger code because it isn't in english, and it's a bit difficult to me to translate all the code. I'm trying to download the world editor on english or something, when it's downloaded i'll post

Edit: Now i have the world editor on english. The trigger:

  • Movie
    • Events
      • Time - Elapsed game time is 0.00 seconds
      • Map initialization
    • Conditions
    • Actions
      • Trigger - Turn on skip <gen>
      • Unit Group - Order (Units in Rojos <gen>) to Harvest Summer Tree Wall 0015 <gen>
      • Player - Make Player 7 (Green) treat Player 10 (Light Blue) as an Ally
      • Player - Make Player 8 (Pink) treat Player 10 (Light Blue) as an Ally
      • If (SkipIntro Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Cinematic - Turn cinematic mode On for (All players)
      • Camera - Apply Camara Campesinos <gen> for Player 10 (Light Blue) over 0.00 seconds
      • If (SkipIntro Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Cinematic - Fade in over 2.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Wait 6.00 seconds
      • Unit Group - Order (Units in Ramon <gen>) to Move To (Center of Destino Ramon <gen>)
      • If (SkipIntro Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Wait 2.50 seconds
      • If (SkipIntro Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Cinematic - Send transmission to (All players) from Peasant 0006 <gen> named Ramón : Play RamonHolaChicos <gen> and display ¡Hola Chicos! Buen.... Modify duration: Add 0.00 seconds and Don't wait
      • Wait 7.00 seconds
      • Cinematic - Send transmission to (All players) from Peasant 0003 <gen> named Campesino : Play Camp1 <gen> and display No gracias... Nuest.... Modify duration: Add 0.00 seconds and Don't wait
      • If (SkipIntro Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Wait 5.00 seconds
      • Camera - Apply Camara AyM <gen> for Player 10 (Light Blue) over 0.00 seconds
      • Cinematic - Send transmission to (All players) from Sorceress 0010 <gen> named Hechicera: Play marta1 <gen> and display ¿Y tú quién nari.... Modify duration: Add 0.00 seconds and Don't wait
      • If (SkipIntro Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Wait 3.00 seconds
      • If (SkipIntro Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Unit Group - Order (Units in Ana y marta <gen>) to Move To (Center of Destino AyM <gen>)
      • Camera - Apply Camara Campesinos <gen> for Player 10 (Light Blue) over 4.00 seconds
      • Cinematic - Send transmission to (All players) from Peasant 0006 <gen> named Ramón : Play ramon2 <gen> and display Me llamo Ramón... .... Modify duration: Add 0.00 seconds and Don't wait
      • If (SkipIntro Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Wait 15.00 seconds
      • Cinematic - Send transmission to (All players) from Sorceress 0010 <gen> named Marta: Play marta2 <gen> and display Eh.. No gracias Ram.... Modify duration: Add 0.00 seconds and Don't wait
      • If (SkipIntro Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Wait 11.00 seconds
      • Cinematic - Send transmission to (All players) from Peasant 0006 <gen> named Ramón : Play ramon3 <gen> and display ¿Pero que pasa?? .... Modify duration: Add 0.00 seconds and Don't wait
      • If (SkipIntro Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Wait 8.00 seconds
      • If (SkipIntro Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Cinematic - Send transmission to (All players) from Sorceress 0010 <gen> named Marta: Play Marta3 <gen> and display ¡Atrapadlo señore.... Modify duration: Add 0.00 seconds and Don't wait
      • If (SkipIntro Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Wait 2.00 seconds
      • Unit Group - Order (Units in Caballeros Verde <gen>) to Move To (Center of Destino C verde <gen>)
      • Cinematic - Send transmission to (All players) from Peasant 0006 <gen> named Ramón : Play ramon4 <gen> and display ¿Pero que haces Pa.... Modify duration: Add 0.00 seconds and Don't wait
      • Wait 9.00 seconds
      • Cinematic - Fade out over 2.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Wait 2.00 seconds
      • Camera - Apply Camara AyM2 <gen> for Player 10 (Light Blue) over 0.00 seconds
      • Cinematic - Fade in over 2.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Wait 2.00 seconds
      • Cinematic - Send transmission to (All players) from Sorceress 0014 <gen> named Ana: Play ana1 <gen> and display ¿Este era el amigo.... Modify duration: Add 0.00 seconds and Don't wait
      • Wait 9.00 seconds
      • Trigger - Run Movie Done <gen> (checking conditions)
  • Movie Done
    • Events
    • Conditions
      • ((This trigger) is on) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off skip <gen>
      • Cinematic - Fade out over 2.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Wait 2.00 seconds
      • Unit - Remove Sorceress 0010 <gen> from the game
      • Unit - Remove Sorceress 0009 <gen> from the game
      • Unit - Remove Sorceress 0015 <gen> from the game
      • Unit - Remove Sorceress 0014 <gen> from the game
      • Unit Group - Pick every unit in (Units in Region Remove <gen>) and do (Unit - Remove (Picked unit) from the game)
      • Player - Make Player 7 (Green) treat Player 10 (Light Blue) as an Enemy
      • Player - Make Player 8 (Pink) treat Player 10 (Light Blue) as an Enemy
      • Unit - Remove Sorceress 0010 <gen> from the game
      • Unit - Remove Sorceress 0009 <gen> from the game
      • Unit - Remove Sorceress 0015 <gen> from the game
      • Unit - Remove Sorceress 0014 <gen> from the game
      • Unit Group - Pick every unit in (Units in Region Remove <gen>) and do (Unit - Remove (Picked unit) from the game)
      • Unit Group - Pick every unit in (Units in Caballeros Verde <gen>) and do (Unit - Remove (Picked unit) from the game)
      • Unit Group - Pick every unit in (Units in Ana y marta 2 <gen>) and do (Unit - Remove (Picked unit) from the game)
      • Cinematic - Turn cinematic mode Off for (All players)
      • Unit - Create 1 Knight for Player 7 (Green) at (Center of Cab spawn 1 <gen>) facing (Center of dest cab spawn 1 <gen>)
      • Set cabspawn1 = (Last created unit)
      • Unit - Create 1 Knight for Player 7 (Green) at (Center of Cab spawn 2 <gen>) facing (Center of dest cab spawn 2 <gen>)
      • Set cabspawn2 = (Last created unit)
      • Unit - Create 1 Knight for Player 7 (Green) at (Center of cab spawn 3 <gen>) facing (Center of dest cab spawn 3 <gen>)
      • Set cabspawn3 = (Last created unit)
      • Unit - Order cabspawn1 to Patrol To (Center of dest cab spawn 1 <gen>)
      • Unit - Order cabspawn2 to Patrol To (Center of dest cab spawn 2 <gen>)
      • Unit - Order cabspawn3 to Patrol To (Center of dest cab spawn 3 <gen>)
      • Selection - Select Paladin 0016 <gen>
      • Camera - Apply Start <gen> for Player 10 (Light Blue) over 0.00 seconds
      • Cinematic - Fade in over 1.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Wait 1.00 seconds
      • Unit - Create 1 Gold Mine for Player 7 (Green) at (Center of Mina <gen>) facing (Position of Summer Tree Wall 0773 <gen>)
      • Set Mina = (Last created unit)
      • Unit Group - Order (Units in Rojos <gen>) to Harvest Summer Tree Wall 0015 <gen>
      • Unit Group - Order (Units in Campesinos Mina <gen>) to Harvest Mina
      • Trigger - Run Quest <gen> (checking conditions)
  • skip
    • Events
      • Player - Player 10 (Light Blue) skips a cinematic sequence
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Set SkipIntro = True
      • Trigger - Run Movie Done <gen> (checking conditions)
  • Quest
    • Events
    • Conditions
      • ((This trigger) is on) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Special Effect - Create a special effect attached to the overhead of Villager (Female) 0023 <gen> using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
      • Set Exclamacion = (Last created special effect)
      • Quest - Create a Required quest titled |C00FFFF00Main Miss... with the description Busca información ..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
      • Set mision1 = (Last created quest)
      • Quest - Display to (All players) the Quest Discovered message: |cffffcc00MISIÓN P...
 
Level 25
Joined
May 11, 2007
Messages
4,651
  • Intro Done Peasants Harvest
    • Events
    • Conditions
    • Actions
      • -------- Create Goldmine --------
      • Set tempPoint1 = (Random point in Goldmine Create <gen>)
      • Unit - Create 1 Gold Mine for Neutral Passive at tempPoint1 facing (Random angle) degrees
      • Set tempUnit = (Last created unit)
      • Custom script: call RemoveLocation(udg_tempPoint1)
      • Wait 0.03 seconds
      • -------- Gold --------
      • Set tempGroup1 = (Units in Intro Gold <gen> matching (((Unit-type of (Matching unit)) Equal to Peasant) and ((Owner of (Matching unit)) Equal to Player 7 (Green))))
      • Unit Group - Order tempGroup1 to Harvest tempUnit
      • Custom script: call DestroyGroup(udg_tempGroup1)
      • -------- Lumber --------
      • Set tempGroup1 = (Units in Intro Lumber <gen> matching (((Unit-type of (Matching unit)) Equal to Peasant) and ((Owner of (Matching unit)) Equal to Player 7 (Green))))
      • Unit Group - Order tempGroup1 to Harvest Nearby Lumber
      • Custom script: call DestroyGroup(udg_tempGroup1)
      • -------- Specific tree --------
      • Unit - Order Blood Elf Engineer 0008 <gen> to Harvest Fall Tree Wall 0019 <gen>
Edit:
Remove the two events of Movie and replace it with Map init. You shouldn't have two events for a trigger like that.
 

Attachments

  • DzHarvest.w3x
    23.9 KB · Views: 45
Level 4
Joined
Aug 26, 2015
Messages
71
if you have a computer controlled player, try disabling its AI before the cinematic, and enable it again after it

How do i disable and enable the AI?

Really, i dont really know what happens in this game xd... the peasants START harvesting lumber without his trigger to do that being enabled yet? Oh my god... this is so... unreal xD

I have an idea. Can't I make the peasants hold position so they dont move until i order them?
 
Status
Not open for further replies.
Top