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

Item turns into unit. Help?

Status
Not open for further replies.
Level 5
Joined
Dec 12, 2006
Messages
128
Here is my trigger to get the item. This part seems to work.

  • Drop wood when dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Tree
    • Actions
      • Item - Create Wood at (Position of (Dying unit))
      • Wait 2.00 seconds
      • Unit - Create 1 (Unit-type of (Dying unit)) for Player 9 (Gray) at (Position of (Dying unit)) facing Default building facing degrees
I want to be able to pick it up and drop it somewhere else. I want to be able to select the unit and change it. I have that part working. Here is my trigger that won't work.

  • Turn wood item to fire
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item-type of (Last dropped item)) Equal to Wood
    • Actions
      • Unit - Create 1 Wood for Player 9 (Gray) at (Position of (Triggering unit)) facing Default building facing degrees
      • Item - Remove (Last dropped item)
Thanks in advanced.
 
Level 3
Joined
May 4, 2007
Messages
66
I dont actualy get what do u realy want but i can see what wrong with ure tirgger. Instead using "Last dropped item" use "Item Being Manipulated". So ure trigger should look like this:
  • Events
    • Unit - A unit Loses an itemConditions
  • Conditions
    • (Item-type of (Item being manipulated)) Equal to Wood
  • Actions
    • Unit - Create 1 Wood for Player 9 (Gray) at (Position of (Triggering unit)) facing Default building facing degrees
    • Item - Remove (Item being manipulated)
 
just like Nosferatu said, that you need Item Being Manipulated.
But you will need a wait like this too:
  • Events
    • Unit - A unit Loses an item
  • Conditions
    • (Item-type of (Item being manipulated)) Equal to Wood
  • Actions
    • Wait 0.00 seconds
    • Unit - Create 1 Wood for Player 9 (Gray) at (Position of (Triggering unit)) facing Default building facing degrees
    • Item - Remove (Item being manipulated)
I had the same problem
 
Level 5
Joined
Dec 12, 2006
Messages
128
Thank you quys the trigger works.
Also
A comment on Trigger 1: I'm not sure, but does it actually work?
I'd suspect that after waiting 2 seconds, there no longer is a "dying unit", thus, such a unit can't be created...
Trigger one works.
I changed the condition from last item dropped to Item being manipulated and it worked. Ty.
 
Status
Not open for further replies.
Top