• 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 faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Get your art tools and paintbrushes ready and enter Hive's 34th Texturing Contest: Void! Click here to enter!

Unit Wander/Custom Names/Bigger Build Menu

Status
Not open for further replies.
Level 2
Joined
Jun 20, 2009
Messages
16
Unit Wander:
I am trying to make a map in the forms of a game where a builder has to build walls and towers to keep devilish units at bay, unfortunately I can not seem to get the units to wander around the map right, I've tried patrolling and Attack-Move to random points in the map. I think you could set it so every 60 seconds to have them patrol to a new area, but when I tried that they did one patrol and then walked back to where they spawned. Any ideas?

EDIT: Found out that it's an ability... never would have thought of that...

EDIT 2: Tried wander ability, they kinda just hung out in the middle, did not go far, any better suggestions?

EDIT 3: Fixed Wander ability! Just have it set so every 15 seconds they patrol to a random point in the map

Custom Names:
As a just-for-fun thing I wanted to make it so players could give them selves custom names. So I went into a old HaE game and "borrowed" the code for it. It came out like this when I did it on mine (Did not copy paste, to lazy xD)
picture_4.png

I enter -rename test and it does not rename me. What am I doing wrong?

Bigger Build Menu:
I've seen it before, where there are 2 build menus that a player can use. The reason I want this is because I have 13 buildings that have to be fitted into a 11 building space. I just can figure out how to do it.

Bonus! How do you update your world editor? Because the world editor I'm using right now is 1.20.4 and I heard that there is 1.22.something.

Any help is greatly appreciated,
-CGD
 
Last edited:
Level 9
Joined
Jun 3, 2009
Messages
486
I would try setting the leaderboard up as a variable :)
so it would look like
-Leaderboard setup
-actions
set (Variable Name of Leaderboard) to last created leaderboard

and then in the rename trig.
-Change label for (Triggering Player) in (Variable Name of Leaderboard) to (Substring((Entered chat string),9,30))
 
Level 2
Joined
Jun 20, 2009
Messages
16
I would try setting the leaderboard up as a variable :)
so it would look like
-Leaderboard setup
-actions
set (Variable Name of Leaderboard) to last created leaderboard

and then in the rename trig.
-Change label for (Triggering Player) in (Variable Name of Leaderboard) to (Substring((Entered chat string),9,30))

The leaderboard works in game, just the player name does not change on it or in normal chat
 
Level 9
Joined
Jun 3, 2009
Messages
486
Oh, :O
I would go into the editor and see if i could figure it out but im on my laptop that dosnt have WE on it, unless you wait about 30 minutes :p
 
Level 14
Joined
Mar 4, 2009
Messages
1,156
i think you need to add condition


substring(entered cheat string 1,8 equal to "-rename "

if you have any problem il give you my trigger that works
(with -setname )

EDIT:
i found the trigger....

works like this for me

  • set N
    • Events
      • Player - Player 1 (Red) types a chat message containing -setname as A substring
      • Player - Player 2 (Blue) types a chat message containing -setname as A substring
      • Player - Player 3 (Teal) types a chat message containing -setname as A substring
      • Player - Player 4 (Purple) types a chat message containing -setname as A substring
      • Player - Player 5 (Yellow) types a chat message containing -setname as A substring
      • Player - Player 6 (Orange) types a chat message containing -setname as A substring
      • Player - Player 7 (Green) types a chat message containing -setname as A substring
      • Player - Player 8 (Pink) types a chat message containing -setname as A substring
      • Player - Player 9 (Gray) types a chat message containing -setname as A substring
      • Player - Player 10 (Light Blue) types a chat message containing -setname as A substring
      • Player - Player 11 (Dark Green) types a chat message containing -setname as A substring
      • Player - Player 12 (Brown) types a chat message containing -setname as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 8)) Equal to -setname
    • Actions
      • Player - Set name of (Triggering player) to (Substring((Entered chat string), 9, 34))
just replace the "-setname" with your "-rename "
 
Level 2
Joined
Jun 20, 2009
Messages
16
If it updates Wc3, it should automaticly update WE too.

I checked, and for me it does not. It says that I have 1.23.(number spam) on my WC3 but on my WE its 1.20a. Should I tell Blizzard about this? and does being on a mac make a difference?

And I'm going to try that rename code to see if it works
 
