Warcraft III resources & community, 2003–2006 · archived

Help me with some trigger codes pls!

21 posts
#1

Help me with some trigger codes pls!

Hi, im tryin to do my first map ever and now i need some trigger codes to get things to work and so on.

1. I wonder how to spawn creeps from Start Location

2. How do i do when someone choose their hero the hero spawns on a location with Start Location.

3.And when someone dies the hero revives all the time?

4. I nearly forgot this, I wonder how to do a timer on the next spawn with creeps.

Thx for all :)
#2
1) unit - create unit facing point (or angle)

2) Unit enters 'Rect' (At the triggering hero) Remove the 'selector' and remove 'the example herp'
And now use the create unit trigger to create a hero

3)
Events:
Unit dies
Conditions: Dying unit is a hero = true (Boolean Comparison)
Actions: Hero - Revive dying unit at 'rect'

4) U mean after a creep dies, or a spawner for TD's?
#3
I mean when all creeps are dead its come up a timer to the next spawn. Yes like a TD but this isnt a TD map.

And can you try to explain a bit more for me with that you just explained? Cuz this is my first time and i dont really know where everything is. :oops:
#4
np

1) I cant explain, its just a function (The first function of all unit functions)

2) Make a neutral hero (the custom) and put it at the place where u want players to select heroes. Put a circle of power in front of it and a Rect.
Events: (4th unit event) Unit enters 'The Rect u placed in front of the hero'
Conditions: --------
Actions: If, Then, Else Multiple functions
If: Owner of entering unit = player 1
Then:
Kill the selector (a wisp or sumthing)
Create 1 hero for player 1

3) I cant explain easier, they r just 3 trigger functions that u can find (the event at 'unit', the condition at 'boolean' and the action at 'hero')

4)
Events: Unit dies
Conditions: --------
Actions: Wait ... seconds
Unit - Create 1 (unit-type of (dying unit)) at position of (dying unit) facing (facing of dying unit)
#5
Ok, but can you explain how I find the first function of all unit functions? And what is a rect? the other thing i know how to do. But the circle of power. I wanted to buy hero from a building :s if that is possible.
Ramzanp

1) I cant explain, its just a function (The first function of all unit functions)

2) Make a neutral hero (the custom) and put it at the place where u want players to select heroes. Put a circle of power in front of it and a Rect.
Events: (4th unit event) Unit enters 'The Rect u placed in front of the hero'
Conditions: --------
Actions: If, Then, Else Multiple functions
If: Owner of entering unit = player 1
Then:
Kill the selector (a wisp or sumthing)
Create 1 hero for player 1

3) I cant explain easier, they r just 3 trigger functions that u can find (the event at 'unit', the condition at 'boolean' and the action at 'hero')

4)
Events: Unit dies
Conditions: --------
Actions: Wait ... seconds
Unit - Create 1 (unit-type of (dying unit)) at position of (dying unit) facing (facing of dying unit)
#6
uhmm.... the first unit function is the function that u will see when u go to the unit section in triggers :P

a Rect is a Region. u can place em with Region or Rect editor

and for the hero choose with building, just make another event and keep the same actions
#7
Ok, im trying to understand "Then:" :)
If you got msn can you pls add me? [email protected] for fast answer?
#8
Ive got MSN, but Im almost never on

[email protected]
#9
I can't find "Kill the selector" in "Then:" :x

blubbenOk, but can you explain how I find the first function of all unit functions? And what is a rect? the other thing i know how to do. But the circle of power. I wanted to buy hero from a building :s if that is possible.
Ramzanp

1) I cant explain, its just a function (The first function of all unit functions)

2) Make a neutral hero (the custom) and put it at the place where u want players to select heroes. Put a circle of power in front of it and a Rect.
Events: (4th unit event) Unit enters 'The Rect u placed in front of the hero'
Conditions: --------
Actions: If, Then, Else Multiple functions
If: Owner of entering unit = player 1
Then:
Kill the selector (a wisp or sumthing)
Create 1 hero for player 1

3) I cant explain easier, they r just 3 trigger functions that u can find (the event at 'unit', the condition at 'boolean' and the action at 'hero')

4)
Events: Unit dies
Conditions: --------
Actions: Wait ... seconds
Unit - Create 1 (unit-type of (dying unit)) at position of (dying unit) facing (facing of dying unit)
#10
I can't find "Kill the selector" in "Then:" :x


Hehe... :P Go to unit - kill. With that u can kill every unit, also 'selectors' 8)
#11
Ok, cool :D But when im looking for "The Selector" i can't find it.. :( Can it be Entering Unit? :? :)

And where do I find "Create 1 hero for player 1"
#12
Ok, cool icon_biggrin.gif But when im looking for "The Selector" i can't find it.. icon_sad.gif Can it be Entering Unit?


Yes, its the entering unit

And where do I find "Create 1 hero for player 1"


U can do that with the 'create unit' function. Just select the hero at 'unit'
#13
Ok, im nearly done! :P
But I have to select a "hero" for example. Blademaster is that right or should it be something else?

And btw, i have done 4 Shimmering Portals that i gonna use for spawning units.. How do i do so it spawns from all 4 at the same time? and then it goes harder and harder to defense the castle?

Ramza
Ok, cool icon_biggrin.gif But when im looking for "The Selector" i can't find it.. icon_sad.gif Can it be Entering Unit?


Yes, its the entering unit

And where do I find "Create 1 hero for player 1"


U can do that with the 'create unit' function. Just select the hero at 'unit'
#14
But I have to select a "hero" for example. Blademaster is that right or should it be something else?


I dunno what u mean. Why isnt a Blademaster right?

And btw, i have done 4 Shimmering Portals that i gonna use for spawning units.. How do i do so it spawns from all 4 at the same time? and then it goes harder and harder to defense the castle?


U have to make a Region at every portal.

Make a trigger

Events: Map Initilization
Conditions: -------
Actions: Create ... 'units' at 'the region at portal 1'
etc, etc
wait ... seconds (for next lvl)
Create other units at the 4 spawn regions
#15
I mean with the hero that I have to choose other heros or shall I do that with all heroes i have in the buildings?

And when im tryin to test start the game warcraft 3 crashes why?? And I have set a Start Location for Red but when I start I got a castle or sumthing and 5 peasants i want to delete that so I can choose hero without having a castle and 5 peasants


(I have done 4 region to the 4 portals and have maked 4 triggers with these


01, 02, 03, 04)

Unit - Create 25 Peasant for Player 12 (Brown) at (Center of Spawn Region 01 <gen>) facing Default building facing degrees