I created a battle system, and want to incoörperate a drop system when the monster dies, I have unfortunately been unable to get the monster to drop items from a variable array.
So here i am requesting a sample code for such a system.
Thanks in advance, Oipo
ID:169142
Jul 25 2005, 3:26 am
|
|
In response to JKyd
|
|
JKyd wrote:
I assume you have the icons and the vars ready, as with the attack proc and monster movement and all that jazz you need > [Untested] If you plan on using that, check into prob() and pick(). |
In response to Sinoflife
|
|
No thanks guys...Those two are way to much coding for me...I already fixed it by dropping a item randomly from an array...Thanks anyways though
|
In response to Oipo
|
|
Wouldn't deleting the monster stop the script, thus canceling out everything after that?
|
In response to Flame Sage
|
|
It depends on what you do.
|
In response to Flame Sage
|
|
Flame Sage wrote:
Wouldn't deleting the monster stop the script, thus canceling out everything after that? Yes, and it would work if he put del(src) after the end of each if() statement. |
In response to Sinoflife
|
|
I always thought when you called del() it would stop the current proc from executing......
|
In response to Flame Sage
|
|
Flame Sage wrote:
Wouldn't deleting the monster stop the script, thus canceling out everything after that? No it wouldn't instead you'd get a runtime error for an undefined variable.Then the script would crash. |
In response to Sinoflife
|
|
=/
No. Try this: mob/proc/asdf() Also, you wouldn't have to add one after every if, and you shouldn't even have tons of if statements for a drop procedure! monster |
[Untested]