• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Help]Units can't move even with buttons!

Status
Not open for further replies.
Level 11
Joined
Aug 1, 2009
Messages
714
=Title=
Ok I made a transportation system here.
  • Follow Charon
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set MP = (Position of Ferry_Charon)
      • Player Group - Pick every player in Ferry_Charon_Group and do (Actions)
        • Loop - Actions
          • Camera - Pan camera for (Picked player) to MP over 0.00 seconds
          • Selection - Select Ferry_Charon for (Picked player)
      • Custom script: call RemoveLocation (udg_MP)
  • Move Charon to Limbo
    • Events
      • Unit - A unit enters Move Charon 1 <gen>
    • Conditions
      • (Entering unit) Equal to Ferry_Charon
    • Actions
      • Unit Group - Pick every unit in Ferry_Charon_Passengers and do (Actions)
        • Loop - Actions
          • Unit - Unhide (Picked unit)
          • Unit - Unpause (Picked unit)
          • Set MP = (Random point in Call for Charon 1 <gen>)
          • Unit - Move (Picked unit) instantly to MP
          • Custom script: call RemoveLocation (udg_MP)
          • Unit - Deny shared vision of Ferry_Charon to (Owner of (Picked unit))
          • Selection - Select (Picked unit) for (Owner of (Picked unit))
      • Player Group - Remove all players from Ferry_Charon_Group
      • Unit Group - Remove all units from Ferry_Charon_Passengers
      • Game - Display to (All players) for 0.50 seconds the text: The Ferry Charon ha...
      • Wait 15.00 seconds
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in Call for Charon 1 <gen> matching ((((Matching unit) belongs to an ally of Player 9 (Gray)) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Not equal to Neutral Passive)))) and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to Ferry_Charon_Passengers
          • Unit - Hide (Picked unit)
          • Unit - Pause (Picked unit)
          • Unit - Grant shared vision of Ferry_Charon to (Owner of (Picked unit))
          • Player Group - Add (Owner of (Picked unit)) to Ferry_Charon_Group
      • Set MP = (Center of Move Charon to Cave 2 <gen>)
      • Unit - Order Ferry_Charon to Move To MP
      • Custom script: call RemoveLocation (udg_MP)
  • Move Charon to Inner Hell
    • Events
      • Unit - A unit enters Move Charon 2 <gen>
    • Conditions
      • (Entering unit) Equal to Ferry_Charon
    • Actions
      • Unit Group - Pick every unit in Ferry_Charon_Passengers and do (Actions)
        • Loop - Actions
          • Unit - Unhide (Picked unit)
          • Unit - Unpause (Picked unit)
          • Set MP = (Random point in Call for Charon 2 <gen>)
          • Unit - Move (Picked unit) instantly to MP
          • Custom script: call RemoveLocation (udg_MP)
          • Unit - Deny shared vision of Ferry_Charon to (Owner of (Picked unit))
          • Selection - Select (Picked unit) for (Owner of (Picked unit))
      • Player Group - Remove all players from Ferry_Charon_Group
      • Unit Group - Remove all units from Ferry_Charon_Passengers
      • Game - Display to (All players) for 0.50 seconds the text: The Ferry Charon ha...
      • Wait 15.00 seconds
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in Call for Charon 2 <gen> matching ((((Matching unit) belongs to an ally of Player 9 (Gray)) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Not equal to Neutral Passive)))) and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to Ferry_Charon_Passengers
          • Unit - Hide (Picked unit)
          • Unit - Pause (Picked unit)
          • Unit - Grant shared vision of Ferry_Charon to (Owner of (Picked unit))
          • Player Group - Add (Owner of (Picked unit)) to Ferry_Charon_Group
      • Set MP = (Center of Move Charon to Cave 1 <gen>)
      • Unit - Order Ferry_Charon to Move To MP
      • Custom script: call RemoveLocation (udg_MP)
