Author Topic: How do I randomize teleport targets?  (Read 2138 times)

Is there anyway to make it so that when the doPlayerTeleport event is triggered, the player is able to be randomly teleported to an assortment of bricks?

For example, the player clicks one brick. Once it is clicked, there is a chance they are either teleported to brick a, brick b, or brick c.

You can use VCE to randomize teleports, if you have it

You can use VCE to randomize teleports, if you have it

I have it. I'm not proficient in VCE, would you mind telling me how to do so?

just name a b and c the same name
then it randomizes
it should

just name a b and c the same name
then it randomizes
it should

I'll test this right now lol Nope, doesn't work. If only it were that simple.
« Last Edit: April 12, 2015, 05:33:41 PM by Sami2ss »


I have it. I'm not proficient in VCE, would you mind telling me how to do so?
Search a guide for Variables.

Here's how to do it


Line 0: Set the variable to 1
Line 1: Set the variable to a random value between 1 and 3. The way this works is it will set the value between what it already was and what you enter. That's why you need to set it to 1 first.
Line 2: Prints the value of brickchoice, this is optional and for testing.
Line 3: If brickchoice == 1 check for onvariable events on lines 4 through 4
Line 4: Teleport to brick A
etc

I attached the save file too.

Feel free to ask any questions.

snip

Thanks for this. Mind me asking what eventing mod that is?

Search a guide for Variables.

Is the default guide that appears for VCE any good? There is nothing more than a white, blank window that appears in the version I have, but I'm sure that there is a copy or something like that somewhere.

marble man made this

just look through here http://pastebin.com/9bpeSFdf

Thanks for this. Mind me asking what eventing mod that is?
It's part of DrenDran's Blockland essentials pack: http://forum.blockland.us/index.php?topic=245322.0
It's super helpful, mostly the green button, which copies the event :D

It's part of DrenDran's Blockland essentials pack: http://forum.blockland.us/index.php?topic=245322.0
It's super helpful, mostly the green button, which copies the event :D

Thanks so much. I really appreciate all you have done. This was the only thing holding me back from going further on a project I have been working on for months.

Off topic here, but do you know if the field of view feature of the mod messes with the default feature now in Blockland?

marble man made this

just look through here http://pastebin.com/9bpeSFdf

Thanks for the useful link, but I would rather use this teleporting mod I already have because player transform was very glitchy and didn't work for me sometimes. I am assuming that the event mod is randomTransform?
« Last Edit: April 12, 2015, 07:12:10 PM by Sami2ss »

i did a super homebrew randomization system a while back where, there was an array of 1*1 flats with another singular one above them, and the top one would fire a projectile in a random deviation downwards and trigger the event i wanted to happen to the originator. it was actually pretty sweet.

Thanks so much. I really appreciate all you have done. This was the only thing holding me back from going further on a project I have been working on for months.

Off topic here, but do you know if the field of view feature of the mod messes with the default feature now in Blockland?

No problem! I'm pretty sure the FOV doesn't mess with anything. I have it installed and it works (as far as I know :p)
EDIT: He actually removed the FOV slider from the mod since it became default, so it's all good.
« Last Edit: April 12, 2015, 08:41:14 PM by Bosie1997 »

i did a super homebrew randomization system a while back where, there was an array of 1*1 flats with another singular one above them, and the top one would fire a projectile in a random deviation downwards and trigger the event i wanted to happen to the originator. it was actually pretty sweet.

I guess this is just a physical manifestation of the VCE events in a sense.

No problem! I'm pretty sure the FOV doesn't mess with anything. I have it installed and it works (as far as I know :p)
EDIT: He actually removed the FOV slider from the mod since it became default, so it's all good.

Thanks. I'll leave this open if anyone else has questions.