• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Item with lvl >8 don't appear in Tool Palette

Status
Not open for further replies.
Level 2
Joined
Nov 17, 2017
Messages
8
I'm working on a Respawn system map and I've created a trigger to drop items based on the level of Creep that dies, the map has a boss and units of level 1-20, the original system allows to rank item only up to level 8, I know that it is possible to sort the items using Shift + Enter to go from lvl 8, but the system does not drop the items above Lvl 8 nor appear in the tool palette, is there any way to make modified items found by the system?
imagem.png
 
Level 13
Joined
May 10, 2009
Messages
868
It's just a GUI limitation. Create a new Item-Type variable. Before creating a new item, you should assign a new value to that variable (get a random item by level) using custom script, and use it in the Create Item action.

Here's my example:
Untitled-1.png


  • Create a Level 20 Item
    • Events
    • Conditions
    • Actions
      • Custom script: set udg_RandomItem = ChooseRandomItemEx(ITEM_TYPE_ANY, 20)
      • Item - Create RandomItem at (Center of (Playable map area))
Do note that doing this set udg_RandomItem = ChooseRandomItemEx(ITEM_TYPE_ANY, 20) would be the same as:
  • Set RandomItem = (Random level 20 Any Class item-type)
EDIT: Of course, what you really want is generate an item as the same level as the triggering unit.
set udg_RandomItem = ChooseRandomItemEx(ITEM_TYPE_ANY, GetUnitLevel(GetTriggerUnit())) // This is not the hero level
 
Last edited:
Level 2
Joined
Nov 17, 2017
Messages
8
I did not understand correctly what the code does and I could not test it, it error and does not start the game, but thanks for helping

I created an integer variable to put a number> 8, what happens is that the system does not find Items where the Item level itself is greater than 8, while I kill creeps that are below the level 8 I have drop, but above this the system does not show modified level items using shift + enter

imagem.PNGimagem2.PNG
At the moment I collect the information from the respawn I store the level of the creep that goes from 0 to 20, worked perfectly until creeps of level 8, when the command is given to create an item level 9 or higher does not drop anything, it seems that same as the items do not appear in the tool palette the system does not find them to create at the time of drop
 
Level 13
Joined
May 10, 2009
Messages
868
Then it must be related to your items in Object Editor being misconfigured. Check if you're really using "Stats - Level" instead of "Stats - Level (unclassified)" field.

EDIT: I just tested it here, even using GUI only (which was a mistake of mine since I misread your trigger).

I've placed 5 different units. Each has a different level: 11, 12, 13, 14, 15. Then I modified the "stats - level" from 5 different items, giving the same level as mentioned before. It works.

  • Untitled Trigger
    • Events
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
    • Actions
      • Set NoPointLeak = (Position of (Triggering unit))
      • Item - Create (Random level (Level of (Triggering unit)) Any Class item-type) at NoPointLeak
      • Custom script: call RemoveLocation(udg_NoPointLeak)
WC3ScrnShot_112117_213248_01.png
 

Attachments

  • ItemLevel-Test.w3x
    16.6 KB · Views: 37
Last edited:
Status
Not open for further replies.
Top