For falling rocks you should do the next:
1.Make an actor that will create the rocks, parent it to the view and put above the top left corner of the view.
2.On create actor RockCreator
Create Timer rand 1000-5000(adjust as you see fit)
3.On timer crate actor rock
4.On create actor rock
5.On draw actor rock
Hope this explains it.
1.Make an actor that will create the rocks, parent it to the view and put above the top left corner of the view.
2.On create actor RockCreator
Create Timer rand 1000-5000(adjust as you see fit)
3.On timer crate actor rock
4.On create actor rock
- Code: Select all
x = round(rand(640))+view.x;//640 is your screen res.
yvelocity = rand(10);//if you want random rock speeds
yvelocity =10; //if you want constant rock speed
5.On draw actor rock
- Code: Select all
if (y>view.y+view.height+20)DestoryActor ("Event Actor");
Hope this explains it.