• 🏆 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!

Help me with some trigger codes pls!

Status
Not open for further replies.
Level 2
Joined
Dec 23, 2005
Messages
21
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 :)
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
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?
 
Level 2
Joined
Dec 23, 2005
Messages
21
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:
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
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)
 
Level 2
Joined
Dec 23, 2005
Messages
21
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.
Ramza said:
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)
 
Level 2
Joined
Dec 23, 2005
Messages
21
I can't find "Kill the selector" in "Then:" :x

blubben said:
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.
Ramza said:
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)
 
Level 2
Joined
Dec 23, 2005
Messages
21
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"
 
Level 2
Joined
Dec 23, 2005
Messages
21
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 said:
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'
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
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
 
Level 2
Joined
Dec 23, 2005
Messages
21
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)

Code:
Unit - Create 25 Peasant for Player 12 (Brown) at (Center of Spawn Region 01 <gen>) facing Default building facing degrees
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
or shall I do that with all heroes i have in the buildings?

yes

And when im tryin to test start the game warcraft 3 crashes why??

hmm... I dont know, maybe u did sum of my triggers wrong, cuz if u do em right, they shouldnt let u crash. Check all ur triggers again to look if something is different form what I posted.

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

Go to the Initilization trigger and delete the 'melee' functions

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


01, 02, 03, 04)

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

Yes, thats good. and now order them to move to another location (unit group - order targeting a point)
 
Level 2
Joined
Dec 23, 2005
Messages
21
Ok, everything is right? :D without the crash :(


But in what shall i use order? Event, Conditions, Action? and should I create a new trigger for that?
 
Level 2
Joined
Dec 23, 2005
Messages
21
Ok, i have done that now. :) But i can't see the map? the hero buildings and that. I can only see the Gate Way but its still shadow of the rest of the map. how do i do so i can see everything? (I have deleted all melee functions in Melee Initialazion. like you told me to do.
 
Status
Not open for further replies.
Top