Random platform spawner issue
tzunito
DenmarkMember Posts: 15
Hei guys, first and foremost thank you for a great community. I've learned alot from reading comments and threads in here.
I'm looking for help with an issue i ran in to last night. I'm trying to create a small game where the game is a fluent motion from right to left. And my actor has to jump from platform to platform and shoot possible enemies.
My actor will be set at the same location on screen at all time, and all the player has to do is press/touch two keys in order to jump and/or shoot.
What im trying to do is to spawn random layers thats going to be used as platforms for my actor to jump on, but the problem at hand is that the layers spawn on top of eachother and at the same time and sometimes multiple spawn together making the scene clumsy to look at.
I have 5 different Layers
I've made a Real/index and called it Random_Front_Layer
My setup is:
Timer -> every 1 seconds (run to completion set) -> change attribute: game.Random_Front_Layer to Random(1, 5) ->
Rule (all chosen) -> attribute: If game.Random_Front_Layer = 1 -> do Rule -> Spawn actor: Layer_Front_1
place: front of layer
direction: 0 to scene
From position 560, 40 relative to scene
and added: accelerate 180 relative to scene with acceleration 150
And i've basically just copy pasted and made the attribute = 2 for layer to and etc
If anyone understands this and can help me out im grateful, only been at this for four days and im having a great time.
Tzunito
I'm looking for help with an issue i ran in to last night. I'm trying to create a small game where the game is a fluent motion from right to left. And my actor has to jump from platform to platform and shoot possible enemies.
My actor will be set at the same location on screen at all time, and all the player has to do is press/touch two keys in order to jump and/or shoot.
What im trying to do is to spawn random layers thats going to be used as platforms for my actor to jump on, but the problem at hand is that the layers spawn on top of eachother and at the same time and sometimes multiple spawn together making the scene clumsy to look at.
I have 5 different Layers
I've made a Real/index and called it Random_Front_Layer
My setup is:
Timer -> every 1 seconds (run to completion set) -> change attribute: game.Random_Front_Layer to Random(1, 5) ->
Rule (all chosen) -> attribute: If game.Random_Front_Layer = 1 -> do Rule -> Spawn actor: Layer_Front_1
place: front of layer
direction: 0 to scene
From position 560, 40 relative to scene
and added: accelerate 180 relative to scene with acceleration 150
And i've basically just copy pasted and made the attribute = 2 for layer to and etc
If anyone understands this and can help me out im grateful, only been at this for four days and im having a great time.
Tzunito
Comments
http://www.jamie-cross.net/?portfolio=gamesalad-endless-runner-overview
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
I'd guess that if you want your platforms to be random, you might want the height (vertical position) to be different each time ?
You don't give the values for layers 2-5, so maybe each of these position the platform in a different vertical position, giving a pseudorandom effect ?
I'm not 100% what you are after or what you are doing, but you could try making the vertical position random instead of fixed . . . . .
Every 1 second
Spawn actor
Position x = 560, Position y = random (10, 200)
?
I used Jamie_c' turtorial and it worked out like i wanted it to. But thank you for commenting
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Sorry for bothering you again mate, but after I watched your video i noticed that my player actor pushes the layer actor (or rather stops it in place) and the next layer "floats" into the first layer making them overlap.
I have 3 questions for that (tried google, GS forums and youtube for my exact scenario of running game):
1. Is there a way to make them not overlap and not move when touched by player?
2. Can I make the player "die" by touching the side (or stop and fall)
3. Is there any videos out there that could help?
Tried to make an invisible layer spawn atop of the first layer, but seeing that the first layer randomly spawns at ?? x and ?? y I just cant seem to make it spawn atop all the time.
Hope you have the time to help a rookie once again, learning alot and having tons of fun
#2, The player should fall off the edge of the platform as it stands now
#3, if you are interested I teach a class at udemy and in there you learn to build a complete endless runner game as one of the three projects. It's linked in my signature below.
Hope this helps some.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Just looked at the Udemy, and im pretty sure im gonna take that class in a few weeks when i get paid. Seems like there is a lot of stuff to be learned.
Just opened the endless runner GS file, when i press preview the player spawns immediately and just flashed fast at its index place, and the platform wont start. Looked through the rules and such and all were the same as the video besides the added ones.
Can it be the difference in windows to MAC user?
Sorry for being a bother,
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Sorry to say its the same, but if the behaviors and rules are taught in your class ill just learn it from there when i buy it.
Just bought it, couldnt wait to learn more about this great program!
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page