random obstacles( multiple obstacles not just one)
So i have finaqlly found a way to make my spikes scroll. Now i need some help with my obstacles. Basically at the moment since its just a prototype i have 4 obstacles and i though of doing something like this:
have 4 different actors (different shapes) and 1 speed attribute and 1 spawn attribute and 1 shape attribute.
Have a rule every 0.25 seconds, have something like a random number generator pick between 1 and 4. If 1 spawn shape actor 1, 2 spawn shape actor 2, etc. Then they will be positioned randomly along the y axis so something like random ( 285,200) but they will also move at the same speed as my scrolling background. Tjis idea works but i am having a hard time actually making this idea into a script for my spawner. Any ways on how to do this or a template if you made something like this? I am still quite new and need to know functions a bit better
Comments
I meant vertically moving spikes *
Create an offscreen plain actor to loop / spawn spikes at the desired x/y location at a specified timed interval. You can use the clock function or the Timer function to achieve this. Smaller timed gaps mean closer spikes, larger times greater distances between those spikes.
Create your individual spike actor to be spawned and add a move or accelerate action to it in the direction you want. Constrain the position of the Y axis of your spike to the bottom of the screen e.g. 10
Create a rule inside the spike... if spike actor X position => a specified distance in X off screen - destroy this actor.
That should do it.
Thnx but this was not what i meant i meant the spikes to be like a scrolling kind of background so something like this
https://play.google.com/store/apps/details?id=com.ketchapp.hophophop
except vertically. Where you have to avoid the spikes and the obstacles but i will have different obstacles and controls but spikes are the same but vertically scrolling . Basically want to scroll vertically
@pranshudhungana21 Hey is this what you mean ? i attached a demo in case you want it hope it helps
not really but the obstacles spawning kind of helps but all i wanted help with is just a vertically scrolling background which scrolls forever and the background was going to be a really spikey one but thank you nevertheless for giving me an idea of randomly spawning spikes which i could use as an obstacle
@pranshudhungana21 oh i thought you had problems with spawning , if you just want to go vertically change attribute motion linear velocity y to -value (down) +value(up) or you can use any of the move behaviors and set the direction up or down. Goodluck
Is this what you are talking about?
If so you can buy the template here: Endless Wall Jumper Template
BRUNKT.com
Follow me at: Twitter - Instagram
Games and Templates
Appstore
yeah
This is what i meant but really i just wanted to scroll vertically to put it simply so is there anything that could teach me how to scroll cause none of the courses do
Nvm i got how to do it from ice boxes help thnx so much icebox
Is there a way to close this?
i need to change the topic of this i am very close to finishing my game and i need some help with the obstacles
@pranshudhungana21 start a new thread
thts what i did and ice box helped me once again !