[Suggestion]"Random Switch"
First, does LÖVE (and Lua) accept random variables?
If not, stop reading and reply "Not".
If yes, continue reading.
Something that activates things randomly.
Ex.:
You connect three lasers to the "random switch", then connect it to a push button. If you push the button, the "random switch" will activate one of the lasers, if you push it again, it will deactivate the laser and activate another (being random, i think there would be a possibility of activating the same laser again).
If you connect only one thing to it, it will activate it and keep it activated even if you push the button a lot of times.
If you only connect it to a NOT gate, when the level is just loaded, the random switch already had activated one of the lasers.
If you connect it to a squarewave, it will activate one thing for x seconds, then another thing for x seconds, and then another...
Should be noted that it don't have an OFF (if someone thing it should have, suggest it), it has an ON and another ON. (i don't know how to explain it better)
^This mean that if you connect it to a floor button it won't work efficiently.
Thanks for reading (if you read it).
If not, stop reading and reply "Not".
If yes, continue reading.
Something that activates things randomly.
Ex.:
You connect three lasers to the "random switch", then connect it to a push button. If you push the button, the "random switch" will activate one of the lasers, if you push it again, it will deactivate the laser and activate another (being random, i think there would be a possibility of activating the same laser again).
If you connect only one thing to it, it will activate it and keep it activated even if you push the button a lot of times.
If you only connect it to a NOT gate, when the level is just loaded, the random switch already had activated one of the lasers.
If you connect it to a squarewave, it will activate one thing for x seconds, then another thing for x seconds, and then another...
Should be noted that it don't have an OFF (if someone thing it should have, suggest it), it has an ON and another ON. (i don't know how to explain it better)
^This mean that if you connect it to a floor button it won't work efficiently.
Thanks for reading (if you read it).
Yes, Löve can have random variables.(math.random) And yes, that idea is possible.
I was planning doing something like in Hermie Hopperhead. The final boss (link) randomly throws dead enemies, so i was thinking i use the randow switch and the enemy spawner (SE), to do a boss battle like in that game.
Also, giving the possibility to the player to start with different powers.
Or, do like in a roulette wheel and put different prizes to receive in different paths.
Also, giving the possibility to the player to start with different powers.
Or, do like in a roulette wheel and put different prizes to receive in different paths.
classic straw man fallacySašo wrote:I'm sure you could have great fun in a level where there's a switch which has a chance to completely stop you from finishing a level or just slow you down pointlessly.
the idea is pretty good, but needs polish. I'm thinking when you power the input, it powers a random output until you unpower the input. each time you turn the power on to the input it picks a new random output (can be the same) so it's easy to program (probably) and also functional
- BobTheLawyer
- Posts: 2232
- Joined: 01 May 2012, 21:00
I'm thinking just give us random variables in custom entities or I'm going to kill someone
My point is that the entity lacks a specific scenario of usage. Though in this case it could be sort of half hacked together using buttons and goomba spawners.Camewel wrote:classic straw man fallacySašo wrote:I'm sure you could have great fun in a level where there's a switch which has a chance to completely stop you from finishing a level or just slow you down pointlessly.
the idea is pretty good, but needs polish. I'm thinking when you power the input, it powers a random output until you unpower the input. each time you turn the power on to the input it picks a new random output (can be the same) so it's easy to program (probably) and also functional
My point is that using it for any kind of puzzles would be more irritating than anything else. If you played Portal you'd know that everything that was happening automatically in Portal (especially before you get the portal gun when you have to bring a block to a different room to open the door), it was happening based on a pattern.
Randomness, as much as you can achieve with it, isn't always good. Especially in the case of Mari0 puzzle levels.
- BobTheLawyer
- Posts: 2232
- Joined: 01 May 2012, 21:00
Not what I want.Camewel wrote:you can make enemies spawn at "random" times
More of a boss that may do one of 3 things, either a, b, or c.
Which one he does is random. Makes him unpredictable and less easy to beat.
You're forgetting platformer levels, where randomness can be very useful.Sašo wrote:Randomness, as much as you can achieve with it, isn't always good. Especially in the case of Mari0 puzzle levels.
You could also make some nice mazes with it or something probably.