Tutorial Basics To RPG Creation

Was This Helpful? Even if you knew this already, do you think it helped newbies?

  • No! - Please, for the love of god, don't make another tutorial!

    Votes: 0 0.0%

  • Total voters
    12

Turnip

New Member
Reaction score
18
Basics of RPG Creation​

(<>>|*Note: I will be trying to make this as newb-friendly as possible.*|<<>)

Rep Apreciated. :)

Item Dropping

Yes, we all know how to do for units already spawned -I hope :p - 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.

itemdropping1mi3.jpg


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.

itemdropping2ta6.jpg


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:

itemdropping3jr9.jpg


Now, make the new condition:

itemdropping4qw5.jpg


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:

itemdropping5kl2.jpg



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!​
 
Reaction score
456
Pretty nice, but (Position of (Dying unit)) leaks. First you need a variable for the location, and then you need custom script:
Code:
call RemoveLocation(udg_"yourlocation")
 

Exide

I am amazingly focused right now!
Reaction score
448
Nice and simple.
I like making easier Tutorials myself, for beginners mostly (basically because I don't know enough to help skilled users. :p)
Good use of screenshots too, makes it a lot easier to understand.
You could've chosen a more appropriate name for your trigger and category, though.
And you should mention that item dropping can be achieved without the use of triggers. (I know triggers kind of freaked me out when I first opened WE.)
-Maybe you could edit your Tutorial and add this as a third part? :)

Finally, I wouldn't be too worried about point leaks. Since this Tutorial is mainly for new editors, they wouldn't want to bother with learning about custom scripts. (It IS a good thing to know, and might be good to start learning early. But then again, might be too much for now and make them give up just by looking at it.)

So, conclusion: Good job, +rep. Keep it coming! :D
 
M

Mathemagicia

Guest
Finally, I wouldn't be too worried about point leaks. Since this Tutorial is mainly for new editors, they wouldn't want to bother with learning about custom scripts. (It IS a good thing to know, and might be good to start learning early. But then again, might be too much for now and make them give up just by looking at it.)

On the other hand, teaching good programming practice is like teaching a kid to brush their teeth. They won't do it unless you make them, and if they don't do it, they'll regret it later. The notion is to make it a habit for the rest of their time, so they don't even think about it anymore, and are better off for it.

Besides, the important bit is that it's very easy to copy/paste all over your code. Indeed, you can even copy/paste the custom-script line out of the memory leak tutorial (that's what I did :cool: ). It's easy to get into the habit of every time you need "position of" copy and paste the set variable / destroy lines.

Just my take on things, as a newbie map designer, it was easier to learn about memory leaks early on, fix my few triggers, and then copy/paste the needed code every time I need it.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
nice tut but i don't see this as a helpful one so i will see later what u add since doing what u did currently doesn't pretty much count basic of rpg.....

u should have finished all the rpg tutorial or at least something like 70%.
 

Mr Zero

Junior Regular (Got the T-shirt)
Reaction score
64
Good indeed but please keep the front at a normal level (and size aswell!) :rolleyes:
 

Turnip

New Member
Reaction score
18
Thanks. :)

For my next part, creep respawning, which way do you think I should do a tutorial for, or do you think I should do it for many ways?


Rep Apreciated. :)
 

kylewarrior

New Member
Reaction score
3
You could of just select the unit and press enter and change the items is will drop and stuff.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
You could of just select the unit and press enter and change the items is will drop and stuff.

That's what I was thinking too, it is much easier and avoids the hassle of triggers. Otherwise you'll have like 500 triggers for 500 units, unless you are wise and pick every creep then make them drop a random item somehow or something like that.

It seems like a good tutorial, though I don't think that putting the last comment was that good; note that this is just a warning:
  • When putting that comment, please spell "Appreciated" correctly
  • Putting that often has people -rep you

This is just a warning to prevent you and future people from doing that. :D
 

SerraAvenger

Cuz I can
Reaction score
234
[
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.

There are better ways. You would need an integer ( in GUI itemtype ) array, then store the items you wanna have it drop ( like set array[0] = crown of vigilance, set array[1] = darkhammer; set array[2] = gold )
and then create item array[random integer number between 0 and 3 ].
Good things at it: you can more easiliy control it, it is faster and you can let the units drop better items later by changing the random integer interval ( by using variables or something like hero level of dying unit - 2; hero level of dying unit * 2 )

Greetings Serra ;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top