When the Ship docks, I still can select my hero but even I command him to move to a point, he just ignore me and stay at his place. I even try attack ground to it but nothing works. Also I try to command him his (Instant) and (Point) Target Ability but still he just ignore my commands. Can you help me?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Can you post the map ?
I think you're not unpausing the unit, back ?
He's paused, is it ?
This line:
  • Unit Group - Pick every unit in (Units in Call for Charon 1 <gen> matching ((((Matching unit) belongs to an ally of Player 9 (Gray)) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Not equal to Neutral Passive)))) and do (Actions)
    • Loop - Actions
    • Unit Group - Add (Picked unit) to Ferry_Charon_Passengers
    • Unit - Hide (Picked unit)
    • Unit - Pause (Picked unit)
    • Unit - Grant shared vision of Ferry_Charon to (Owner of (Picked unit))
    • Player Group - Add (Owner of (Picked unit)) to Ferry_Charon_Group
 
Level 17
Joined
Jun 17, 2010
Messages
2,275
Ill tell you whats wrong with it, and ill tell you how to fix it.
  • Wait 15 seconds
Thats whats wrong with this trigger, if you step on that region twice within 15 seconds if freezes the trigger in an infinite loop never finishing only starting

Now to fix it you have to set up a counter, make a periodic event trigger and add a number to an integer, so for example

  • Game - Display to (All Players) for .50 seconds seconds....
  • Trigger - Turn on Timer <gen>
  • Events
    • Time - Every 1 second
  • Conditions
  • Actions
    • Set Timer = Timer + 1
    • If (Conditions) are true, then do (Then) actions else do (Else) actions
      • If - Conditions
        • (Timer) equals 15
      • Then - Actions
        • Trigger - Turn off (This Trigger)
      • Else - Actions
 

sentrywiz

S

sentrywiz

Like others said above:

You use waits. If your gonna use waits either:
-have the spell/ability be unique for one unit/hero/building whatever
-don't use it on more than one occasion, thus granting the triggers the time for it to successfully finish and not stuck itself in a loop

However, for your spell:
-you want it multi unit instancable (MUI) and use waits. Not gonna happen
-your picking everything 0.01 seconds of game time. Thats 100 times of a second. Nothing moves that fast :S

What you should fix (already mentioned above)
-use timer instead of a wait
-input every 0.5 - 1 second of game time, since you are moving something anyway


If you fixed your events because you read all this written, reward the users who posted above first with reps :p
 
Level 11
Joined
Aug 1, 2009
Messages
714
Like others said above:

You use waits. If your gonna use waits either:
-have the spell/ability be unique for one unit/hero/building whatever
-don't use it on more than one occasion, thus granting the triggers the time for it to successfully finish and not stuck itself in a loop

However, for your spell:
-you want it multi unit instancable (MUI) and use waits. Not gonna happen
-your picking everything 0.01 seconds of game time. Thats 100 times of a second. Nothing moves that fast :S

What you should fix (already mentioned above)
-use timer instead of a wait
-input every 0.5 - 1 second of game time, since you are moving something anyway


If you fixed your events because you read all this written, reward the users who posted above first with reps :p

Well, This is not a spell. This is a Transport System. I need only a solution that would fix my problem about stucking units even with their buttons are on.
 
