Basics of RPG Creation
(<>>|*Note: I will be trying to make this as newb-friendly as possible.*|<<>)
Rep Apreciated.
Rep Apreciated.
Item Dropping
Yes, we all know how to do for units already spawned -I hope - but what about units who are respawns?
This section will teach you how to drop items for respawned creeps.
First of all, open your RPG.
This is the "RPG" I will be using. Oh noes! It looks like Billy is under attack! It is your job to save him! We must create a 1337 (l33t(leet(elite))) trigger for the big bad monster to drop an item when you kill it!
Open your trigger editor.
Here comes the good stuff. Make a new folder, I'll call it, "1337 Item Drops" and create a trigger, I'll call this, "Big Bad Monster Drop".
Then, create the new event:
Now, make the new condition:
Here comes the moderatly difficult stuff.
Make a new action: If, Then, Else function.
Make the condition (If): If ((Random integer number between 1 and 2) Equal to 1)
This will be an integer comparison, and the first section of the comparison will be Math - Random Number. Then, set the comparison of the second section equal to 1. This will create a 50% percent chance of dropping the item.
--------------------------------------------------------
Make the action (Then): then do (Item - Create Crown of Kings +5 at (Position of (Dying unit)))
This doesn't need much explanation, it is found in the Items catagory; Create Item at (Center Of (Playable Map Area)) Just change this to the item you want to drop, and have it drop at the position of the dying unit.
-------------------------------------------------------
Then, have the else function: Do Nothing.
-------------------------------------------------------
This will create your basic item dropping trigger. The trigger should like something like this:
This section will teach you how to drop items for respawned creeps.
First of all, open your RPG.
This is the "RPG" I will be using. Oh noes! It looks like Billy is under attack! It is your job to save him! We must create a 1337 (l33t(leet(elite))) trigger for the big bad monster to drop an item when you kill it!
Open your trigger editor.
Here comes the good stuff. Make a new folder, I'll call it, "1337 Item Drops" and create a trigger, I'll call this, "Big Bad Monster Drop".
Then, create the new event:
Now, make the new condition:
Here comes the moderatly difficult stuff.
Make a new action: If, Then, Else function.
Make the condition (If): If ((Random integer number between 1 and 2) Equal to 1)
This will be an integer comparison, and the first section of the comparison will be Math - Random Number. Then, set the comparison of the second section equal to 1. This will create a 50% percent chance of dropping the item.
--------------------------------------------------------
Make the action (Then): then do (Item - Create Crown of Kings +5 at (Position of (Dying unit)))
This doesn't need much explanation, it is found in the Items catagory; Create Item at (Center Of (Playable Map Area)) Just change this to the item you want to drop, and have it drop at the position of the dying unit.
-------------------------------------------------------
Then, have the else function: Do Nothing.
-------------------------------------------------------
This will create your basic item dropping trigger. The trigger should like something like this:
Okay, you're done, right? WRONG, we still have to learn a little bit more!
-------------------------------------------------------
Item Dropping Part 2
Yay! You've made it to part two! I will not be explaining how to make some things will learned in the last tutorial again, so you better read it.
Take the trigger you've created in the last tutorial, and and simply change the Else action to: (Item - *ITEM* at (Position of (Dying unit))).
Now if your first item doesn't drop, the other will. This gives a 100% chance of dropping an item.
But let's take it a step further. If the first item is not dropped, then a second item will have a chance to drop.
Simple take the trigger you have, make the else action an If, Then, Else function. Then make the If function like you did before, but lets change the value to between 1 and 4, leave equal to 1 alone.
Make the Then action the same as you did before, except let's change the item. Simple, right?
Make the else action nothing, and your done! This will give a 75% chance of dropping an item!
You're done! Using these triggers, you can make hundreds of different item drop possibilities!