Level 2
Joined
Jun 20, 2009
Messages
16
Tried the rename code, did not work for me, guess I'll just leave it out for now. But I really need to know how to get the second build menu (Otherwise known as Advanced Build Menu [I think...])

Oh, and sorry for the double post guys
 
Level 14
Joined
Mar 4, 2009
Messages
1,156
Tried the rename code, did not work for me, guess I'll just leave it out for now. But I really need to know how to get the second build menu (Otherwise known as Advanced Build Menu [I think...])

Oh, and sorry for the double post guys
if it works for me it must work for you
i dont have much time now but just replace "-setname " with "-rename " is you want

Crete trigger called "NAMES"
than go >edit>convert to custom text

than remoce all his functiions
(all right must be clear)

and paste this



function Trig_NAMES_Conditions takes nothing returns boolean
if ( not ( SubStringBJ(GetEventPlayerChatString(), 1, 8) == "-setname" ) ) then
return false
endif
return true
endfunction

function Trig_NAMES_Actions takes nothing returns nothing
call SetPlayerName( GetTriggerPlayer(), SubStringBJ(GetEventPlayerChatString(), 9, 34) )
endfunction

//===========================================================================
function InitTrig_NAMES takes nothing returns nothing
set gg_trg_NAMES = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(0), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(1), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(2), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(3), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(4), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(5), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(6), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(7), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(8), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(9), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(10), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(11), "-setname", false )
call TriggerAddCondition( gg_trg_NAMES, Condition( function Trig_NAMES_Conditions ) )
call TriggerAddAction( gg_trg_NAMES, function Trig_NAMES_Actions )
endfunction
 
Level 2
Joined
Jun 20, 2009
Messages
16
function Trig_NAMES_Conditions takes nothing returns boolean
if ( not ( SubStringBJ(GetEventPlayerChatString(), 1, 8) == "-setname" ) ) then
return false
endif
return true
endfunction

function Trig_NAMES_Actions takes nothing returns nothing
call SetPlayerName( GetTriggerPlayer(), SubStringBJ(GetEventPlayerChatString(), 9, 34) )
endfunction

//===========================================================================
function InitTrig_NAMES takes nothing returns nothing
set gg_trg_NAMES = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(0), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(1), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(2), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(3), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(4), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(5), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(6), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(7), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(8), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(9), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(10), "-setname", false )
call TriggerRegisterPlayerChatEvent( gg_trg_NAMES, Player(11), "-setname", false )
call TriggerAddCondition( gg_trg_NAMES, Condition( function Trig_NAMES_Conditions ) )
call TriggerAddAction( gg_trg_NAMES, function Trig_NAMES_Actions )
endfunction

I copied that into the custom text and then it came up with 15 errors (see picture for only some, my comp would not show them all)
picture_7.png
 
Level 14
Joined
Mar 4, 2009
Messages
1,156
i said waht you have to do

triggers>new trigger>Set name of created trigger to "NAME"
click the ctreated trigger>edit>convert to custom text

now clear all in "NAME" trigger

copy and paste my trigger

or jsut do it in GUI :D
 
Level 2
Joined
Jun 20, 2009
Messages
16
Good news guys! Got it to work, turns out I had put (substring((entered chat string), 1, 8) when it should have been (substring((entered chat string), 1, 7). So now it works! Just one more thing left, the bigger build menu.
 
Level 2
Joined
Jun 20, 2009
Messages
16
Bump! Still need an answer to the bigger build menu!

And I was thinking... Is it possible to create 4 regions on the outside of the map (like a box) and put them as a variable? Then use
  • (Issue Order ((patrol to (((Random Point in (((("VARIABLE NAME"))))
EDIT: Sorry for double post, I just really need to know the answer to this
 
Level 14
Joined
Mar 4, 2009
Messages
1,156
Bump! Still need an answer to the bigger build menu!

And I was thinking... Is it possible to create 4 regions on the outside of the map (like a box) and put them as a variable? Then use
  • (Issue Order ((patrol to (((Random Point in (((("VARIABLE NAME"))))
EDIT: Sorry for double post, I just really need to know the answer to this
yes but your regions should be a circle


E-unit is issued targeting a point
C-issued order equal to (your order)

set POINT_1 = target point of issued order
set POINT_2 = <center of your circle>
if/than/else
>Condition-distance between POINT_1 and POINT_2 less than <range of your circle>
than do
> (Your actions)
call RemoveLocation(udg_POINT_1)
call RemoveLocation(udg_POINT_2)
 
Status
Not open for further replies.
Top