I found a random event placement, need help explaining.

Started by Rymdpotatis, August 06, 2008, 03:21:36 pm

Previous topic - Next topic

Rymdpotatis

http://www.kamain.com/tutorials.php?subaction=showfull&id=1175305235&archive=&start_from=&ucat=6&;

QuoteIf you're making a forest that randomizes and you have a tree character sprite, you're set.

Requires

2 maps. (One for the entry to the forest and the other for the forest.)
Number of trees you want in your forest times 2 = the variables you need. (In other words, 2n.)

Let's start off very simple...three trees.

Make 6 variables.

Tree 1x
Tree 1y
Tree 2x
Tree 2y
Tree 3x
Tree 3y

Don't do anything to those variables and I mean anything!

Next, make some sort of an entry to the forest.
When the player is about to teleport to the forest, do this.

Go to each variable and make it randomize by the numbers you want.

Next, go to the forest map.

Make an event.
Make the event a tree charset.
Make the event parallel process
Then next, find the command called change event location, click it.
Then make the event teleport through variables
Make Tree 1x, the X and tree 1y, the Y.

Make another event, do the same thing
Tree 2x, the X, Tree 2y, the Y.

Make another, same process, different variables.



That didn't make much sense to me since I could not come up with how to make those variables.
Perhaps someone with more experience could take a look at this and explain it in a way a dumb person like me could understand? :^_^':

Starrodkirby86

August 06, 2008, 03:34:55 pm #1 Last Edit: August 06, 2008, 03:36:02 pm by Starrodkirby86
Here, I'll tell you a rephrased way of doing it.

---

What you need: One tree character Set.

Make 6 Variables:

  • Tree 1: X

  • Tree 1: Y

  • Tree 2: X

  • Tree 2: Y

  • etc.



Make a variable operation command. Use Set, and make the number determined by Random (You can choose any range as long as it's going to be within the map).

Now, make a tree event, and set it to Parallel Process. Use the command Change Event Location to, and use the tree variables as the coordinates. You should be all set.

I'm sure though that it looks like there is a bug, because the forest seems to keep randomizing since there's no end (From the looks of this tutorial). So turn the self switch A on, make a new page requiring that condition to be on and retain the Tree graphic on the new page. Repeat the events, just change the Location Event Coordinates.

Hopefully that's more understandable...^^;

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




Rymdpotatis


Fantasist

Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews