Little Help plz
Hi all,
I was wondering if someone could give me a helping hand here. I'm currently working on a simple game that involves bombs raining down from the top of the scene. Could someone plz tell me the best way to do this? My bombs have faces, I have one looking down-left, and one looking down-right. I need to get them to spawn randomly at different points (from the top) and fall at different speeds and directions.
One more thing if possible, how can I get this action to start slowly, yet get faster as the timer increases.
I've been working on this for hours now, and to be honest I'm getting frustrated because I can't get the random part right. I can get the bombs to fall, however I've got like 5 spawners at the top of my screen and all the bombs fall at the same speed and directions.
Thanks so much all.
:-)
I was wondering if someone could give me a helping hand here. I'm currently working on a simple game that involves bombs raining down from the top of the scene. Could someone plz tell me the best way to do this? My bombs have faces, I have one looking down-left, and one looking down-right. I need to get them to spawn randomly at different points (from the top) and fall at different speeds and directions.
One more thing if possible, how can I get this action to start slowly, yet get faster as the timer increases.
I've been working on this for hours now, and to be honest I'm getting frustrated because I can't get the random part right. I can get the bombs to fall, however I've got like 5 spawners at the top of my screen and all the bombs fall at the same speed and directions.
Thanks so much all.
:-)
Best Answers
-
SlickZero Houston, TexasPosts: 2,870
Are you using gravity, or are you using a move behavior in the actors that fall?
It sounds like you just need to set a random speed and angle in the actors that will make them fall at different speeds and directions. You wont be able to do that with the speed if you are using gravity. You will need to use the move behavior, or linear velocity.
As far as making them spawn faster, you could set it to a timer behavior, and after however many seconds you assign to it goes off, have the spawn rate faster than what you have set up. Like instead of every 3-5 seconds (just an example time), change it to 2-4 seconds after a certain amount of time.
Like your icon btw. I spent many years playing Vampire: The Masquerade -
Nmdogdude Posts: 174
under each bomb actor, try changing it to random degree between a certain range (ex: between 90-270) if you want them to fall. Also, to gradually change the speed, try using a timer attribute 'Every 30 seconds change attribute self.linearvelocity.y to self.linearvelocity.y. +20 (Or whatever you want to change it to.) -
The_Gamesalad_Guru Posts: 9,922
Go to Youtube gamesalad cookbook and you will find a video there about spawning actors and one about spawning random actors. This will get you in the right direction.
Answers
this template has exactly what your looking for hope this helped
good luck and happy gaming
bilal
Here is what I'm trying to work with.
I have an attribute called bombsKilled (it's a simple counter).
I've set up one called bombFallSpeed.
So I've tried:
------------------------------
Game Attributes:
Int bombskilled;
Int bombFallSpeed = 50;
Int bombSpawnTimer = 3;
Rule - When attribute game.bombskilled = game.bombskilled+5
Change Attribute - game.bombFallSpeed = game.bombFallSpeed + 10
" - game.bombSpawnTimer = game.bombSpawnTimer-.3
----------------------------
Any help or advice would be great....ty.