Level 11
Joined
Aug 1, 2009
Messages
714
Ok I done everything you asked for.
  • Follow Charon
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set MP = (Position of Ferry_Charon)
      • Player Group - Pick every player in Ferry_Charon_Group and do (Actions)
        • Loop - Actions
          • Camera - Pan camera for (Picked player) to MP over 0.00 seconds
          • Selection - Select Ferry_Charon for (Picked player)
      • Custom script: call RemoveLocation (udg_MP)
  • Move Charon to Limbo
    • Events
      • Unit - A unit enters Move Charon 1 <gen>
    • Conditions
      • (Entering unit) Equal to Ferry_Charon
    • Actions
      • Unit Group - Pick every unit in Ferry_Charon_Passengers and do (Actions)
        • Loop - Actions
          • Set MP = (Random point in Docks 1 <gen>)
          • Unit - Move (Picked unit) instantly to MP
          • Custom script: call RemoveLocation (udg_MP)
          • Unit - Unhide (Picked unit)
          • Unit - Unpause (Picked unit)
          • Set MP = (Random point in Call for Charon 1 <gen>)
          • Unit - Move (Picked unit) instantly to MP
          • Custom script: call RemoveLocation (udg_MP)
          • Unit - Deny shared vision of Ferry_Charon to (Owner of (Picked unit))
          • Selection - Select (Picked unit) for (Owner of (Picked unit))
      • Player Group - Remove all players from Ferry_Charon_Group
      • Unit Group - Remove all units from Ferry_Charon_Passengers
      • Countdown Timer - Start Ferry_Charon_Timer[1] as a One-shot timer that will expire in 20.00 seconds
  • Move Charon to Limbo Timer
    • Events
      • Time - Ferry_Charon_Timer[1] expires
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in Call for Charon 1 <gen> matching ((((Matching unit) belongs to an ally of Player 9 (Gray)) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Not equal to Neutral Passive)))) and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to Ferry_Charon_Passengers
          • Unit - Hide (Picked unit)
          • Unit - Pause (Picked unit)
          • Unit - Grant shared vision of Ferry_Charon to (Owner of (Picked unit))
          • Player Group - Add (Owner of (Picked unit)) to Ferry_Charon_Group
      • Set MP = (Center of Move Charon to Cave 2 <gen>)
      • Unit - Order Ferry_Charon to Move To MP
      • Custom script: call RemoveLocation (udg_MP)
  • Move Charon to Inner Hell
    • Events
      • Unit - A unit enters Move Charon 2 <gen>
    • Conditions
      • (Entering unit) Equal to Ferry_Charon
    • Actions
      • Unit Group - Pick every unit in Ferry_Charon_Passengers and do (Actions)
        • Loop - Actions
          • Set MP = (Random point in Docks 2 <gen>)
          • Unit - Move (Picked unit) instantly to MP
          • Custom script: call RemoveLocation (udg_MP)
          • Unit - Unhide (Picked unit)
          • Unit - Unpause (Picked unit)
          • Unit - Deny shared vision of Ferry_Charon to (Owner of (Picked unit))
          • Selection - Select (Picked unit) for (Owner of (Picked unit))
      • Player Group - Remove all players from Ferry_Charon_Group
      • Unit Group - Remove all units from Ferry_Charon_Passengers
      • Countdown Timer - Start Ferry_Charon_Timer[2] as a One-shot timer that will expire in 20.00 seconds
  • Move Charon to Inner Hell Timer
    • Events
      • Time - Ferry_Charon_Timer[2] expires
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in Call for Charon 2 <gen> matching ((((Matching unit) belongs to an ally of Player 9 (Gray)) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Not equal to Neutral Passive)))) and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to Ferry_Charon_Passengers
          • Unit - Hide (Picked unit)
          • Unit - Pause (Picked unit)
          • Unit - Grant shared vision of Ferry_Charon to (Owner of (Picked unit))
          • Player Group - Add (Owner of (Picked unit)) to Ferry_Charon_Group
      • Set MP = (Center of Move Charon to Cave 1 <gen>)
      • Unit - Order Ferry_Charon to Move To MP
      • Custom script: call RemoveLocation (udg_MP)
But for now I cannot test it because I got no playmates for a while.
 
