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

[Trigger] RPG Item Drop Help

Status
Not open for further replies.
Level 3
Joined
Jun 22, 2009
Messages
18
Hi, I'm Dot145 and for my RPG (Legends ORPG) I want to make an item drop system that is like that of Defi4nce's ORPG and Twilight's Eve ORPG. Their item drop system has it so that when you kill a boss, everyone in the dungeon is teleported to a group of little squares that has just them and an item (every play is teleported to a different square). They can either take the item and type -done to get out, or just use -done if they don't want that item or need it. I know how to start the trigger (I think), although I would have to make a trigger for each dungeon:
  • dungeon complete
    • Events
      • Unit - |Cffff0000Jas' Kah 0253 <gen> Dies
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in Troll dungeon <gen> owned by Player 1 (Red)) and do (Unit - Move (Triggering unit) instantly to (Center of dungeon complete red <gen>))
Next, would I do Item - Create Random item at (Center of dungeon complete red <gen>) or something else?

Jas'Kah is the boss of the Troll Dungeon, and dungeon complete red is the place Red is teleported to.

Any help is greatly appreciated, and if you know a way to make it only one trigger, that would help so much!
 
Level 18
Joined
Feb 28, 2009
Messages
1,970
First of all your trigger leaks.
  • Set temp_group = (Units in Troll dungeon <gen> owned by Player 1 (Red))
  • Set temp_point = (Center of dungeon complete red <gen>)
  • Unit Group - Pick every unit in temp_group and do (Unit - Move (Picked unit) instantly to temp_point)
  • Custom Script - call DestroyGroup (udg_temp_group)
  • Custom Script - call RemoveLocation (udg_temp_point)
(I think the problem was
  • (Unit - Move (Triggering unit)
You should use when you pick
  • (Unit - Move (Picked unit)
 
Level 3
Joined
Aug 9, 2008
Messages
60
If you're gonna do it for a unit that's already placed on a map, you can make him have an object editor drop table, it's very easy to set up. Simply double click the unit, and one of the tabs will have drop on death items and drop tables.
 
Level 3
Joined
Jun 22, 2009
Messages
18
@krisserz Thanks for the help! Do you know if there is a way for me to make it so a random item from a handful of items is in the area they are transported to? Here's what I have changed so far:
  • dungeon complete
    • Events
      • Unit - |Cffff0000Jas' Kah 0253 <gen> Dies
    • Conditions
    • Actions
      • Set temp_group[1] = (Units in Troll dungeon <gen> owned by Player 1 (Red))
      • Set temp_group[2] = (Units in Troll dungeon <gen> owned by Player 2 (Blue))
      • Set temp_group[3] = (Units in Troll dungeon <gen> owned by Player 3 (Teal))
      • Set temp_group[4] = (Units in Troll dungeon <gen> owned by Player 4 (Purple))
      • Set temp_group[5] = (Units in Troll dungeon <gen> owned by Player 5 (Yellow))
      • Set temp_group[6] = (Units in Troll dungeon <gen> owned by Player 6 (Orange))
      • Set temp_group[7] = (Units in Troll dungeon <gen> owned by Player 7 (Green))
      • Set temp_group[8] = (Units in Troll dungeon <gen> owned by Player 8 (Pink))
      • Set temp_group[9] = (Units in Troll dungeon <gen> owned by Player 9 (Gray))
      • Set temp_group[10] = (Units in Troll dungeon <gen> owned by Player 10 (Light Blue))
      • Set temp_point[1] = (Center of dungeon complete red <gen>)
      • Set temp_point[2] = (Center of dungeon complete blue <gen>)
      • Set temp_point[3] = (Center of dungeon complete teal <gen>)
      • Set temp_point[4] = (Center of dungeon complete purp <gen>)
      • Set temp_point[5] = (Center of dungeon complete yellow <gen>)
      • Set temp_point[6] = (Center of dungeon complete oj <gen>)
      • Set temp_point[7] = (Center of dungeon complete green <gen>)
      • Set temp_point[8] = (Center of dungeon complete pink <gen>)
      • Set temp_point[9] = (Center of dungeon complete gray <gen>)
      • Set temp_point[10] = (Center of dungeon complete lb <gen>)
      • Unit Group - Pick every unit in temp_group[(Player number of (Owner of (Picked unit)))] and do (Unit - Move (Picked unit) instantly to temp_point[(Player number of (Owner of (Picked unit)))])
      • Custom script: call DestroyGroup (udg_temp_group)
      • Custom script: call RemoveLocation (udg_temp_point)
@Feroc1ty I want to make it so that each person gets an item, so therefore it's not a race to see who can pick the dropped item up.

EDIT: Oh, and would I have to use a different variable for each dungeon or just one for the whole map?
 
Last edited:
Level 4
Joined
Apr 20, 2009
Messages
106
Alright, I had to give it a go. This is my quick and dirty solution. I've only tested it as Red, and it worked like a charm, so I will assume that Blue's and Teal's works as well.

It has everything (I think) that you wanted, where when you kill a boss, each hero goes to their separate loot thing, gets to pick one item or -done, and then is teleported back to the city. It should be really easy to make it work for additional players, as all it really is is CnP'ing and then changing a couple regions per trigger.

Anyways, enjoy, and I hope this helps.
 

Attachments

  • LootDistribution.w3x
    23.5 KB · Views: 59
Status
Not open for further replies.
Top