Spawning problem
http_gamesalad
Member Posts: 1,340
I have a spawner that works properly till I add these rules. When game.screen.size.hieght = 568 DO : change attribute random.x to random (148,600) every 1 second & When game.screen.size.hieght =/ (does not equal) 568 DO : change attribute random.x to random (138,650) every 1 second.
I have no idea why this isn't working. I've done everything right (I think) .. I've been trying to fix this since last night. It like spawns an extra actor which I don't want it to.
If you need anymore information please tell me. I have to get this problem solved by any means. Thanks
Comments
What is random.x? It's best to mention attribute names by their full names (e.g. game.newX or self.randomvalue). Are you changing self.Position.X? How do you know it's not working? With a scene width of 148,000 or more pixels, how are you checking to see if the actor changed positions?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang its game.random.X & when when I press play with the changes made the spawner isn't spawning at right times or it's spawning that aren't needed.
I have no idea, sorry.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang Okay basically I have 2 different spawners with 2 different game.randomX. When the screen.size.height = 568 I want the game.randomX to spawn random(148,600). But when screen.size.height =/ (does not equal) 568 I want the game.randomX to spawn random (138,650)
In short I'm asking how can I turn on 1 spawner & turn off another at different screen.size.height. Does this help you understand more
& how I can switch from those game.random X attributes back & forth
I have a spawning question... still getting use to these forums so I apologize if this is asked in the wrong place.
I'm looking for my spawn actor to spawn another actor at random times throughout the game. At the moment when I use the random function it seems to choose a time in between my min and max and uses the exact same interval between each spawn. How would I make it so each spawn is independent of the previous one?
Thanks!
How are you verifying the value of screen.size.height? And how do you know it's not working the way you want it to?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@JennyLynn007 please start a new discussion for your question since it's only tangentially related to this thread.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Everything is tangentially related to http_gamesalad's questions, even http_gamesalad's questions.
@http_gamesalad [jking]
@tatiang I have an actor displaying screen.size.height . Also when I change the screen.size.height from the iPad screen size it spawns an actor I told it not to spawn. Would you like me to post screen shots of the spawner actor or make a project file? Because I have no idea why it's doing this.