• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

-Enter command

Status
Not open for further replies.
Level 4
Joined
Nov 14, 2009
Messages
63
I need some help.I placed a fountain of health and i want if player gerts near that fountain and write -enter the player will transport to another region.How to do that?

{EDIT}
Come on you can help, cant you?
 
Last edited by a moderator:
something like:
  • Helping You
    • Events
      • Player - Player 1 (Red) types a chat message containing -enter as An exact match
    • Conditions
      • (YourRegion contains (Position of YourUnit)) Equal to True
    • Actions
      • Unit - Move YourUnit instantly to (Center of YourRegion)
leak free
  • Helping You
    • Events
      • Player - Player 1 (Red) types a chat message containing -enter as An exact match
    • Conditions
      • (YourRegion contains (YourUnit)) Equal to True
    • Actions
      • Set SomePoint to (Center of YourRegion)
      • Unit - Move YourUnit instantly to SomePoint
      • Custom script: call RemoveLocation(udg_SomePoint)
plz rep if you can
 
Last edited:
Don't ask for rep thats really annoying lol...

Set a Variable to equal your hero unit.


  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -Enter as An exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Camera_unit[(Player number of (Triggering player))] is in (Units within 100.00 of (Position of (Fountain of Life)))) Equal to True
        • Then - Actions
          • Unit - Move Camera_unit[(Player number of (Triggering player))] instantly to (Center of (DESTINATION_REGION))
        • Else - Actions
 
yea, it's also not a real trigger. if he wanted perfect code he would have asked for jass, but considering the simplicity of the question i'd assume leaks don't matter right now.

This is one of the most stupid answers i have seen...WHAT is this supposed to mean?GUI isn't good?Well if you don't like it,don't use it.THAT doesn't mean that GUI triggers are useless or just too simple,i think that almost everything is possible in GUI +Custom texts(where you can use a few important jass actions).
So just don't reply telling him that GUI <<suck>> and he should use.
Oh by the way, crl made a clear example to help him,it is leaking though as mentioned.
 
ATTACK MortAr-!!!

Wheres the love, brother?

It's actually a correct thing to do, he/she only presents the answer in the most simplistic way, meaning no extra other things that the person in question might get more questions about, not to mention that this isn't a big leaker at all unless you keep moving that region you move them to.

Rofl.

Don't ask for rep thats really annoying lol...

Set a Variable to equal your hero unit.


  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -Enter as An exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Camera_unit[(Player number of (Triggering player))] is in (Units within 100.00 of (Position of (Fountain of Life)))) Equal to True
        • Then - Actions
          • Unit - Move Camera_unit[(Player number of (Triggering player))] instantly to (Center of (DESTINATION_REGION))
        • Else - Actions

Leaks a position.
 
This is one of the most stupid answers i have seen...WHAT is this supposed to mean?GUI isn't good?Well if you don't like it,don't use it.THAT doesn't mean that GUI triggers are useless or just too simple,i think that almost everything is possible in GUI +Custom texts(where you can use a few important jass actions).
So just don't reply telling him that GUI <<suck>> and he should use.
Oh by the way, crl made a clear example to help him,it is leaking though as mentioned.

You're right, I'm obviously a fucking idiot that knows nothing about programming.

Please hang yourself for not reading the thread and it's context before commenting on the situation.

Here are the details you missed:
-OP requested a VERY simple trigger
-VERY simple trigger was given
-noob complained about leaks in a VERY simple GUI trigger
-I explained why fixing leaks was unnecessary in this context

So now that I have your attention and you understand what's going on, let me explain some things:
-"custom text" IS jass, therefor a GUI trigger that leaks cannot be fixed without jass
-The requested trigger could be done in jass not only leakless, but without using anything that leaks in the first place
-the WE GUI scripting interface is by NO standards "as good" nor "better" nor "easier" than jass.

So once again, just to sum everything up. I didn't suggest that GUI was bad in this case. I didn't suggest that leaks were good in this case. I didn't suggest that I had to use GUI. I didn't suggest that crl didn't make a helpful post. I didn't suggest that GUI sucks.
 
if he wanted perfect code he would have asked for jass

Then what is this supposed to mean?Doesn't this means GUI sucks?
But anyway i don't want to start a Jass Vs GUI thread cause i know Jass is better...and i know that custom texts ARE Jass.But those actions are almost known by everyone to fix leaks,like RemoveLocation,DestroyGroup,DestroyForce ...
 
something like:
  • Helping You
    • Events
      • Player - Player 1 (Red) types a chat message containing -enter as An exact match
    • Conditions
      • (YourRegion contains (Position of YourUnit)) Equal to True
    • Actions
      • Unit - Move YourUnit instantly to (Center of YourRegion)

The condition isn't "Position of YourUnit"
You should really use "<Region> contains (Unit) Equal to True"

Fixed Trigger:
  • Command
    • Events
      • Player - Player (#) types a chat message containing -enter as an exact match
    • Conditions
      • Region <gen> contains (Unit) Equal to True
    • Actions
      • Set Position = Center of OtherRegion
      • Unit - Move (Unit) instantly to Position
      • Custom script: call RemoveLocation(udg_Position)
 
Then what is this supposed to mean?Doesn't this means GUI sucks?
But anyway i don't want to start a Jass Vs GUI thread cause i know Jass is better...and i know that custom texts ARE Jass.But those actions are almost known by everyone to fix leaks,like RemoveLocation,DestroyGroup,DestroyForce ...

It means that GUI can't do it as efficiently as JASS under any circumstances.

The entire point of my rant was that a knowledgeable jass user can write the same script without using anything that leaks, rather than worrying about cleaning them up.
 
Status
Not open for further replies.
Back
Top