I'm aware I posted two days ago, but if it's here I'm going to use it.
In my last post I was working on a fishing system, which I still am now. Though it works now, I want to add some fun stuff to it.
How would I make it so that when you do catch a fish it would have a random size from blank# to blank# (So we can keep sizes realistic, of course).
if(0 to 4)
view()<<output("small worthless message here","window")
sleep(#)
usr<<output("You caught a fishnamehere","window")
usr.contents+=new/obj/Fish/Fishname
How would I go from there into adding a random size to that fish, so say if they caught a gold fish you'd want it to be no more than 2 or 3 inches tops. So I'd want something like a random of 1 to 3? I don't know how to do it exactly, and it's not working all that nicely. I'm pretty sure it could be done the same way the fish is done, but how would I go about adding the variable to the object and what not?
Some help would be so great, thanks.
ID:161876
Mar 21 2008, 7:49 am
|
|
In response to Lyndonarmitage1
|
|
Oh my god. My bad, it should be.
I'm so sorry for the inconvenient post, haha. I'll figure it out, thanks Lyndon. |
In response to Lyndonarmitage1
|
|
Since size of fishes can very from species to species, genus to genus, I would recommend setting the size when the fish is created, via modifying New():
Fish |
In response to GhostAnime
|
|
What happens with the system is the size is decided for each specific fish when they're caught - The code is pretty long in the means it has different code snippets for each different fish.
So I just create the size there, thanks for the help. :D |
Isn't it simple?