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

Help please

Status
Not open for further replies.
Level 2
Joined
Oct 23, 2011
Messages
28
When i press an item it should create a new unit with same inventory, same spell cooldowns and same health percentage. I need the new unit for a spell i have. The new unit should face the same direction as the other unit before. Please help me
 
Level 2
Joined
Oct 23, 2011
Messages
28
I think i didn't make myself clear. I tried to do that but my map crashed every time i ran it. So i need some help from good map makers and i hope you can help me. I need a system when you click on a item you spawn a new unit that has same HP percentage and same items as the original one and he is on the same position as the triggering unit. Please help me since when i tried it crashed every time. :(
 
Level 2
Joined
Oct 23, 2011
Messages
28
  • Untitled Trigger 003
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to |cFF970707Knife|r
    • Actions
      • Set TempUnit = (Triggering unit)
      • Set TempItem = (Item carried by TempUnit in slot 1)
      • Set TempItem2 = (Item carried by TempUnit in slot 2)
      • Set TempItem3 = (Item carried by TempUnit in slot 3)
      • Set TempItem4 = (Item carried by TempUnit in slot 4)
      • Set TempItem5 = (Item carried by TempUnit in slot 5)
      • Set TempItem6 = (Item carried by TempUnit in slot 6)
      • Set TempPoint = (Position of TempUnit)
      • Set TempReal = (Percentage life of TempUnit)
      • Unit - Create 1 |cFFFF0000 Survivor with knife |r for (Owner of TempUnit) at (Position of (Triggering unit)) facing (Facing of TempUnit) degrees
      • Unit - Remove TempUnit from the game
      • Hero - Give TempItem to (Last created unit)
      • Hero - Give TempItem2 to (Last created unit)
      • Hero - Give TempItem3 to (Last created unit)
      • Hero - Give TempItem4 to (Last created unit)
      • Hero - Give TempItem5 to (Last created unit)
      • Hero - Give TempItem6 to (Last created unit)
      • Unit - Set life of (Last created unit) to TempReal%
      • Point - Remove TempPoint
just a bit info this is my first map and i'm a 12 year old :D
 
This line - [Point - Remove TempPoint] --> what is that, how do you even manage to put that into a trigger??? I think it should be giving you a syntax error...

Unit - Create 1 |cFFFF0000 Survivor with knife |r for (Owner of TempUnit) at (Position of (Triggering unit)) facing (Facing of TempUnit) degrees

--> Unit - Create 1 |cFFFF0000 Survivor with knife |r for (Owner of TempUnit) at (TempPoint)) facing (Facing of TempUnit) degrees

[Point - Remove TempPoint]

--> Custom script: call RemoveLocation(udg_TempPoint)
 
Level 2
Joined
Oct 23, 2011
Messages
28
OK for some reason the event wont trigger.. did i do something wrong?
  • Untitled Trigger 003
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to |cFFFF0000 Survivor |r
      • (Item-type of (Item being manipulated)) Equal to |cFF970707Knife|r
    • Actions
      • Set TempUnit = (Triggering unit)
      • Set TempPoint = (Position of TempUnit)
      • Set TempReal = (Percentage life of TempUnit)
      • Set TempItem = (Item carried by TempUnit in slot 1)
      • Set TempItem2 = (Item carried by TempUnit in slot 2)
      • Set TempItem3 = (Item carried by TempUnit in slot 3)
      • Set TempItem4 = (Item carried by TempUnit in slot 4)
      • Set TempItem5 = (Item carried by TempUnit in slot 5)
      • Set TempItem6 = (Item carried by TempUnit in slot 6)
      • Unit - Create 1 |cFFFF0000 Survivor with knife |r for (Owner of TempUnit) at TempPoint facing (Facing of TempUnit) degrees
      • Hero - Give TempItem to (Last created unit)
      • Hero - Give TempItem2 to (Last created unit)
      • Hero - Give TempItem3 to (Last created unit)
      • Hero - Give TempItem4 to (Last created unit)
      • Hero - Give TempItem5 to (Last created unit)
      • Hero - Give TempItem6 to (Last created unit)
      • Unit - Set life of (Last created unit) to TempReal%
      • Unit - Remove TempUnit from the game
      • Custom script: call RemoveLocation(udg_TempPoint)
When i use the item nothing happens
 
Level 5
Joined
Sep 27, 2011
Messages
141
I think you could also use when a unit starts an effect of an ability generic unit event and put ability being cast(items ability) as a condition that is normally what i do
 
Level 2
Joined
Oct 23, 2011
Messages
28
Well actually i changed my mind and i do use "uses an item" event just because i don't want to create more abilities since I'm going to do more than just 1 "transformation" since I'm adding machine gun/Rifle/SMG etc...
 
Status
Not open for further replies.
Top