When button pressed a bomber flys through the screen.

I am trying to make a vulture fly across the screen and drop eggs as bombs on the monsters when a button is pressed, I can get the bird to drop eggs but how to I drop it on the monsters then explode also How to get the vulture to fly across the screen and drop eggs after certain position on the map after clicking a button. thank you!

Answers

  • Luke20wLuke20w Member, PRO Posts: 50

    You need to make a rule in the button ; If button is pressed spawn actor vulture. After that make the vulture move horizontally by using the move behavior. Next you need to make another rue in the vulture that is; If attribute self.position.X = (whatever position you want the vulture to drop eggs from) then spawn actor egg. Then you need to make the egg move downward with the move behavior and also make a rule in the egg that says if overlaps/collides with monster then explode (then you can make the egg do whatever you want the egg to do). Sorry if it was long but I hope it helps!

  • derka6391derka6391 Member Posts: 31

    I got it to work but I have a problem when I click the button the vulture flys across the screen and drops the eggs then another spawns right after. how can I make it to where only 1 spawns.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    If you only want something to happen once, change the value of an attribute (e.g. a boolean) and add that attribute as a rule condition. So for example:

    When Touch is Pressed AND attribute self.clicked is false
         Spawn Actor
         Change attribute self.click to true

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • derka6391derka6391 Member Posts: 31

    I tried your step and it didnt work

  • Luke20wLuke20w Member, PRO Posts: 50

    Do the vultures keep spawning quickly or do they only spawn after the first one drops the eggs

  • derka6391derka6391 Member Posts: 31

    it was a timing issue, I resolved it!

Sign In or Register to comment.