Level 11
Joined
Aug 1, 2009
Messages
714
Ok then here comes another triggers. Hope I get the shot this time.
  • Follow Charon
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set Ferry_Charon_MP = (Position of Ferry_Charon)
      • Player Group - Pick every player in Ferry_Charon_Group and do (Actions)
        • Loop - Actions
          • Camera - Pan camera for (Picked player) to MP over 0.00 seconds
          • Selection - Select Ferry_Charon for (Picked player)
      • Custom script: call RemoveLocation (udg_Ferry_Charon_MP)
  • Move Charon to Limbo
    • Events
      • Unit - A unit enters Move Charon 1 <gen>
    • Conditions
      • (Entering unit) Equal to Ferry_Charon
    • Actions
      • Unit Group - Pick every unit in Ferry_Charon_Passengers and do (Actions)
        • Loop - Actions
          • Set Ferry_Charon_MP_Dock = (Random point in Docks 1 <gen>)
          • Unit - Move (Picked unit) instantly to Ferry_Charon_MP_Dock
          • Custom script: call RemoveLocation (udg_Ferry_Charon_MP_Dock)
          • Unit - Unhide (Picked unit)
          • Unit - Unpause (Picked unit)
          • Unit - Deny shared vision of Ferry_Charon to (Owner of (Picked unit))
          • Selection - Select (Picked unit) for (Owner of (Picked unit))
      • Player Group - Remove all players from Ferry_Charon_Group
      • Unit Group - Remove all units from Ferry_Charon_Passengers
      • Countdown Timer - Start Ferry_Charon_Timer[1] as a One-shot timer that will expire in 20.00 seconds
  • Move Charon to Limbo Timer
    • Events
      • Time - Ferry_Charon_Timer[1] expires
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in Call for Charon 1 <gen> matching ((((Matching unit) belongs to an ally of Player 9 (Gray)) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Not equal to Neutral Passive)))) and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to Ferry_Charon_Passengers
          • Unit - Hide (Picked unit)
          • Unit - Pause (Picked unit)
          • Unit - Grant shared vision of Ferry_Charon to (Owner of (Picked unit))
          • Player Group - Add (Owner of (Picked unit)) to Ferry_Charon_Group
      • Set Ferry_Charon_MP_Dock = (Center of Move Charon to Cave 2 <gen>)
      • Unit - Order Ferry_Charon to Move To Ferry_Charon_MP_Dock
      • Custom script: call RemoveLocation (udg_Ferry_Charon_MP_Dock)
  • Move Charon to Inner Hell
    • Events
      • Unit - A unit enters Move Charon 2 <gen>
    • Conditions
      • (Entering unit) Equal to Ferry_Charon
    • Actions
      • Unit Group - Pick every unit in Ferry_Charon_Passengers and do (Actions)
        • Loop - Actions
          • Set Ferry_Charon_MP_Dock = (Random point in Docks 2 <gen>)
          • Unit - Move (Picked unit) instantly to Ferry_Charon_MP_Dock
          • Custom script: call RemoveLocation (udg_Ferry_Charon_MP_Dock)
          • Unit - Unhide (Picked unit)
          • Unit - Unpause (Picked unit)
          • Unit - Deny shared vision of Ferry_Charon to (Owner of (Picked unit))
          • Selection - Select (Picked unit) for (Owner of (Picked unit))
      • Player Group - Remove all players from Ferry_Charon_Group
      • Unit Group - Remove all units from Ferry_Charon_Passengers
      • Countdown Timer - Start Ferry_Charon_Timer[2] as a One-shot timer that will expire in 20.00 seconds
  • Move Charon to Inner Hell Timer
    • Events
      • Time - Ferry_Charon_Timer[2] expires
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in Call for Charon 2 <gen> matching ((((Matching unit) belongs to an ally of Player 9 (Gray)) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Not equal to Neutral Passive)))) and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to Ferry_Charon_Passengers
          • Unit - Hide (Picked unit)
          • Unit - Pause (Picked unit)
          • Unit - Grant shared vision of Ferry_Charon to (Owner of (Picked unit))
          • Player Group - Add (Owner of (Picked unit)) to Ferry_Charon_Group
      • Set Ferry_Charon_MP_Dock = (Center of Move Charon to Cave 1 <gen>)
      • Unit - Order Ferry_Charon to Move To Ferry_Charon_MP_Dock
      • Custom script: call RemoveLocation (udg_Ferry_Charon_MP_Dock)
 
Level 20
Joined
Jul 6, 2009
Messages
1,885
Still this doesnt work coz like what I've told you, the MP is a global variable and it gets removed everytime by ALL your triggers, specially Trigger1...

You should make variables like MP1, MP2, etc...
He doesn't need more useless variables. It's not going to change anything.
The countdown timer needs to be stored into a variable coz it will leak...
Global Countdown timers don't leak.
 
Status
Not open for further replies.
Top