• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

This is probably a really stupid question but...

Status
Not open for further replies.
Level 12
Joined
Jul 7, 2009
Messages
1,030
How do I create a trigger which does the following:
The Destructible (A Cage) is destroyed
The Destructible spawns a Unit (Forest Troll) on death
The Unit (Forest Troll) now belongs to the Owner of the Triggering Unit

Any ideas?
Sorry for such a dumb question.
I tried it out and I used Regions but my knowledge of regions isn't very extensive

This is for a melee map.
 
Level 12
Joined
Jul 7, 2009
Messages
1,030
I meant the building was a cage so it doesn't attract enemies.
It's Neutral and it's up to the player to decide to attack it.
Here's what I created:
[trigger=Cage Spawn]
Events
Destructible - A destructible within Region 000 <gen> dies
Conditions
Actions
Unit - Create 1 Satyr Hellcaller for (Owner of (Triggering unit)) at (Center of (Playable map area)) facing Default building facing degrees[/trigger]

Can anybody point out the problem to me?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Please download my map and test it ?
In post #2

Just change the state of the cage to Neutral Passive, that's all
All I do inside of the test map was turned that cage to Neutral Hostile, which will aggro towards Player-based unit
Change it to Neutral Passive unit, it should be fine
 
Level 12
Joined
Jul 7, 2009
Messages
1,030
Yeah,
I checked it out.
And I couldn't understand anything that was on the trigger you created.
But thanks.

PS. Could you tell me what this means?
[trigger=Cage Break]
Actions
Set TrollLoc = (Position of (Triggering unit))
Unit - Create 1 Dark Troll for (Owner of (Killing unit)) at TrollLoc facing Default building facing degrees
Custom script: call RemoveLocation(udg_TrollLoc)[/trigger]

What's TrolLoc?
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
I meant the building was a cage so it doesn't attract enemies.
It's Neutral and it's up to the player to decide to attack it.
Here's what I created:
[trigger=Cage Spawn]
Events
Destructible - A destructible within Region 000 <gen> dies
Conditions
Actions
Unit - Create 1 Satyr Hellcaller for (Owner of (Triggering unit)) at (Center of (Playable map area)) facing Default building facing degrees[/trigger]

Can anybody point out the problem to me?

Defskull already fixed your problem, but I'm just pointing out what's wrong with your trigger:

1) You're creating the Satyr for the owner of triggering unit. But there is no triggering unit, only a triggering destructible.

2) You're creating the Satyr at the centre of playable map area. It should be created at the position of dying destructible.
 
Level 11
Joined
Oct 31, 2010
Messages
1,057
who cares said:
Yeah,
I checked it out.
And I couldn't understand anything that was on the trigger you created.
But thanks.

PS. Could you tell me what this means?

Cage Break: Actions

Set TrollLoc = (Position of (Triggering unit))
Unit - Create 1 Dark Troll for (Owner of (Killing unit)) at TrollLoc facing Default building facing degrees
Custom script: call RemoveLocation(udg_TrollLoc)


What's TrolLoc?
TrollLoc is a variable
a variable means somethingand then he setted variable
the "something" is Position of the triggering unit
and the triggering unit is the cagethen,he does when the life percentage of the cage is 0,create a dark troll at the "triggering unit" which means create a dark troll at the cage positionand the last sentence is to clear the leakage

look,this is barely what it means,not the true meaning

NOTE:the colors means they are the same
RED COLOR = THE CAGE WHICH IS THE TRIGGERING UNIT :goblin_good_job:
PURPLE COLOR = the dark trolll :goblin_good_job:
 
Last edited:
Level 2
Joined
Dec 24, 2010
Messages
18
Guys, theres a really simple trigger for this. There are specific events for destructibles dying. No region is needed. Then, for actions, just make it so that it spawns a unit owned by player that attacked/killed the destructible at the position of the destructible which you can select with variables.
 
Status
Not open for further replies.
Top