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

Murloc Rush!!! Questions on certain needs.

Status
Not open for further replies.
Level 5
Joined
Apr 20, 2008
Messages
150
For those who have been in Map Development for about 24 hours, may have seen my Murloc Rush thread. As I said there, I need info on how to do certain triggers iconic with Footie Frenzy Maps:

Units spawning from a building at regular intervals.
Making it so player characters give gold and lumber on death (Lumber is going to be dropped from heroes for special items)
Changing the spawned unit depending on the building used.

and a few I wanted to add myself:

Limiting the amount of W3 heros to 3, but allowing a 4th, custom hero to be purchased.
Making the starting level of a Hero be 5 instead of 1.
Is it possible to extend the line of sight past 1800?

:confused:

Anyone who can point me in the right direction, thank you in advanced!!!
 
Level 4
Joined
May 4, 2008
Messages
113
>> Units spawning from a building at regular intervals.
Code:
Events
 Time - Every 5.00 seconds of game time

Actions
 Unit Group - Pick every unit in (Units of type Barracks) and do:
  Loop - (Actions):
   Create 1 Footman at (Position of (Picked unit)) for (Owner of (Picked unit))
facing Default building facing degrees

It would be worth knowing that this leaks both several points and a unit group.

Heres how to fix it: Make two variables, Temp_Point and Temp_Group:
Code:
Events
 Time - Every 5.00 seconds of game time

Actions
 Set Temp_Group = (Units of type Barracks)
 Unit Group - Pick every unit in Temp_Group and do:
  Loop - (Actions):
   Set Temp_Point = Position of (Picked unit)
   Unit - Create 1 Footman at Temp_POint for (Owner of (Picked unit))
facing Default building facing degrees
   Custom Script: call RemoveLocation (udg_Temp_Point)
 Custom Script: call DestroyGroup (udg_Temp_Group)

>> Making it so player characters give gold and lumber on death (Lumber is going to be dropped from heroes for special items)
Code:
Events
 Unit - A unit dies

Conditions
 (Triggering unit) is A Hero Equal to True << Boolean Condition

Actions
 Player - Add 100 to (Owner of (Killing unit)) Current gold
 Player - Add 1 to (Owner of (Killing unit)) Current lumber

>>Changing the spawned unit depending on the building used.
Change the first trigger so it picks a different type of unit instead of Barracks, and spawns a different type of unit instead of footman.
You'll really have to fix the leaks, though.

>> Making the starting level of a Hero be 5 instead of 1.

Code:
Events
 Unit - A unit Finishes training a unit

Conditions
 (Trained unit) is A Hero Equal to True

Actions
 Hero - Set Level of (Trained unit) to 5, hide level-up graphics

>> Is it possible to extend the line of sight past 1800?

Have you tried Shift + Double-Clicking the Line of Sight field in the object editor?
 
Last edited:
Level 4
Joined
May 4, 2008
Messages
113
I think these questions could be easily answered by yourself if you would take 10 minutes to look around in World Editor.
Be sure to read about leaks, either by searching on this site or google.

I'd agree, but in my opinion sometimes people need a kick start if they want to fully understand some areas of triggering.

Thats how it was for me, anyway.
 
Level 5
Joined
Apr 20, 2008
Messages
150
Not to seem disrespectful, but there's a few errors in this assistance.

>> Units spawning from a building at regular intervals.
Code:
Events
 Time - Every 5.00 seconds of game time

Actions
 Unit Group - Pick every unit in (Units of type Barracks) and do:
  Loop - (Actions):
   Create 1 Footman at (Position of (Picked unit)) for (Owner of (Picked unit))
facing Default building facing degrees

It would be worth knowing that this leaks both several points and a unit group.

Heres how to fix it: Make two variables, Temp_Point and Temp_Group:
Code:
Events
 Time - Every 5.00 seconds of game time

Actions
 Set Temp_Group = (Units of type Barracks)
 Unit Group - Pick every unit in Temp_Group and do:
  Loop - (Actions):
   Set Temp_Point = Position of (Picked unit)
   Unit - Create 1 Footman at Temp_POint for (Owner of (Picked unit))
facing Default building facing degrees
   Custom Script: call RemoveLocation (udg_Temp_Point)
 Custom Script: call DestroyGroup (udg_Temp_Group)

I think you were thinking of the unit being in the building to begin with. I was wanting units to appear DEPENDING on what the building is. If you have played Footmen Frenzy maps, you know what I'm talking about by the Tiering.

>> Making it so player characters give gold and lumber on death (Lumber is going to be dropped from heroes for special items)
Code:
Events
 Unit - A unit dies

Conditions
 (Triggering unit) is A Hero Equal to True << Boolean Condition

Actions
 Player - Add 100 to (Owner of (Killing unit)) Current gold
 Player - Add 1 to (Owner of (Killing unit)) Current lumber

Um, is there a way to use the unit/hero's bountie for this instead of a concrete action?

>>Changing the spawned unit depending on the building used.
Change the first trigger so it picks a different type of unit instead of Barracks, and spawns a different type of unit instead of footman.
You'll really have to fix the leaks, though.

See first response


>> Making the starting level of a Hero be 5 instead of 1.

Code:
Events
 Unit - A unit Finishes training a unit

Conditions
 (Trained unit) is A Hero Equal to True

Actions
 Hero - Set Level of (Trained unit) to 5, hide level-up graphics


Maybe for Alters, but not for Taverns. Is there a version of this for Taverns?

>> Is it possible to extend the line of sight past 1800?

Have you tried Shift + Double-Clicking the Line of Sight field in the object editor?

And every other combination of keys. 3000 keeps turning into 1800 again. BTW, that was the first thing I tried before posting.

I hate to say it, but this version of solutions doesn't really fit the needs for my map. Perhaps re-wording for the new insights?
 
Status
Not open for further replies.
Top